feat: update engine features
- WIP start/stop methods - Remove test module
This commit is contained in:
@@ -49,11 +49,38 @@ MscEngine::MscEngine(std::vector<std::shared_ptr<MscEngineModule>> modules)
|
||||
std::to_string(current_rev));
|
||||
}
|
||||
}
|
||||
|
||||
module.get()->onInitialize(*this);
|
||||
}
|
||||
|
||||
_modules = std::move(modules);
|
||||
}
|
||||
|
||||
void MscEngine::start()
|
||||
{
|
||||
if (_isRunning)
|
||||
return;
|
||||
|
||||
_isRunning = true;
|
||||
_lastUpdate = clock::now();
|
||||
|
||||
double accumulator = 0.0;
|
||||
constexpr double fixedDt = 1.0 / 30.0;
|
||||
|
||||
while (_isRunning)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
void MscEngine::stop()
|
||||
{
|
||||
if (!_isRunning)
|
||||
return;
|
||||
|
||||
_isRunning = false;
|
||||
}
|
||||
|
||||
MscEventBus &MscEngine::getBus()
|
||||
{
|
||||
return _bus;
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
#include "engine/modules/test1/test1.hpp"
|
||||
#include "engine/core/engine_module_api.hpp"
|
||||
#include "engine/utils/rev_range.hpp"
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
std::string Test1Module::getName() const { return "test1"; }
|
||||
|
||||
uint16_t Test1Module::getRev() const { return 1; }
|
||||
|
||||
const std::unordered_map<std::string, MscRevisionRange> &
|
||||
Test1Module::getDependencies() const
|
||||
{
|
||||
static const std::unordered_map<std::string, MscRevisionRange> deps{};
|
||||
return deps;
|
||||
}
|
||||
|
||||
void Test1Module::onInitialize(IMscEngineModuleAPI &engine)
|
||||
{
|
||||
(void)(engine);
|
||||
}
|
||||
Reference in New Issue
Block a user