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(pExtInfo) .Append(luaErrorString ?? "未知") .Append("─────────\n") .Append(stackBuffer) .Append("─────────\n"); DBG.DumpError(e.ToString()); }
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); }
private static void LoadXar(String xarName) { XLUE.XLUE_LoadXAR(xarName); }
private static void AddXarSearchPath(String newFolderPath) { XLUE.XLUE_AddXARSearchPath(newFolderPath); }