mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-06-05 07:20:42 +00:00
26 lines
477 B
C++
26 lines
477 B
C++
#include <OpenDiablo2.Game/D2Engine.h>
|
|
|
|
|
|
OpenDiablo2::Game::D2Engine::D2Engine(const D2EngineConfig &config)
|
|
: config(config) {
|
|
gfx = std::make_unique<OpenDiablo2::System::D2Graphics>();
|
|
input = std::make_unique<OpenDiablo2::System::D2Input>();
|
|
}
|
|
|
|
void
|
|
OpenDiablo2::Game::D2Engine::Run() {
|
|
gfx->InitializeWindow();
|
|
|
|
while (isRunning) {
|
|
input->ProcessEvents();
|
|
if (input->QuitIsRequested()) {
|
|
isRunning = false;
|
|
break;
|
|
}
|
|
gfx->Clear();
|
|
|
|
gfx->Present();
|
|
}
|
|
}
|
|
|