REDIVIVUS

Proposals / #1218

Mac SERVER_CreatePlayerUnit: BOOL __fastcc (pGameStrc ECX, pClient EDX, ppUnitOut stack)

checked · by KierTaylor · submitted 2026-11-05

Mac 0x0020a7a1 is "undefined (void)", convention unknown. Entry: ECX saved to [EBP-0x10] and ESI (game; passed back as arg 1 of 0x00214836 at 0x0020a8fe-0x0020a90c), EBX=EDX passed alone to client accessors 0x001a8442/0x001a8863 (the client). The only stack argument [EBP+8] is an out pointer: MOV ESI,[EBP+8] ... MOV [ESI],EDI stores the new unit at 0x0020a911. Plain RET 0x0020a91a. Same three values as Windows twin 0x00532590 BOOL SERVER_CreatePlayerUnit(pGameStrc, D2ClientStrc* pClient, D2UnitStrc** ppUnitOut).

Changes 1, applied together

  1. Set prototype mac 0x0020a7a1

    signatureundefined SERVER_CreatePlayerUnit(void)→BOOL SERVER_CreatePlayerUnit(D2GameStrc * pGameStrc, D2ClientStrc * pClient, D2UnitStrc * * ppUnitOut)
    conventionunknown→__fastcc