REDIVIVUS

Proposals / #955

Mac GFX_RemoveOverlayById: __cdecl void (D2UnitStrc * pUnit, int32_t nPreDraw, int32_t nOverlayId)

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

Ghidra vmac 111 · 3c6740e

Mac body reads [EBP+8] (null-checked, passed to the unit gfx-info getter and later in ECX) and [EBP+0x10] (range-checked against the overlay-table count at +0xbc0 and scaled by 0x84 to index the table); [EBP+0xc] is not read on Mac but sits between them, so the function has three stack arguments; no ECX/EDX input. Windows twin GFX_RemoveOverlayById 0x0046f0c0 is void (D2UnitStrc * pUnit, int32_t nPreDraw, int32_t nOverlayId); same order, with nPreDraw unused in the Mac body.

Changes 1, applied together

  1. Set prototype mac 0x00067bf2

    signatureundefined GFX_RemoveOverlayById(void)→void GFX_RemoveOverlayById(D2UnitStrc * pUnit, int32_t nPreDraw, int32_t nOverlayId)
    conventionunknown→__cdecl