REDIVIVUS

Proposals / #1151

Mac OBJMODE_SpawnMonsterWithFallback: void __fastcc (D2ObjectModeArg* pModeArg, int nMonClassId)

approved · by KierTaylor · submitted 2026-11-05, approved 2026-11-05

Mac 0x001f3636 is "undefined (void)", convention unknown. Entry: ESI=EDX tested JS and compared against the monstats record count (data tables +0xa80) = nMonClassId; EDI=ECX, with [EDI] = pGame and [EDI+4] = unit (passed to 0x0018f1ae then OBJMODE_CheckSpawnMonsterFromSkeletonActRestriction(ECX=room, EDX=ESI) at 0x001f3673, and as args 1-2 of the 0x001e2a05 spawn calls), i.e. the D2ObjectModeArg {pGame, pVictim} layout. No [EBP+n] reads; plain RET 0x001f3715; the early-exit paths leave EAX unset, so void. Mac-only helper (plate: no Windows twin); same ECX/EDX fastcc as its callee 0x001f3602.

Changes 1, applied together

  1. Set prototype mac 0x001f3636

    signatureundefined OBJMODE_SpawnMonsterWithFallback(void)→void OBJMODE_SpawnMonsterWithFallback(D2ObjectModeArg * pModeArg, int32_t nMonClassId)
    conventionunknown→__fastcc