Update binding, update LuaJIT to Tarantool's fork.

This commit is contained in:
TSnake41 2021-02-16 22:25:45 +01:00
parent 7d11e0ea51
commit 89e0058bb4
7 changed files with 59 additions and 47 deletions

2
luajit

@ -1 +1 @@
Subproject commit a2a39ea7184f3c8cab9474c6e41f6541265fb362
Subproject commit c0c2e62a5404b51ba740ed28762e65b2ef56bcf9

2
raygui

@ -1 +1 @@
Subproject commit 28d7584fc1ad11aff3bb59de130ffca45b4dd7b3
Subproject commit 3627bb960a4df7e13dbf82fc8ace0e27ed2b072c

2
raylib

@ -1 +1 @@
Subproject commit 005bc4c4143f2b79ffc18fa98be144c905d2ce7f
Subproject commit 0f5aab3a1ca2ffaae6c6e784d485007d7d6e7182

View File

@ -623,6 +623,11 @@ ffi.cdef [[
} NPatchType;
typedef void (*TraceLogCallback)(int logType, const char *text, va_list args);
typedef void *(*MemAllocCallback)(int size);
typedef void *(*MemReallocCallback)(int size);
typedef void (*MemFreeCallback)(void *ptr);
typedef unsigned char* (*LoadFileDataCallback)(const char* fileName, unsigned int* bytesRead);
typedef char* (*LoadFileTextCallback)(const char* fileName);
]]
-- raymath cdef

View File

@ -16,7 +16,7 @@
local load = loadstring
raylua.version = "v3.5a"
raylua.version = "v3.5b"
function raylua.repl()
print("> raylua " .. raylua.version .. " <")

View File

@ -65,15 +65,19 @@ void SetTargetFPS(int fps)
int GetFPS(void)
float GetFrameTime(void)
double GetTime(void)
int GetRandomValue(int min, int max)
void TakeScreenshot(const char *fileName)
void SetConfigFlags(unsigned int flags)
void SetTraceLogLevel(int logType)
void SetTraceLogExit(int logType)
void SetTraceLogCallback(TraceLogCallback callback)
void TraceLog(int logType, const char *text, ...)
void SetTraceLogLevel(int logType)
void *MemAlloc(int size)
void MemFree(void *ptr)
void TakeScreenshot(const char *fileName)
int GetRandomValue(int min, int max)
void SetTraceLogCallback(TraceLogCallback callback)
//void SetMemAllocCallback(MemAllocCallback callback)
//void SetMemReallocCallback(MemReallocCallback callback)
//void SetMemFreeCallback(MemFreeCallback callback)
//void SetLoadFileDataCallback(LoadFileDataCallback callback)
//void SetLoadFileTextCallback(LoadFileDataCallback callback)
uint8_t *LoadFileData(const char *fileName, unsigned int *bytesRead)
void UnloadFileData(unsigned char *data)
bool SaveFileData(const char *fileName, void *data, unsigned int bytesToWrite)
@ -373,7 +377,6 @@ Mesh GenMeshCubicmap(Image cubicmap, Vector3 cubeSize)
BoundingBox MeshBoundingBox(Mesh mesh)
void MeshTangents(Mesh *mesh)
void MeshBinormals(Mesh *mesh)
void MeshNormalsSmooth(Mesh *mesh)
void DrawModel(Model model, Vector3 position, float scale, Color tint)
void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint)
void DrawModelWires(Model model, Vector3 position, float scale, Color tint)

View File

@ -14,7 +14,9 @@ local structs = {
"Ray", "RayHitInfo", "BoundingBox", "Wave", "Sound", "Music",
"AudioStream", "VrDeviceInfo", "Camera3D", "RenderTexture2D",
"TextureCubemap", "TraceLogCallback", "PhysicsBody",
"GestureEvent", "GuiStyle", "GuiTextBoxState"
"GestureEvent", "GuiStyle", "GuiTextBoxState",
"TraceLogCallback", "MemAllocCallback", "MemReallocCallback",
"MemFreeCallback", "LoadFileDataCallback"
}
local functions = {}
@ -46,43 +48,45 @@ end
for _,modname in ipairs(modules) do
for line in io.lines("tools/" .. modname .. ".h") do
if custom_support[modname] then
line = custom_support[modname](line)
if line:sub(0, 2) ~= "//" then
if custom_support[modname] then
line = custom_support[modname](line)
end
line = line:gsub("(%W)([%l%d][%w_]*)", function (before, part)
for i,keyword in ipairs(keywords) do
if part == keyword
or part == "t" then -- uintX_t workaround
return before .. part
end
end
return before
end)
line = line:gsub("%u%w+", function (part)
for i,struct in ipairs(structs) do
if part == struct then
return part
end
end
functions[#functions + 1] = part
counter = counter + 1
if count == 2 then
print("WARN: Multiple matches for: " .. line)
end
return "(*)"
end)
-- Strip spaces
line = line:gsub("([(),*.])%s+(%w)", function (a, b) return a .. b end)
line = line:gsub("(%w)%s+([(),*.])", function (a, b) return a .. b end)
proto[#proto + 1] = line
end
line = line:gsub("(%W)([%l%d][%w_]*)", function (before, part)
for i,keyword in ipairs(keywords) do
if part == keyword
or part == "t" then -- uintX_t workaround
return before .. part
end
end
return before
end)
line = line:gsub("%u%w+", function (part)
for i,struct in ipairs(structs) do
if part == struct then
return part
end
end
functions[#functions + 1] = part
counter = counter + 1
if count == 2 then
print("WARN: Multiple matches for: " .. line)
end
return "(*)"
end)
-- Strip spaces
line = line:gsub("([(),*.])%s+(%w)", function (a, b) return a .. b end)
line = line:gsub("(%w)%s+([(),*.])", function (a, b) return a .. b end)
proto[#proto + 1] = line
end
end