diff --git a/LuaScript/Engine/LuaJitWorker.cs b/LuaScript/Engine/LuaJitWorker.cs index 72fd9df..bce7e37 100644 --- a/LuaScript/Engine/LuaJitWorker.cs +++ b/LuaScript/Engine/LuaJitWorker.cs @@ -259,8 +259,9 @@ namespace LuaScript.Engine double alpha = view.ReadDouble(rOff + 4 * 8); double aspect = view.ReadDouble(rOff + 5 * 8); double antialias = view.ReadDouble(rOff + 6 * 8); + double blend = view.ReadDouble(rOff + 7 * 8); - try { addDraw(new DrawCommand(ox, oy, oz, zoom, alpha, aspect, null, antialias)); } + try { addDraw(new DrawCommand(ox, oy, oz, zoom, alpha, aspect, null, antialias, blend)); } catch { } view.Write(NativeProtocol.OffCallbackFound, 1); } @@ -271,8 +272,9 @@ namespace LuaScript.Engine for (int i = 0; i < DrawPolyMath.Length; i++) poly[i] = view.ReadDouble(NativeProtocol.CallbackTagOffset + i * 8); double antialias = view.ReadDouble(NativeProtocol.CallbackTagOffset + DrawPolyMath.Length * 8); + double blend = view.ReadDouble(NativeProtocol.CallbackTagOffset + (DrawPolyMath.Length + 1) * 8); - try { addDraw(new DrawCommand(0d, 0d, 0d, 1d, poly[20], 0d, poly, antialias)); } + try { addDraw(new DrawCommand(0d, 0d, 0d, 1d, poly[20], 0d, poly, antialias, blend)); } catch { } view.Write(NativeProtocol.OffCallbackFound, 1); } diff --git a/native/worker.lua b/native/worker.lua index ab730a1..2bd00bd 100644 --- a/native/worker.lua +++ b/native/worker.lua @@ -326,6 +326,7 @@ function obj.draw(ox, oy, oz, zoom, alpha, aspect) cbResult[4] = alpha or 1 cbResult[5] = aspect or 0 cbResult[6] = options.antialias or 1 + cbResult[7] = options.blend or 0 i32[OFF_CB_KIND] = CB_KIND_DRAW i32[OFF_STATUS] = STATUS_CALLBACK k32.SetEvent(doneEvent) @@ -353,6 +354,7 @@ function obj.drawpoly(...) end cbTagD[20] = alpha cbTagD[21] = options.antialias or 1 + cbTagD[22] = options.blend or 0 i32[OFF_CB_KIND] = CB_KIND_DRAWPOLY i32[OFF_STATUS] = STATUS_CALLBACK k32.SetEvent(doneEvent)