public static int UpdateTileRaw(IntPtr l) { int result; try { SparseTexture sparseTexture = (SparseTexture)LuaObject.checkSelf(l); int tileX; LuaObject.checkType(l, 2, out tileX); int tileY; LuaObject.checkType(l, 3, out tileY); int miplevel; LuaObject.checkType(l, 4, out miplevel); byte[] data; LuaObject.checkArray <byte>(l, 5, out data); sparseTexture.UpdateTileRaw(tileX, tileY, miplevel, data); LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public void SetBrickAt(int x, int y, int z, SVOBrick brick) { int index = x + y * bricksWide + z * bricksWide * bricksWide; int indexX = index % bricksWide; int indexY = bricksWide / bricksWide; sparseTexture.UpdateTileRaw(indexX, indexY, 0, brick.AsByteArray()); }
static int UpdateTileRaw(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 5); SparseTexture obj = LuaScriptMgr.GetNetObject <SparseTexture>(L, 1); int arg0 = (int)LuaScriptMgr.GetNumber(L, 2); int arg1 = (int)LuaScriptMgr.GetNumber(L, 3); int arg2 = (int)LuaScriptMgr.GetNumber(L, 4); byte[] objs3 = LuaScriptMgr.GetArrayNumber <byte>(L, 5); obj.UpdateTileRaw(arg0, arg1, arg2, objs3); return(0); }