refactor: add unmanaged to function pointers
This commit is contained in:
parent
abd1ddd9cd
commit
fab97a7a5f
@ -40,7 +40,7 @@ internal sealed unsafe class Context {
|
|||||||
|
|
||||||
var uiModule = Framework.Instance()->GetUiModule();
|
var uiModule = Framework.Instance()->GetUiModule();
|
||||||
// 6.05: 20D722
|
// 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 toIndex = func(uiModule);
|
||||||
// 6.05: 20E4CB
|
// 6.05: 20E4CB
|
||||||
var a1 = this.Plugin.Functions.Indexer(toIndex, 0x11);
|
var a1 = this.Plugin.Functions.Indexer(toIndex, 0x11);
|
||||||
|
@ -174,7 +174,7 @@ internal unsafe class GameFunctions : IDisposable {
|
|||||||
agent->AddonId = (uint) addon->ID;
|
agent->AddonId = (uint) addon->ID;
|
||||||
|
|
||||||
// vcall from E8 ?? ?? ?? ?? 0F B7 C0 48 83 C4 60
|
// 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
|
// E8872D: lets vf5 actually run
|
||||||
*(byte*) ((IntPtr) atkStage + 0x2B4) |= 2;
|
*(byte*) ((IntPtr) atkStage + 0x2B4) |= 2;
|
||||||
(*vf5)(addon, 0, 15);
|
(*vf5)(addon, 0, 15);
|
||||||
|
@ -31,7 +31,7 @@ internal sealed unsafe class Party {
|
|||||||
|
|
||||||
var uiModule = Framework.Instance()->GetUiModule();
|
var uiModule = Framework.Instance()->GetUiModule();
|
||||||
// 6.05: 20D722
|
// 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 toIndex = func(uiModule);
|
||||||
var a1 = this.Plugin.Functions.Indexer(toIndex, 1);
|
var a1 = this.Plugin.Functions.Indexer(toIndex, 1);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user