This commit is contained in:
YourWishes committed 2025-09-19 23:20:55 -05:00
1 parent 96fcddea30
commit 1d16c0ae68
12 files changed
+256 -39

No files matched your search

+18 -10
View File
@@ -7,25 +7,33 @@
using namespace Dawn;
std::shared_ptr<Engine> Engine::instance = nullptr;
std::shared_ptr<Engine> Engine::getInstance() {
if(!Engine::instance) {
Engine::instance = std::make_shared<Engine>();
}
return Engine::instance;
}
Engine::Engine() :
time(),
console()
console(),
display()
{
// console.registerCommand("echo", [](std::vector<std::string> &args) {
// if(args.size() == 0) {
// std::cout << "Usage: echo <message>" << std::endl;
// return;
// }
console.registerCommand("exit", [this](std::vector<std::string> &args) {
this->exitRequested = true;
});
}
// std::cout << args[0] << std::endl;
// });
// console.exec("echo");
bool_t Engine::isExitRequested() const {
return this->exitRequested;
}
void Engine::update(void) {
time.update();
console.update();
display.update();
}
Engine::~Engine() {