Initial commit: Complete open-source Decal rebuild
All 5 phases of the open-source Decal rebuild: Phase 1: 14 decompiled .NET projects (Interop.*, Adapter, FileService, DecalUtil) Phase 2: 10 native DLLs rewritten as C# COM servers with matching GUIDs - DecalDat, DHS, SpellFilter, DecalInput, DecalNet, DecalFilters - Decal.Core, DecalControls, DecalRender, D3DService Phase 3: C++ shims for Inject.DLL (D3D9 hooking) and LauncherHook.DLL Phase 4: DenAgent WinForms tray application Phase 5: WiX installer and build script 25 C# projects building with 0 errors. Native C++ projects require VS 2022 + Windows SDK (x86). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
commit
d1442e3747
1382 changed files with 170725 additions and 0 deletions
|
|
@ -0,0 +1,10 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Render;
|
||||
|
||||
[ComImport]
|
||||
[CoClass(typeof(HUDBackgroundClass))]
|
||||
[Guid("1B0AEBBF-D785-430F-B5B2-94FB0FABC2AF")]
|
||||
public interface HUDBackground : IHUDBackground
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1,111 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using Decal.Interop.Core;
|
||||
|
||||
namespace Decal.Interop.Render;
|
||||
|
||||
[ComImport]
|
||||
[TypeLibType(2)]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[Guid("218432A3-8960-4D91-BBC6-8CDC105C191E")]
|
||||
[ClassInterface(ClassInterfaceType.None)]
|
||||
public class HUDBackgroundClass : IHUDBackground, HUDBackground
|
||||
{
|
||||
[DispId(1610743808)]
|
||||
public virtual extern bool Lost
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743808)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610743811)]
|
||||
public virtual extern tagRECT Region
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743811)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743811)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610743825)]
|
||||
public virtual extern tagRECT Constraints
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743825)]
|
||||
[TypeLibFunc(64)]
|
||||
get;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[TypeLibFunc(64)]
|
||||
[DispId(1610743809)]
|
||||
public virtual extern void SetSurface([In][MarshalAs(UnmanagedType.IUnknown)] object pSurface);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743810)]
|
||||
[return: MarshalAs(UnmanagedType.IUnknown)]
|
||||
public virtual extern object GetSurface();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743813)]
|
||||
public virtual extern void Fill([In] ref tagRECT FillArea, int Color = 0);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743814)]
|
||||
public virtual extern void Clear([In] ref tagRECT ClearArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743815)]
|
||||
public virtual extern void BeginRender([In] bool bFilterTexture = false);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743816)]
|
||||
public virtual extern void EndRender();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743817)]
|
||||
public virtual extern void BeginText([In][MarshalAs(UnmanagedType.BStr)] string FontName, int lHeight, int lWeight, [In] bool bItalic = false);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743818)]
|
||||
public virtual extern void EndText();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743819)]
|
||||
public virtual extern void DrawPortalImage([In] int lPortalFile, ref tagRECT DestArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743820)]
|
||||
public virtual extern void DrawPortalImageEx([In] int lPortalFile, int lAlpha, ref tagRECT SrcArea, ref tagRECT DestArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743821)]
|
||||
public virtual extern void DrawImage([In] int pBuffer, int lSize, ref tagRECT DestRegion, int lColorKey);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743822)]
|
||||
public virtual extern void WriteText([In] ref tagRECT Region, int lColor, int lFormat, [MarshalAs(UnmanagedType.BStr)] string Text);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743823)]
|
||||
public virtual extern void TilePortalImage([In] int lPortalFile, ref tagRECT DestArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743824)]
|
||||
public virtual extern void TilePortalImageEx([In] int lPortalFile, ref tagRECT SrcArea, ref tagRECT DestArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743826)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
public virtual extern RenderTargetWrapper Constrain([In] ref tagRECT Region);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610809344)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
public virtual extern HUDBackground Clone();
|
||||
}
|
||||
10
Managed/Decal.Interop.Render/Decal.Interop.Render/HUDView.cs
Normal file
10
Managed/Decal.Interop.Render/Decal.Interop.Render/HUDView.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Render;
|
||||
|
||||
[ComImport]
|
||||
[CoClass(typeof(HUDViewClass))]
|
||||
[Guid("89D2D46A-FA62-466E-9D29-1A7344C30BD1")]
|
||||
public interface HUDView : IHUDView
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1,215 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using Decal.Interop.Core;
|
||||
|
||||
namespace Decal.Interop.Render;
|
||||
|
||||
[ComImport]
|
||||
[TypeLibType(2)]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[ClassInterface(ClassInterfaceType.None)]
|
||||
[Guid("EF810EF1-C843-4563-A3DE-19CE8BEEEEC0")]
|
||||
public class HUDViewClass : IHUDView, HUDView
|
||||
{
|
||||
[DispId(1610743808)]
|
||||
public virtual extern bool Lost
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743808)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610743811)]
|
||||
public virtual extern tagRECT Region
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743811)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743811)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610743825)]
|
||||
public virtual extern tagRECT Constraints
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[TypeLibFunc(64)]
|
||||
[DispId(1610743825)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610809345)]
|
||||
public virtual extern float ScaleFactor
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610809345)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610809345)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610809347)]
|
||||
public virtual extern bool Scaling
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610809347)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610809347)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610809349)]
|
||||
public virtual extern tagRECT ScaleRect
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610809349)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610874880)]
|
||||
public virtual extern int ID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874880)]
|
||||
[TypeLibFunc(64)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610874881)]
|
||||
public virtual extern bool Enabled
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874881)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874881)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610874884)]
|
||||
public virtual extern float Angle
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874884)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874884)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610874886)]
|
||||
public virtual extern int Alpha
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874886)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874886)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610874891)]
|
||||
public virtual extern bool IsClipped
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874891)]
|
||||
get;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743809)]
|
||||
[TypeLibFunc(64)]
|
||||
public virtual extern void SetSurface([In][MarshalAs(UnmanagedType.IUnknown)] object pSurface);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743810)]
|
||||
[return: MarshalAs(UnmanagedType.IUnknown)]
|
||||
public virtual extern object GetSurface();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743813)]
|
||||
public virtual extern void Fill([In] ref tagRECT FillArea, int Color = 0);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743814)]
|
||||
public virtual extern void Clear([In] ref tagRECT ClearArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743815)]
|
||||
public virtual extern void BeginRender([In] bool bFilterTexture = false);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743816)]
|
||||
public virtual extern void EndRender();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743817)]
|
||||
public virtual extern void BeginText([In][MarshalAs(UnmanagedType.BStr)] string FontName, int lHeight, int lWeight, [In] bool bItalic = false);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743818)]
|
||||
public virtual extern void EndText();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743819)]
|
||||
public virtual extern void DrawPortalImage([In] int lPortalFile, ref tagRECT DestArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743820)]
|
||||
public virtual extern void DrawPortalImageEx([In] int lPortalFile, int lAlpha, ref tagRECT SrcArea, ref tagRECT DestArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743821)]
|
||||
public virtual extern void DrawImage([In] int pBuffer, int lSize, ref tagRECT DestRegion, int lColorKey);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743822)]
|
||||
public virtual extern void WriteText([In] ref tagRECT Region, int lColor, int lFormat, [MarshalAs(UnmanagedType.BStr)] string Text);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743823)]
|
||||
public virtual extern void TilePortalImage([In] int lPortalFile, ref tagRECT DestArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743824)]
|
||||
public virtual extern void TilePortalImageEx([In] int lPortalFile, ref tagRECT SrcArea, ref tagRECT DestArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743826)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
public virtual extern RenderTargetWrapper Constrain([In] ref tagRECT Region);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610809344)]
|
||||
public virtual extern void ScaleTo([In] ref tagRECT pArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874883)]
|
||||
public virtual extern void SetBackground([In][MarshalAs(UnmanagedType.Interface)] HUDBackground pBackground);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874888)]
|
||||
public virtual extern void PushClipRegion([In] ref tagRECT Region);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874889)]
|
||||
public virtual extern void PopClipRegion();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874890)]
|
||||
public virtual extern void RemoveClipping();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874892)]
|
||||
public virtual extern void MeasureText([In][MarshalAs(UnmanagedType.BStr)] string Text, out tagRECT pRet);
|
||||
}
|
||||
|
|
@ -0,0 +1,110 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using Decal.Interop.Core;
|
||||
|
||||
namespace Decal.Interop.Render;
|
||||
|
||||
[ComImport]
|
||||
[Guid("1B0AEBBF-D785-430F-B5B2-94FB0FABC2AF")]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[TypeLibType(4288)]
|
||||
public interface IHUDBackground : IRenderTarget
|
||||
{
|
||||
[DispId(1610743808)]
|
||||
new bool Lost
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743808)]
|
||||
get;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743809)]
|
||||
[TypeLibFunc(64)]
|
||||
new void SetSurface([In][MarshalAs(UnmanagedType.IUnknown)] object pSurface);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743810)]
|
||||
[return: MarshalAs(UnmanagedType.IUnknown)]
|
||||
new object GetSurface();
|
||||
|
||||
[DispId(1610743811)]
|
||||
new tagRECT Region
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743811)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743811)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743813)]
|
||||
new void Fill([In] ref tagRECT FillArea, int Color = 0);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743814)]
|
||||
new void Clear([In] ref tagRECT ClearArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743815)]
|
||||
new void BeginRender([In] bool bFilterTexture = false);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743816)]
|
||||
new void EndRender();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743817)]
|
||||
new void BeginText([In][MarshalAs(UnmanagedType.BStr)] string FontName, int lHeight, int lWeight, [In] bool bItalic = false);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743818)]
|
||||
new void EndText();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743819)]
|
||||
new void DrawPortalImage([In] int lPortalFile, ref tagRECT DestArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743820)]
|
||||
new void DrawPortalImageEx([In] int lPortalFile, int lAlpha, ref tagRECT SrcArea, ref tagRECT DestArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743821)]
|
||||
new void DrawImage([In] int pBuffer, int lSize, ref tagRECT DestRegion, int lColorKey);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743822)]
|
||||
new void WriteText([In] ref tagRECT Region, int lColor, int lFormat, [MarshalAs(UnmanagedType.BStr)] string Text);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743823)]
|
||||
new void TilePortalImage([In] int lPortalFile, ref tagRECT DestArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743824)]
|
||||
new void TilePortalImageEx([In] int lPortalFile, ref tagRECT SrcArea, ref tagRECT DestArea);
|
||||
|
||||
[DispId(1610743825)]
|
||||
new tagRECT Constraints
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[TypeLibFunc(64)]
|
||||
[DispId(1610743825)]
|
||||
get;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743826)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
new RenderTargetWrapper Constrain([In] ref tagRECT Region);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610809344)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
HUDBackground Clone();
|
||||
}
|
||||
214
Managed/Decal.Interop.Render/Decal.Interop.Render/IHUDView.cs
Normal file
214
Managed/Decal.Interop.Render/Decal.Interop.Render/IHUDView.cs
Normal file
|
|
@ -0,0 +1,214 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using Decal.Interop.Core;
|
||||
|
||||
namespace Decal.Interop.Render;
|
||||
|
||||
[ComImport]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[Guid("89D2D46A-FA62-466E-9D29-1A7344C30BD1")]
|
||||
[TypeLibType(4288)]
|
||||
public interface IHUDView : IRenderScalable
|
||||
{
|
||||
[DispId(1610743808)]
|
||||
new bool Lost
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743808)]
|
||||
get;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743809)]
|
||||
[TypeLibFunc(64)]
|
||||
new void SetSurface([In][MarshalAs(UnmanagedType.IUnknown)] object pSurface);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743810)]
|
||||
[return: MarshalAs(UnmanagedType.IUnknown)]
|
||||
new object GetSurface();
|
||||
|
||||
[DispId(1610743811)]
|
||||
new tagRECT Region
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743811)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743811)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743813)]
|
||||
new void Fill([In] ref tagRECT FillArea, int Color = 0);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743814)]
|
||||
new void Clear([In] ref tagRECT ClearArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743815)]
|
||||
new void BeginRender([In] bool bFilterTexture = false);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743816)]
|
||||
new void EndRender();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743817)]
|
||||
new void BeginText([In][MarshalAs(UnmanagedType.BStr)] string FontName, int lHeight, int lWeight, [In] bool bItalic = false);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743818)]
|
||||
new void EndText();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743819)]
|
||||
new void DrawPortalImage([In] int lPortalFile, ref tagRECT DestArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743820)]
|
||||
new void DrawPortalImageEx([In] int lPortalFile, int lAlpha, ref tagRECT SrcArea, ref tagRECT DestArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743821)]
|
||||
new void DrawImage([In] int pBuffer, int lSize, ref tagRECT DestRegion, int lColorKey);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743822)]
|
||||
new void WriteText([In] ref tagRECT Region, int lColor, int lFormat, [MarshalAs(UnmanagedType.BStr)] string Text);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743823)]
|
||||
new void TilePortalImage([In] int lPortalFile, ref tagRECT DestArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743824)]
|
||||
new void TilePortalImageEx([In] int lPortalFile, ref tagRECT SrcArea, ref tagRECT DestArea);
|
||||
|
||||
[DispId(1610743825)]
|
||||
new tagRECT Constraints
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743825)]
|
||||
[TypeLibFunc(64)]
|
||||
get;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743826)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
new RenderTargetWrapper Constrain([In] ref tagRECT Region);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610809344)]
|
||||
new void ScaleTo([In] ref tagRECT pArea);
|
||||
|
||||
[DispId(1610809345)]
|
||||
new float ScaleFactor
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610809345)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610809345)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610809347)]
|
||||
new bool Scaling
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610809347)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610809347)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610809349)]
|
||||
new tagRECT ScaleRect
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610809349)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610874880)]
|
||||
int ID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[TypeLibFunc(64)]
|
||||
[DispId(1610874880)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610874881)]
|
||||
bool Enabled
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874881)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874881)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874883)]
|
||||
void SetBackground([In][MarshalAs(UnmanagedType.Interface)] HUDBackground pBackground);
|
||||
|
||||
[DispId(1610874884)]
|
||||
float Angle
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874884)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874884)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610874886)]
|
||||
int Alpha
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874886)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874886)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874888)]
|
||||
void PushClipRegion([In] ref tagRECT Region);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874889)]
|
||||
void PopClipRegion();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874890)]
|
||||
void RemoveClipping();
|
||||
|
||||
[DispId(1610874891)]
|
||||
bool IsClipped
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874891)]
|
||||
get;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874892)]
|
||||
void MeasureText([In][MarshalAs(UnmanagedType.BStr)] string Text, out tagRECT pRet);
|
||||
}
|
||||
|
|
@ -0,0 +1,141 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using Decal.Interop.Core;
|
||||
|
||||
namespace Decal.Interop.Render;
|
||||
|
||||
[ComImport]
|
||||
[TypeLibType(4288)]
|
||||
[Guid("66B36C61-0020-4FF8-A717-1B53F97556C7")]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public interface IRenderScalable : IRenderTarget
|
||||
{
|
||||
[DispId(1610743808)]
|
||||
new bool Lost
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743808)]
|
||||
get;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[TypeLibFunc(64)]
|
||||
[DispId(1610743809)]
|
||||
new void SetSurface([In][MarshalAs(UnmanagedType.IUnknown)] object pSurface);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743810)]
|
||||
[return: MarshalAs(UnmanagedType.IUnknown)]
|
||||
new object GetSurface();
|
||||
|
||||
[DispId(1610743811)]
|
||||
new tagRECT Region
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743811)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743811)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743813)]
|
||||
new void Fill([In] ref tagRECT FillArea, int Color = 0);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743814)]
|
||||
new void Clear([In] ref tagRECT ClearArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743815)]
|
||||
new void BeginRender([In] bool bFilterTexture = false);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743816)]
|
||||
new void EndRender();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743817)]
|
||||
new void BeginText([In][MarshalAs(UnmanagedType.BStr)] string FontName, int lHeight, int lWeight, [In] bool bItalic = false);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743818)]
|
||||
new void EndText();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743819)]
|
||||
new void DrawPortalImage([In] int lPortalFile, ref tagRECT DestArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743820)]
|
||||
new void DrawPortalImageEx([In] int lPortalFile, int lAlpha, ref tagRECT SrcArea, ref tagRECT DestArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743821)]
|
||||
new void DrawImage([In] int pBuffer, int lSize, ref tagRECT DestRegion, int lColorKey);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743822)]
|
||||
new void WriteText([In] ref tagRECT Region, int lColor, int lFormat, [MarshalAs(UnmanagedType.BStr)] string Text);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743823)]
|
||||
new void TilePortalImage([In] int lPortalFile, ref tagRECT DestArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743824)]
|
||||
new void TilePortalImageEx([In] int lPortalFile, ref tagRECT SrcArea, ref tagRECT DestArea);
|
||||
|
||||
[DispId(1610743825)]
|
||||
new tagRECT Constraints
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743825)]
|
||||
[TypeLibFunc(64)]
|
||||
get;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743826)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
new RenderTargetWrapper Constrain([In] ref tagRECT Region);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610809344)]
|
||||
void ScaleTo([In] ref tagRECT pArea);
|
||||
|
||||
[DispId(1610809345)]
|
||||
float ScaleFactor
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610809345)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610809345)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610809347)]
|
||||
bool Scaling
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610809347)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610809347)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610809349)]
|
||||
tagRECT ScaleRect
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610809349)]
|
||||
get;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using Decal.Interop.Core;
|
||||
using Decal.Interop.Inject;
|
||||
|
||||
namespace Decal.Interop.Render;
|
||||
|
||||
[ComImport]
|
||||
[TypeLibType(4288)]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[Guid("BB70ABAC-FF03-41FE-8714-C24692C10827")]
|
||||
public interface IRenderService
|
||||
{
|
||||
[DispId(1610743808)]
|
||||
object Device
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743808)]
|
||||
[return: MarshalAs(UnmanagedType.IUnknown)]
|
||||
get;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743809)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
HUDView CreateHUD([In] ref tagRECT pRegion);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743810)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
HUDBackground CreateBackground([In] ref tagRECT pRegion);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743811)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
HUDView EncapsulateHUD([In] ref tagPOINT Coords, [MarshalAs(UnmanagedType.IUnknown)] object pSurface);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743812)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
HUDBackground EncapsulateBackground([In] ref tagPOINT Coords, [MarshalAs(UnmanagedType.IUnknown)] object pSurface);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743813)]
|
||||
void RemoveHUD([In][MarshalAs(UnmanagedType.Interface)] HUDView pHUD);
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Render;
|
||||
|
||||
[ComImport]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[TypeLibType(4096)]
|
||||
[InterfaceType(2)]
|
||||
[Guid("3C49F52D-55FF-42D8-99B0-BB185E9A684F")]
|
||||
public interface IRenderServiceEvents
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1)]
|
||||
void DeviceLost();
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Render;
|
||||
|
||||
[ComVisible(false)]
|
||||
public delegate void IRenderServiceEvents_DeviceLostEventHandler();
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Render;
|
||||
|
||||
[TypeLibType(16)]
|
||||
[ComVisible(false)]
|
||||
public interface IRenderServiceEvents_Event
|
||||
{
|
||||
event IRenderServiceEvents_DeviceLostEventHandler DeviceLost;
|
||||
}
|
||||
|
|
@ -0,0 +1,154 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
using System.Threading;
|
||||
|
||||
namespace Decal.Interop.Render;
|
||||
|
||||
internal sealed class IRenderServiceEvents_EventProvider : IRenderServiceEvents_Event, IDisposable
|
||||
{
|
||||
private IConnectionPointContainer m_ConnectionPointContainer;
|
||||
|
||||
private ArrayList m_aEventSinkHelpers;
|
||||
|
||||
private IConnectionPoint m_ConnectionPoint;
|
||||
|
||||
private void Init()
|
||||
{
|
||||
IConnectionPoint ppCP = null;
|
||||
Guid riid = new Guid(new byte[16]
|
||||
{
|
||||
45, 245, 73, 60, 255, 85, 216, 66, 153, 176,
|
||||
187, 24, 94, 154, 104, 79
|
||||
});
|
||||
m_ConnectionPointContainer.FindConnectionPoint(ref riid, out ppCP);
|
||||
m_ConnectionPoint = ppCP;
|
||||
m_aEventSinkHelpers = new ArrayList();
|
||||
}
|
||||
|
||||
event IRenderServiceEvents_DeviceLostEventHandler IRenderServiceEvents_Event.DeviceLost
|
||||
{
|
||||
add
|
||||
{
|
||||
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_ConnectionPoint == null)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
IRenderServiceEvents_SinkHelper renderServiceEvents_SinkHelper = new IRenderServiceEvents_SinkHelper();
|
||||
int pdwCookie = 0;
|
||||
m_ConnectionPoint.Advise(renderServiceEvents_SinkHelper, out pdwCookie);
|
||||
renderServiceEvents_SinkHelper.m_dwCookie = pdwCookie;
|
||||
renderServiceEvents_SinkHelper.m_DeviceLostDelegate = value;
|
||||
m_aEventSinkHelpers.Add(renderServiceEvents_SinkHelper);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
remove
|
||||
{
|
||||
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_aEventSinkHelpers == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int count = m_aEventSinkHelpers.Count;
|
||||
int num = 0;
|
||||
if (0 >= count)
|
||||
{
|
||||
return;
|
||||
}
|
||||
do
|
||||
{
|
||||
IRenderServiceEvents_SinkHelper renderServiceEvents_SinkHelper = (IRenderServiceEvents_SinkHelper)m_aEventSinkHelpers[num];
|
||||
if (renderServiceEvents_SinkHelper.m_DeviceLostDelegate != null && ((renderServiceEvents_SinkHelper.m_DeviceLostDelegate.Equals(value) ? 1u : 0u) & 0xFFu) != 0)
|
||||
{
|
||||
m_aEventSinkHelpers.RemoveAt(num);
|
||||
m_ConnectionPoint.Unadvise(renderServiceEvents_SinkHelper.m_dwCookie);
|
||||
if (count <= 1)
|
||||
{
|
||||
Marshal.ReleaseComObject(m_ConnectionPoint);
|
||||
m_ConnectionPoint = null;
|
||||
m_aEventSinkHelpers = null;
|
||||
}
|
||||
break;
|
||||
}
|
||||
num++;
|
||||
}
|
||||
while (num < count);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public IRenderServiceEvents_EventProvider(object P_0)
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
m_ConnectionPointContainer = (IConnectionPointContainer)P_0;
|
||||
}
|
||||
|
||||
public void Finalize()
|
||||
{
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_ConnectionPoint == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int count = m_aEventSinkHelpers.Count;
|
||||
int num = 0;
|
||||
if (0 < count)
|
||||
{
|
||||
do
|
||||
{
|
||||
IRenderServiceEvents_SinkHelper renderServiceEvents_SinkHelper = (IRenderServiceEvents_SinkHelper)m_aEventSinkHelpers[num];
|
||||
m_ConnectionPoint.Unadvise(renderServiceEvents_SinkHelper.m_dwCookie);
|
||||
num++;
|
||||
}
|
||||
while (num < count);
|
||||
}
|
||||
Marshal.ReleaseComObject(m_ConnectionPoint);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
Finalize();
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Render;
|
||||
|
||||
[TypeLibType(TypeLibTypeFlags.FHidden)]
|
||||
[ClassInterface(ClassInterfaceType.None)]
|
||||
public sealed class IRenderServiceEvents_SinkHelper : IRenderServiceEvents
|
||||
{
|
||||
public IRenderServiceEvents_DeviceLostEventHandler m_DeviceLostDelegate;
|
||||
|
||||
public int m_dwCookie;
|
||||
|
||||
public void DeviceLost()
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
if (m_DeviceLostDelegate != null)
|
||||
{
|
||||
m_DeviceLostDelegate();
|
||||
}
|
||||
}
|
||||
|
||||
internal IRenderServiceEvents_SinkHelper()
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
m_dwCookie = 0;
|
||||
m_DeviceLostDelegate = null;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using Decal.Interop.Core;
|
||||
|
||||
namespace Decal.Interop.Render;
|
||||
|
||||
[ComImport]
|
||||
[Guid("F229E8CB-6F85-46F5-9C8A-8399F60A37CB")]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[TypeLibType(4288)]
|
||||
public interface IRenderTarget
|
||||
{
|
||||
[DispId(1610743808)]
|
||||
bool Lost
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743808)]
|
||||
get;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[TypeLibFunc(64)]
|
||||
[DispId(1610743809)]
|
||||
void SetSurface([In][MarshalAs(UnmanagedType.IUnknown)] object pSurface);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743810)]
|
||||
[return: MarshalAs(UnmanagedType.IUnknown)]
|
||||
object GetSurface();
|
||||
|
||||
[DispId(1610743811)]
|
||||
tagRECT Region
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743811)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743811)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743813)]
|
||||
void Fill([In] ref tagRECT FillArea, int Color = 0);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743814)]
|
||||
void Clear([In] ref tagRECT ClearArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743815)]
|
||||
void BeginRender([In] bool bFilterTexture = false);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743816)]
|
||||
void EndRender();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743817)]
|
||||
void BeginText([In][MarshalAs(UnmanagedType.BStr)] string FontName, int lHeight, int lWeight, [In] bool bItalic = false);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743818)]
|
||||
void EndText();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743819)]
|
||||
void DrawPortalImage([In] int lPortalFile, ref tagRECT DestArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743820)]
|
||||
void DrawPortalImageEx([In] int lPortalFile, int lAlpha, ref tagRECT SrcArea, ref tagRECT DestArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743821)]
|
||||
void DrawImage([In] int pBuffer, int lSize, ref tagRECT DestRegion, int lColorKey);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743822)]
|
||||
void WriteText([In] ref tagRECT Region, int lColor, int lFormat, [MarshalAs(UnmanagedType.BStr)] string Text);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743823)]
|
||||
void TilePortalImage([In] int lPortalFile, ref tagRECT DestArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743824)]
|
||||
void TilePortalImageEx([In] int lPortalFile, ref tagRECT SrcArea, ref tagRECT DestArea);
|
||||
|
||||
[DispId(1610743825)]
|
||||
tagRECT Constraints
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743825)]
|
||||
[TypeLibFunc(64)]
|
||||
get;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743826)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
RenderTargetWrapper Constrain([In] ref tagRECT Region);
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Render;
|
||||
|
||||
[ComImport]
|
||||
[CoClass(typeof(RenderServiceClass))]
|
||||
[Guid("BB70ABAC-FF03-41FE-8714-C24692C10827")]
|
||||
public interface RenderService : IRenderService, IRenderServiceEvents_Event
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using Decal.Interop.Core;
|
||||
using Decal.Interop.Inject;
|
||||
|
||||
namespace Decal.Interop.Render;
|
||||
|
||||
[ComImport]
|
||||
[TypeLibType(2)]
|
||||
[ClassInterface(ClassInterfaceType.None)]
|
||||
[ComSourceInterfaces("Decal.Interop.Render.IRenderServiceEvents\0\0")]
|
||||
[Guid("FB3C8286-88ED-4B4D-B413-94B40F346239")]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public class RenderServiceClass : IRenderService, RenderService, IRenderServiceEvents_Event
|
||||
{
|
||||
[DispId(1610743808)]
|
||||
public virtual extern object Device
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743808)]
|
||||
[return: MarshalAs(UnmanagedType.IUnknown)]
|
||||
get;
|
||||
}
|
||||
|
||||
public virtual extern event IRenderServiceEvents_DeviceLostEventHandler DeviceLost;
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743809)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
public virtual extern HUDView CreateHUD([In] ref tagRECT pRegion);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743810)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
public virtual extern HUDBackground CreateBackground([In] ref tagRECT pRegion);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743811)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
public virtual extern HUDView EncapsulateHUD([In] ref tagPOINT Coords, [MarshalAs(UnmanagedType.IUnknown)] object pSurface);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743812)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
public virtual extern HUDBackground EncapsulateBackground([In] ref tagPOINT Coords, [MarshalAs(UnmanagedType.IUnknown)] object pSurface);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743813)]
|
||||
public virtual extern void RemoveHUD([In][MarshalAs(UnmanagedType.Interface)] HUDView pHUD);
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Render;
|
||||
|
||||
[ComImport]
|
||||
[Guid("F229E8CB-6F85-46F5-9C8A-8399F60A37CB")]
|
||||
[CoClass(typeof(RenderTargetWrapperClass))]
|
||||
public interface RenderTargetWrapper : IRenderTarget
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using Decal.Interop.Core;
|
||||
|
||||
namespace Decal.Interop.Render;
|
||||
|
||||
[ComImport]
|
||||
[TypeLibType(2)]
|
||||
[ClassInterface(ClassInterfaceType.None)]
|
||||
[Guid("175D6713-E942-41C0-8BC9-90A565024F76")]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public class RenderTargetWrapperClass : IRenderTarget, RenderTargetWrapper
|
||||
{
|
||||
[DispId(1610743808)]
|
||||
public virtual extern bool Lost
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743808)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610743811)]
|
||||
public virtual extern tagRECT Region
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743811)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743811)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610743825)]
|
||||
public virtual extern tagRECT Constraints
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743825)]
|
||||
[TypeLibFunc(64)]
|
||||
get;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[TypeLibFunc(64)]
|
||||
[DispId(1610743809)]
|
||||
public virtual extern void SetSurface([In][MarshalAs(UnmanagedType.IUnknown)] object pSurface);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743810)]
|
||||
[return: MarshalAs(UnmanagedType.IUnknown)]
|
||||
public virtual extern object GetSurface();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743813)]
|
||||
public virtual extern void Fill([In] ref tagRECT FillArea, int Color = 0);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743814)]
|
||||
public virtual extern void Clear([In] ref tagRECT ClearArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743815)]
|
||||
public virtual extern void BeginRender([In] bool bFilterTexture = false);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743816)]
|
||||
public virtual extern void EndRender();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743817)]
|
||||
public virtual extern void BeginText([In][MarshalAs(UnmanagedType.BStr)] string FontName, int lHeight, int lWeight, [In] bool bItalic = false);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743818)]
|
||||
public virtual extern void EndText();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743819)]
|
||||
public virtual extern void DrawPortalImage([In] int lPortalFile, ref tagRECT DestArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743820)]
|
||||
public virtual extern void DrawPortalImageEx([In] int lPortalFile, int lAlpha, ref tagRECT SrcArea, ref tagRECT DestArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743821)]
|
||||
public virtual extern void DrawImage([In] int pBuffer, int lSize, ref tagRECT DestRegion, int lColorKey);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743822)]
|
||||
public virtual extern void WriteText([In] ref tagRECT Region, int lColor, int lFormat, [MarshalAs(UnmanagedType.BStr)] string Text);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743823)]
|
||||
public virtual extern void TilePortalImage([In] int lPortalFile, ref tagRECT DestArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743824)]
|
||||
public virtual extern void TilePortalImageEx([In] int lPortalFile, ref tagRECT SrcArea, ref tagRECT DestArea);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743826)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
public virtual extern RenderTargetWrapper Constrain([In] ref tagRECT Region);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue