REDIVIVUS

Proposals / #961

Mac GFX_RemoveStateOverlayAndReprioritize: __fastcc void (pUnit, D2GfxInfoStrc * pGfxInfo, void * pOverlay)

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

Ghidra vmac 111 · 3c6740e

Mac body: ECX (EDI) is the unit, passed with the overlay's state id to the state getters/setters; EDX is saved and is the gfx info whose +0x2c overlay list (entries linked by +0xa4, state at +0x38, kind at +0) is walked and re-prioritised; [EBP+8] is the removed overlay record (its +0x38 state id read, +0x8 cleared). Windows twin GFX_RemoveStateOverlayAndReprioritize 0x0046df40 is void (D2UnitStrc * pUnit, D2GfxInfoStrc * pGfxInfo, int32_t pOverlay); same order on Mac. The third argument is dereferenced, so it is a pointer; its record type is not named yet, hence void *.

Changes 1, applied together

  1. Set prototype mac 0x000643c0

    signatureundefined GFX_RemoveStateOverlayAndReprioritize(void)→void GFX_RemoveStateOverlayAndReprioritize(D2UnitStrc * pUnit, D2GfxInfoStrc * pGfxInfo, void * pOverlay)
    conventionunknown→__fastcc