REDIVIVUS

Proposals / #764

Return flag-word pointers through the Mac state accessors

applied · by Commit-Will · submitted 2026-11-01, applied 2026-11-02

Ghidra vmac 109 · 39698f0

Mac 00196f20 GetStateFlags is declared undefined1, but its complete body returns full EAX as the existing int* StatsEx.pStateFlags address or null. Mac 00196f3e returns the second word-array half as full EAX, currently int32_t; checked wrapper0018a324 restores the original cdecl frame and tail-forwards to that same getter, also currently int32_t. Complete native allocation and all known code consumers prove the pointer contract independently on Mac. Set all three returns to existing int*, preserving chosen pUnit names, one stack argument, __cdecl, plain returns/tail transfer and all other metadata. Windows original bytes are read-only structural corroboration; no pending Windows operation is revisited. Static analysis only, with no Mac runtime, build or byte-match claim.

Changes 3, applied together

  1. Set prototype mac 0x00196f20

    signatureundefined1 GetStateFlags(D2UnitStrc * pUnit)→int * GetStateFlags(D2UnitStrc * pUnit)
    convention__cdecl
  2. Set prototype mac 0x00196f3e

    signatureint32_t STATLIST_GetUnitGfxFlags(D2UnitStrc * pUnit)→int * STATLIST_GetUnitGfxFlags(D2UnitStrc * pUnit)
    convention__cdecl
  3. Set prototype mac 0x0018a324

    signatureint32_t STATES_AssertGetGfxFlags(D2UnitStrc * pUnit)→int * STATES_AssertGetGfxFlags(D2UnitStrc * pUnit)
    convention__cdecl