aboutsummaryrefslogtreecommitdiffstats
path: root/yage/entity/engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'yage/entity/engine.cpp')
-rw-r--r--yage/entity/engine.cpp61
1 files changed, 0 insertions, 61 deletions
diff --git a/yage/entity/engine.cpp b/yage/entity/engine.cpp
deleted file mode 100644
index 1cef4504..00000000
--- a/yage/entity/engine.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/** ---------------------------------------------------------------------------
- * -*- c++ -*-
- * @file: engine.cpp
- *
- * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com>
- * MIT License, see LICENSE file for more details.
- * ----------------------------------------------------------------------------
- */
-
-#include "engine.h"
-
-#include "../core/core.h"
-
-#include "space.h"
-
-namespace yage
-{
-
-Engine::~Engine()
-{
- quit();
-}
-
-void Engine::init()
-{
- yage::init();
- window_.create("Game Engine", 800, 640);
-}
-
-void Engine::mainLoop()
-{
- while (!window_.shouldClose()) {
- window_.pollEvents();
- window_.clearBuffer();
-
- update();
-
- window_.swapBuffer();
- }
-}
-
-void Engine::update()
-{
- for (auto &space : spaces_) {
- space->update();
- }
-}
-
-void Engine::addSpace(std::unique_ptr<Space> space)
-{
- spaces_.push_back(std::move(space));
-}
-
-Engine &Engine::instance()
-{
- static Engine engine_instance;
-
- return engine_instance;
-}
-
-} // namespace yage