FhCall update - #237
Conversation
... and everything that cascaded from there
by quickly doubleclicking the button
EvelynTSMG
left a comment
There was a problem hiding this comment.
A few changes here and there. I expect many more changes here after you work on fahrenheit-crew/fahrenheit#160, so do not bother doing these first.
| private FhModuleHandle<ArchipelagoFFXModule> _ffx_interop_handle; | ||
| private ArchipelagoFFXModule? _ffx_interop; | ||
|
|
||
| private FhMethodHandle<FhGCall.CT_RetInt> h_ret_doesChrKnowCommand => new(new FhMethodLocation("FFX.exe", 0x3A30C0)); |
| public enum CustomizationStatusEnum : byte { | ||
| NONE = 0x0, | ||
| AEON_AVAILABLE = 0x4, | ||
| AEON_ALREADY_LEARNED = 0x5, | ||
| AEON_CANNOT_LEARN_WITHOUT_KEY = 0x6, | ||
| AEON_NOT_ENOUGH_ITEMS = 0x7, | ||
|
|
||
| GEAR_AVAILABLE = 0xb, | ||
| GEAR_ALREADY_APPLIED = 0xc, | ||
| GEAR_NOT_ENOUGH_ITEMS = 0xe, | ||
| GEAR_CONFLICTING = 0xf, // (same group but lower level) or (same group, same level, different international bonus) or (international bonus is 0xfe AND gear has any ability with 0xff international bonus) | ||
| GEAR_NO_SLOTS = 0x10, | ||
| //NONE = 0x11 | ||
| } |
There was a problem hiding this comment.
You've ported the CustomizationStatusEnum from the deleted overdrive_delegates.cs, but not the MenuListEnum which you use later?
As a sidenote, as MenuListEnum was renamed to MenuList, so too should CustomizationStatusEnum be renamed to CustomizationStatus.
| // Drawing | ||
| public static TOMkpCrossExtMesFontLClutTypeRGBA _TOMkpCrossExtMesFontLClutTypeRGBA; | ||
| public static ToMakeBtlEasyFont _ToMakeBtlEasyFont; | ||
| public static void AtelSetUpCallFunc(int id, nint nameSpacePtr) => FhXCall.h_AtelSetUpCallFunc.fnptr!(id, nameSpacePtr); |
There was a problem hiding this comment.
Since this is based on #225, I do not believe we should add a static property like this, which is functionally just shorthand for a longer line.
| public static char* get_event_name(uint event_id) => FhXCall.h_AtelGetEventName.fnptr!(event_id); | ||
| public static int atel_stack_pop(int* param_1, AtelStack* atelStack) => FhXCall.h_AtelStackPop.fnptr!(param_1, atelStack); |
There was a problem hiding this comment.
Since this is based on #225, I do not believe we should add static properties like these, which are functionally just shorthand for a longer line.
|
|
||
| return _FUN_007905a0.orig_fptr(item_id, amount); | ||
| FhXCall.h_MsSaveItemUse.chain_from(h_give_item).fnptr!(item_id, amount); | ||
| return; |
| [UnmanagedFunctionPointer(CallingConvention.StdCall)] | ||
| public unsafe delegate nint FMOD_Bank_Post_Load(nint param_1, nint param_2, nint param_3, nint param_4); |
There was a problem hiding this comment.
Where is this used? Why isn't it Cdecl over StdCall?
Resolves #236
Blocked By #225 & fahrenheit-crew/fahrenheit#161