Files
dl_old/project/dl_test/head.cpp
T
2026-05-27 15:06:50 +08:00

96 lines
1.6 KiB
C++

#include "head.h"
#include "ui_main.h"
#include "game_sudo.h"
#include "game_match.h"
void Test()
{
}
Tool::Manager* g_Tool;
void Init()
{
g_Tool = Tool::Manager::Create();
g_Tool->SetVisible(false);
g_Tool->SetSwitchAll(true);
g_ui->SetStandardSize({ 800, 600 });
g_ui->RegisterAll("ui/");
g_scene->Add("main", new UIMain);
//g_scene->Add("game", new GameSudo);
//g_scene->Add("game_match", new GameMatch);
//g_scene->SetCurrent("game_match");
}
void Run()
{
g_Tool->Update();
g_Tool->Render();
}
void Release()
{
delete g_Tool;
}
int Main()
{
g_log->SetLogFile("log/");
//Engine::GetParamRef()._test = true;
Engine::Init();
Position p0;
Position p1{};
log_info("{}", to_string(p0));
log_info("{}", to_string(p1));
p0.x = 100;
p0.y = 200;
log_info("{}", to_string(p0));
Size s0;
s0.w = 800;
s0.h = 600;
log_info("{}", to_string(s0));
Quad q0{};
q0.x[0] = 1;
q0.y[0] = 2;
log_info("{}", to_string(q0));
{
FileIni ini;
ini.Open("ClientSetup.ini");
FileIniSection sec = ini.GetSection("Setup");
std::string v = sec.Get("HomePage");
}
Test();
g_mod->LoadModAll("mod/");
g_factory->SetPath("image/", "model/", "binary/", "temp/");
//g_factory->SetReleaseMode();
g_audio->Init("sound/config.json");
g_time->SetFPS(0);
g_system->SetFuncInit(Init);
g_system->SetFuncRun(Run);
#if DL_PLATFORM == DL_PLATFORM_ANDROID
//g_system->SetWindowDirection(WindowDirection::RIGHT);
#endif
ParamWindow p;
p._size = { 800, 600 };// { 1920, 1080 };
p._fullScreenMode = FullScreenMode::WINDOW;
g_system->Start(p);
Release();
Engine::Release();
return 0;
}