-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathAbstractTypeClass.cs
43 lines (35 loc) · 1.24 KB
/
AbstractTypeClass.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace PatcherYRpp
{
public interface IOwnAbstractType
{
Pointer<AbstractTypeClass> AbstractType { get; }
}
public interface IOwnAbstractType<T> : IOwnAbstractType
{
Pointer<T> OwnType { get; }
}
[StructLayout(LayoutKind.Explicit, Size = 152, Pack = 1)]
public struct AbstractTypeClass
{
static public readonly IntPtr ArrayPointer = new IntPtr(0xA8E968);
static public YRPP.GLOBAL_DVC_ARRAY<AbstractTypeClass> ABSTRACTTYPE_ARRAY = new YRPP.GLOBAL_DVC_ARRAY<AbstractTypeClass>(ArrayPointer);
public unsafe bool LoadFromINI(Pointer<CCINIClass> pINI)
{
var func = (delegate* unmanaged[Thiscall]<ref AbstractTypeClass, IntPtr, Bool>)this.GetVirtualFunctionPointer(25);
return func(ref this, pINI);
}
[FieldOffset(0)]
public AbstractClass Base;
[FieldOffset(36)] public byte ID_first;
public AnsiStringPointer ID => Pointer<byte>.AsPointer(ref ID_first);
[FieldOffset(61)] public byte UINameLabel_first;
[FieldOffset(96)] public UniStringPointer UIName;
[FieldOffset(100)] public byte Name_first;
}
}