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

View File

@@ -0,0 +1,32 @@
#ifndef NONUT_CORE_BIND_H
#define NONUT_CORE_BIND_H
#include "CommonHeader.h"
#include <vector>
namespace nonut
{
//TODO: Finish Bind and remove placeholder
class Bind
{
public:
static void registerFunction(String funcName, const SQFUNCTION func, size_t funcSize)
{
HSQUIRRELVM vm = Sqrat::DefaultVM::Get();
const auto top = sq_gettop(vm);
sq_pushroottable(vm);
sq_pushstring(vm, funcName.c_str(), funcName.length());
sq_newclosure(vm, func, 0); //create a new function
sq_newslot(vm, -3, SQFalse);
sq_settop(vm, top);
}
//template<typename F>
//static void Function(String functionName, F& function)
//{
//
//}
};
}
#endif // NONUT_CORE_BIND_H