Exemplo n.º 1
0
        private static void DumpError(IntPtr luaState, string pExtInfo, string luaErrorString)
        {
            var e           = new StringBuilder();
            var stackBuffer = new StringBuilder(1024);

            XLUE.XLUE_GetLuaStack(luaState, stackBuffer, 1024);
            e.Append("\n")
            .Append("BOLT错误:")
            .Append("========")
            .Append("[错误信息]")
            .Append(pExtInfo)
            .Append(luaErrorString ?? "未知错误")
            .Append("[堆栈信息]")
            .Append("─────────\n")
            .Append(stackBuffer)
            .Append("─────────\n");
            DBG.DumpError(e.ToString());
        }
Exemplo n.º 2
0
        private static void Initialization(bool initXGP = false)
        {
            XLUE.XL_InitGraphicLib(0);
            XLUE.XL_SetFreeTypeEnabled(1);

            XLUE.XLUE_InitLoader(0);
            if (!initXGP)
            {
                return;
            }

            var size   = Marshal.SizeOf(typeof(XLGraphics.tagXLGraphicPlusParam));
            var ptr    = Marshal.AllocHGlobal(size);
            var strcut = new XLGraphics.tagXLGraphicPlusParam
            {
                bInitLua = true
            };

            Marshal.StructureToPtr(strcut, ptr, false);
            XLGraphics.XLGP_InitGraphicPlus(ptr);
        }
Exemplo n.º 3
0
 private static void LoadXar(String xarName)
 {
     XLUE.XLUE_LoadXAR(xarName);
 }
Exemplo n.º 4
0
 private static void AddXarSearchPath(String newFolderPath)
 {
     XLUE.XLUE_AddXARSearchPath(newFolderPath);
 }