Final editions to our code base
In this last portion of the chapter, we will be covering small changes and additions/editions that have been made all over the code written in the previous chapters in order to make this possible, starting with the shared context, which is now moved into its own header file.
Changes to the shared context
Out of all of the extra classes we defined, some of them need to be accessible to the rest of the code-base. This is what the shared context structure looks like now:
class Map; struct SharedContext{ SharedContext(): m_wind(nullptr), m_eventManager(nullptr), m_textureManager(nullptr), m_entityManager(nullptr), m_gameMap(nullptr){} Window* m_wind; EventManager* m_eventManager; TextureManager* m_textureManager; EntityManager* m_entityManager; Map* m_gameMap; DebugOverlay m_debugOverlay; };
The last object in it is the debug overlay we briefly discussed while working on the base entity class, which helps us see what's going on in...