Mac D2COMP_ResolveWeaponClass: __fastcc int32_t (byte * pEquipData, int32_t nPlayerClassId)
Ghidra vmac 111 · 3c6740e
Mac body: ECX (EDI) is read as the equipment byte array (+5 right-hand item index, +6/+7 compared with 0xff for the other hands), used to pick the weapon-class token; EDX is saved and compared with 6 (the class whose two-handed swing differs), so it is the player class; the resolved class is returned in EAX; no stack arguments. Windows twin D2COMP_ResolveWeaponClass 0x00504af0 is int32_t (int32_t nPlayerClassId, byte * pEquipData); the Mac register order puts the equipment data first.
Changes 1, applied together
Set prototype
mac 0x00041531signatureundefined D2COMP_ResolveWeaponClass(void)→int32_t D2COMP_ResolveWeaponClass(byte * pEquipData, int32_t nPlayerClassId)conventionunknown→__fastcc