refactor: add unmanaged to function pointers

This commit is contained in:
Anna 2022-01-28 04:31:26 -05:00
parent abd1ddd9cd
commit fab97a7a5f
3 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ internal sealed unsafe class Context {
var uiModule = Framework.Instance()->GetUiModule();
// 6.05: 20D722
var func = (delegate*<UIModule*, IntPtr>) uiModule->vfunc[33];
var func = (delegate* unmanaged<UIModule*, IntPtr>) uiModule->vfunc[33];
var toIndex = func(uiModule);
// 6.05: 20E4CB
var a1 = this.Plugin.Functions.Indexer(toIndex, 0x11);

View File

@ -174,7 +174,7 @@ internal unsafe class GameFunctions : IDisposable {
agent->AddonId = (uint) addon->ID;
// vcall from E8 ?? ?? ?? ?? 0F B7 C0 48 83 C4 60
var vf5 = (delegate*<AtkUnitBase*, byte, uint, void>*) ((IntPtr) addon->VTable + 40);
var vf5 = (delegate* unmanaged<AtkUnitBase*, byte, uint, void>*) ((IntPtr) addon->VTable + 40);
// E8872D: lets vf5 actually run
*(byte*) ((IntPtr) atkStage + 0x2B4) |= 2;
(*vf5)(addon, 0, 15);

View File

@ -31,7 +31,7 @@ internal sealed unsafe class Party {
var uiModule = Framework.Instance()->GetUiModule();
// 6.05: 20D722
var func = (delegate*<UIModule*, IntPtr>) uiModule->vfunc[33];
var func = (delegate* unmanaged<UIModule*, IntPtr>) uiModule->vfunc[33];
var toIndex = func(uiModule);
var a1 = this.Plugin.Functions.Indexer(toIndex, 1);