REDIVIVUS

Proposals / #1686

Recover the Mac owner-type/GUID setter's register and stack contract

checked · by eejitgames · submitted 2026-11-08

Mac 00190d10 StoreOwnerTypeAndGUID is stored as undefined(void)/unknown. Native code reads ECX=unit, EDX=owner type and the first stack DWORD=owner GUID, then updates unit ownership fields and stats. Both complete wrappers supply exactly those values and expose void APIs. The complete Windows counterpart has the same behavior and already returns void with different custom storage. Declare void __fastcc(D2UnitStrc*,eD2UnitType,int32_t), retaining the chosen name. No field, caller, ownership logic or Windows ABI changes.

Changes 1, applied together

  1. Set prototype mac 0x00190d10

    signatureundefined StoreOwnerTypeAndGUID(void)→void StoreOwnerTypeAndGUID(D2UnitStrc * pUnit, eD2UnitType eUnitType, int32_t nOwnerGUID)
    conventionunknown→__fastcc