REDIVIVUS

Proposals / #1677

Type Mac GFX_AsyncLoadUnitSprites as void __fastcc (D2UnitStrc*, int, int32_t)

checked · by KierTaylor · submitted 2026-11-08

Register+stack function: ECX -> EBX is the unit (NULL-checked, flags +0xc8 tested, passed to unit getters), EDX -> EDI is the animation mode (both callers pass the per-mode loop index EBX after testing [ECX+EBX*4+0x50]), [EBP+8] is the async block id (callers store their nAsyncBlockId at [ESP], e.g. 0x00068f13-0x00068f16). The only exit returns XOR EAX,EAX (0x0006936c) and both callers ignore EAX (0x00067ac1 overwrites ECX/EDX and moves on), so void. Windows twin 0x0046fb60 is (int32_t nAsyncBlockId, D2UnitStrc* pUnit, int nAnimMode); mapped by role.

Changes 1, applied together

  1. Set prototype mac 0x00068fa1

    signatureundefined GFX_AsyncLoadUnitSprites(void)→void GFX_AsyncLoadUnitSprites(D2UnitStrc* pUnit, int nAnimMode, int32_t nAsyncBlockId)
    conventionunknown→__fastcc