REDIVIVUS

Proposals / #1679

Restore the paired unit-coordinate output helpers' void contract

checked · by eejitgames · submitted 2026-11-08

Both GetCoords functions declare short, but their normal exits retain branch-dependent EAX scratch values while coordinates are written through POINT*. Complete bodies and all 169 direct call continuations were checked, with 56 further native chunks to follow calls and branches. No coordinate-return use was found: 162 sites discard the result before caller return; six residual paths are in existing void wrappers, and one is in a uint8_t callback that writes AL itself. Restore void on Mac 0018ef1c and Windows 00620870, preserving inputs, names and their distinct calling conventions.

Changes 2, applied together

  1. Set prototype mac 0x0018ef1c

    signatureshort GetCoords(D2UnitStrc * pUnit, POINT * pPoint)→void GetCoords(D2UnitStrc * pUnit, POINT * pPoint)
    convention__cdecl
  2. Set prototype win 0x00620870

    signatureshort GetCoords(D2UnitStrc * pUnit, POINT * pPoint)→void GetCoords(D2UnitStrc * pUnit, POINT * pPoint)
    convention__stdcall