1
0
This commit is contained in:
2026-01-06 21:24:47 +08:00
parent 6f4d23868c
commit 77cc14fa49
8 changed files with 148 additions and 100 deletions

View File

@@ -1,4 +1,5 @@
#include "dll_loader.hpp"
#include "command_client.hpp"
#include <basalt/char_types.hpp>
#include <basalt/kernel.hpp>
@@ -8,14 +9,20 @@ namespace Kernel = ::Basalt::Shared::Kernel;
int main(int argc, char* argv[]) {
auto engine_dll = Presenter::DllLoader(Presenter::DllKind::Engine, BSTEXT("BasaltDirectX11Engine"));
auto deliver_dll = Presenter::DllLoader(Presenter::DllKind::Deliver, BSTEXT("BasaltPipeDeliver"));
auto client = Presenter::CommandClient();
auto payload = client.WaitHandshake();
auto* engine = engine_dll.CreateInstance<Kernel::IEngine>();
auto* deliver = deliver_dll.CreateInstance<Kernel::IDeliver>();
Kernel::EngineConfig engine_config{.headless = false, .title = BSTEXT("Fuck You"), .width = 800, .height = 600};
Kernel::EngineConfig engine_config{.headless = false, .title = BSTEXT("Fuck You"), .width = payload.width, .height = payload.height};
engine->Startup(std::move(engine_config));
while (true) {
if (engine->Tick()) break;
auto req_stop = engine->Tick();
auto can_stop = client.Tick(req_stop);
if (can_stop) break;
}
engine->Shutdown();