REDIVIVUS

Proposals / #1440

Mac SpawnUnitByType: D2UnitStrc* __cdecl 8-arg (pGame, pRoom, eUnitType, nClassId, nX, nY, bInitItem, dwUnused)

checked · by KierTaylor · submitted 2026-11-08

Resubmit of #1256 with 8 args, as the reviewer asked. SUNITINACTIVE_RoomInit 0x002823a8 passes an 8th dword at [ESP+0x1c], the same unread dwParam8 the Windows twin 0x005557d0 keeps. The seven roles are unchanged, [EBP+8]..[EBP+0x20]. It returns the unit; the caller 0x00279aa9 tests EAX. The checker refuses the default-like name dwParam8, so the slot is named dwUnused.

Changes 1, applied together

  1. Set prototype mac 0x002798db

    signatureundefined SpawnUnitByType(void)→D2UnitStrc* SpawnUnitByType(D2GameStrc* pGame, D2RoomStrc* pRoom, eD2UnitType eUnitType, int nClassId, int32_t nX, int32_t nY, int32_t bInitItem, uint32_t dwUnused)
    conventionunknown→__cdecl