initial commit

This commit is contained in:
2021-12-03 19:45:52 -05:00
commit 7b2a0719b1
17 changed files with 297 additions and 0 deletions

23
src/engine/engine.hpp Normal file
View File

@@ -0,0 +1,23 @@
//
// Created by m on 12/3/21.
//
#ifndef RLA_IIPP_ENGINE_HPP
#define RLA_IIPP_ENGINE_HPP
#include <memory>
#include <chrono>
#include "game/game.hpp"
#include "rendering/renderer.hpp"
static const bool SHOW_FPS = true;
class Engine {
public:
Engine(std::unique_ptr<Game> game, std::unique_ptr<Renderer> renderer);
void start_loop();
std::chrono::time_point<std::chrono::system_clock> render_fps(std::chrono::time_point<std::chrono::system_clock> end, std::chrono::time_point<std::chrono::system_clock> lastframe);
private:
std::unique_ptr<Game> game;
std::unique_ptr<Renderer> renderer;
};
#endif //RLA_IIPP_ENGINE_HPP