REDIVIVUS

Proposals / #902

Mac SELECT_GetDistanceSquared: __fastcc int32_t (D2UnitStrc * pUnit, D2UnitStrc * pUnit2)

applied · by KierTaylor · submitted 2026-11-02, applied 2026-11-02

Ghidra vmac 111 · 3c6740e

Mac body: ECX (EBX) and EDX (EDI) are each passed to the unit X and Y coordinate getters; it returns (x1-x2)^2 + (y1-y2)^2 in EAX; no stack arguments, plain RET. Windows twin SELECT_GetDistanceSquared 0x004673c0 is int32_t (D2UnitStrc * pUnit, D2UnitStrc * pUnit2); same order on Mac (ECX, EDX).

Changes 1, applied together

  1. Set prototype mac 0x0007b9fe

    signatureundefined SELECT_GetDistanceSquared(void)→int32_t SELECT_GetDistanceSquared(D2UnitStrc * pUnit, D2UnitStrc * pUnit2)
    conventionunknown→__fastcc