68 lines
3.2 KiB
C#
68 lines
3.2 KiB
C#
using System;
|
|
using System.Numerics;
|
|
using Auspex.Vfx.Native;
|
|
|
|
namespace Auspex.Vfx.Internal;
|
|
|
|
public static class VfxNativeBridge
|
|
{
|
|
public unsafe delegate VfxInitData* VfxInitDataCtorDelegate(VfxInitData* self);
|
|
|
|
public unsafe delegate VfxData* CreateVfxDelegate(byte* path, VfxInitData* init, byte a3, byte a4, float originX, float originY, float originZ, float sizeX, float sizeY, float sizeZ, float angle, float duration, int a13);
|
|
|
|
public unsafe delegate VfxData* CreateGameObjectVfxDelegate(byte* path, IntPtr target, IntPtr source, float a4, byte a5, ushort a6, byte a7);
|
|
|
|
public unsafe delegate void DestroyVfxDataDelegate(VfxData* self);
|
|
|
|
public unsafe delegate long UpdateVfxTransformDelegate(VfxResourceInstance* vfxInstance, Matrix4x4* transform);
|
|
|
|
public unsafe delegate long UpdateVfxColorDelegate(VfxResourceInstance* vfxInstance, float r, float g, float b, float a);
|
|
|
|
public unsafe delegate void RotateMatrixDelegate(Matrix4x4* matrix, float rotation);
|
|
|
|
public const string VfxInitDataCtorSig = "E8 ?? ?? ?? ?? 8D 57 06 48 8D 4C 24 ??";
|
|
|
|
public static VfxInitDataCtorDelegate VfxInitDataCtor;
|
|
|
|
public const string CreateVfxSig = "E8 ?? ?? ?? ?? 48 8B D8 48 8D 95";
|
|
|
|
public static CreateVfxDelegate CreateVfx;
|
|
|
|
public const string CreateGameObjectVfxSig = "E8 ?? ?? ?? ?? 48 8B D8 48 85 C0 74 27 B2 01";
|
|
|
|
public static CreateGameObjectVfxDelegate CreateGameObjectVfxInternal;
|
|
|
|
public const string DestroyVfxSig = "E8 ?? ?? ?? ?? 4D 89 A4 DE ?? ?? ?? ??";
|
|
|
|
public static DestroyVfxDataDelegate DestroyVfx;
|
|
|
|
public const string UpdateVfxTransformSig = "E8 ?? ?? ?? ?? EB 19 48 8B 0B";
|
|
|
|
public static UpdateVfxTransformDelegate UpdateVfxTransform;
|
|
|
|
public const string UpdateVfxColorSig = "E8 ?? ?? ?? ?? 8B 4B F3";
|
|
|
|
public static UpdateVfxColorDelegate UpdateVfxColor;
|
|
|
|
public const string RotateMatrixSig = "E8 ?? ?? ?? ?? 4C 8D 76 20";
|
|
|
|
public static RotateMatrixDelegate RotateMatrix;
|
|
|
|
internal static void Initialize()
|
|
{
|
|
VfxInitDataCtorDelegate vfxInitDataCtor = SigScanHelper.Scan<VfxInitDataCtorDelegate>("E8 ?? ?? ?? ?? 8D 57 06 48 8D 4C 24 ??", "VfxInitDataCtor");
|
|
CreateVfxDelegate createVfx = SigScanHelper.Scan<CreateVfxDelegate>("E8 ?? ?? ?? ?? 48 8B D8 48 8D 95", "CreateVfx");
|
|
CreateGameObjectVfxDelegate createGameObjectVfxInternal = SigScanHelper.Scan<CreateGameObjectVfxDelegate>("E8 ?? ?? ?? ?? 48 8B D8 48 85 C0 74 27 B2 01", "CreateGameObjectVfxInternal");
|
|
DestroyVfxDataDelegate destroyVfx = SigScanHelper.Scan<DestroyVfxDataDelegate>("E8 ?? ?? ?? ?? 4D 89 A4 DE ?? ?? ?? ??", "DestroyVfx");
|
|
UpdateVfxTransformDelegate updateVfxTransform = SigScanHelper.Scan<UpdateVfxTransformDelegate>("E8 ?? ?? ?? ?? EB 19 48 8B 0B", "UpdateVfxTransform");
|
|
UpdateVfxColorDelegate updateVfxColor = SigScanHelper.Scan<UpdateVfxColorDelegate>("E8 ?? ?? ?? ?? 8B 4B F3", "UpdateVfxColor");
|
|
RotateMatrixDelegate rotateMatrix = SigScanHelper.Scan<RotateMatrixDelegate>("E8 ?? ?? ?? ?? 4C 8D 76 20", "RotateMatrix");
|
|
VfxInitDataCtor = vfxInitDataCtor;
|
|
CreateVfx = createVfx;
|
|
CreateGameObjectVfxInternal = createGameObjectVfxInternal;
|
|
DestroyVfx = destroyVfx;
|
|
UpdateVfxTransform = updateVfxTransform;
|
|
UpdateVfxColor = updateVfxColor;
|
|
RotateMatrix = rotateMatrix;
|
|
}
|
|
}
|