REDIVIVUS

Proposals / #960

Mac GFX_PrecacheMonsterModeSprites: __fastcc void (D2UnitStrc * pUnit, int32_t nAsyncBlockId)

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

Ghidra vmac 111 · 3c6740e

Mac body: ECX is the unit (null-tested, flag byte +0xc8 bit 8, +0/+4 read, passed to the state-transform lookup); EDX is saved at entry and later pushed as the stack argument (async block) of GFX_AsyncLoadUnitSprites, which is called with ECX = unit, EDX = mode for each enabled mode (0x00068f13..0x00068f1e); no [EBP+n] reads and a single RET. Windows twin GFX_PrecacheMonsterModeSprites 0x0046feb0 is void (int32_t nAsyncBlockId, D2UnitStrc * pUnit); Mac passes the unit first.

Changes 1, applied together

  1. Set prototype mac 0x00068d66

    signatureundefined GFX_PrecacheMonsterModeSprites(void)→void GFX_PrecacheMonsterModeSprites(D2UnitStrc * pUnit, int32_t nAsyncBlockId)
    conventionunknown→__fastcc