#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(); //base->txt->Render(); /*base->spr->Render(); base->txt->Render(); base->spr_logo->Render();*/ //g_gfx->Dot({ 400, 300, 0.5f }); //g_gfx->Line({ 20, 20, 0 }, { 800, 600, 0 }); //g_gfx->Triangle({ 400, 10, 0 }, { 10, 500, 0 }, { 750, 550, 0 }); //g_gfx->TriangleSolid({ 0, 0, 0 }, { 100, 0, 0 }, { 10, 250, 0 }); //g_gfx->Love(); //base->spr9->Render(); } void Release() { delete g_Tool; } int Main() { g_log->SetLogFile("log/"); 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 = { 1920, 1080 }; p._fullScreenMode = FullScreenMode::WINDOW; g_system->Start(p); Release(); Engine::Release(); return 0; }