Game::Game(Config const *config) : config_(config), quitting_(false), windowWidth_(config->windowWidth), windowHeight_(config->windowHeight), window_(0), context_(0), appTime_(0.0), time_(0.0), bounds_(Vector2(-15.0f, -15.0f), Vector2(15.0f, 15.0f)), fpsTime_(0.0), fpsCount_(0), delauneyTriangulation_(bounds_), dungeonGenerator_(&random_, bounds_), playerActor_(0) { actorFactory_.reset(new ActorFactory(this)); initWindow(); initContext(); initVoronoiDiagram(); inputManager_.reset(new InputManager(this)); physicsManager_.reset(new PhysicsManager(this)); controlService_.reset(new ControlService(this)); graphicsManager_.reset(new GraphicsManager(this)); initBlocks(); initDungeon(); initMonsters(); }
Dungeon::Dungeon(TileMap *destination, int width, int height, bool create = false){ initDungeon(destination, width, height, create); }