2023-05-26 21:41:51 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <vector>
|
2023-05-27 17:11:46 +00:00
|
|
|
#include <chrono>
|
2023-06-01 17:27:14 +00:00
|
|
|
#include <freetype/freetype.h>
|
2023-05-26 21:41:51 +00:00
|
|
|
|
|
|
|
#include "../renderer/renderer.hpp"
|
|
|
|
#include "../callback.hpp"
|
|
|
|
|
|
|
|
namespace hibis {
|
|
|
|
class Engine {
|
|
|
|
public:
|
|
|
|
Engine(Renderer* renderer, LoggerCallback logger);
|
|
|
|
~Engine();
|
|
|
|
|
2023-06-26 14:08:19 +00:00
|
|
|
float calculateDelta(bool isPhysics);
|
2023-05-26 21:41:51 +00:00
|
|
|
|
2023-06-26 14:08:19 +00:00
|
|
|
void updateDelta(bool isPhysics);
|
2023-05-26 21:41:51 +00:00
|
|
|
|
|
|
|
const char* getEngineVersion();
|
2023-06-01 17:27:14 +00:00
|
|
|
|
|
|
|
FT_Library mFreeTypeLibrary;
|
2023-05-26 21:41:51 +00:00
|
|
|
private:
|
2023-05-27 19:47:34 +00:00
|
|
|
Renderer* mRenderer;
|
2023-05-26 21:41:51 +00:00
|
|
|
//StopWatch watch;
|
2023-05-27 19:47:34 +00:00
|
|
|
std::chrono::time_point<std::chrono::steady_clock> mPreviousProcessTick;
|
|
|
|
std::chrono::time_point<std::chrono::steady_clock> mPreviousPhysicsProcessTick;
|
2023-05-26 21:41:51 +00:00
|
|
|
|
2023-05-27 19:47:34 +00:00
|
|
|
LoggerCallback mLoggerCallback;
|
2023-05-26 21:41:51 +00:00
|
|
|
};
|
|
|
|
}
|