refactor: Refactorized whole project structure

This commit is contained in:
AURUMVORXX
2025-01-24 22:36:25 +03:00
parent d50f55086b
commit a479b5f85d
321 changed files with 288 additions and 219 deletions

40
source/main.cpp Normal file
View File

@@ -0,0 +1,40 @@
#include <sqapi.h>
#include <pybind11/embed.h>
#include "sqevents.h"
#include "sqconstants.h"
#include "squirrel/functions.h"
namespace py = pybind11;
py::scoped_interpreter guard{};
py::module_ pysys = py::module_::import("sys");
py::module_ g2o;
py::module_ scripts;
int main()
{
system("pause");
return 0;
}
extern "C" SQRESULT SQRAT_API sqmodule_load(HSQUIRRELVM vm, HSQAPI api)
{
SqModule::Initialize(vm, api);
Sqrat::DefaultVM::Set(vm);
try
{
registerSquirrelConstants();
registerSquirrelEvents();
g2o = py::module_::import("g2o");
scripts = py::module_::import("scripts");
}
catch (py::error_already_set &e)
{
pysys.attr("stderr").attr("write")(e.what());
}
return SQ_OK;
}