REDIVIVUS

Proposals / #1266

Mac SUNITINACTIVE_SaveInactiveUnit: void __fastcall (D2GameStrc* pGame ECX, D2UnitStrc* pUnit EDX)

checked · by KierTaylor · submitted 2026-11-06

The Mac prologue moves ECX to EDI (pGame, kept for the inactive-list lookup) and uses EDX as the unit (type compared at [EDX]; passed to UNITS_GetRoom 0x0018f1ae). Both callers in SERVER_GAME_UNIT_method (0x00282ab1, 0x00282acb) load ECX=[EBP+8] (pGame) and EDX=ESI (the unit) and do not read EAX afterwards (a JMP or a new call follows). The Windows twin 0x00542e10 has the same roles (pGame stack, pUnit EAX) and no return.

Changes 1, applied together

  1. Set prototype mac 0x00282b50

    signatureundefined SUNITINACTIVE_SaveInactiveUnit(void)→void SUNITINACTIVE_SaveInactiveUnit(D2GameStrc* pGame, D2UnitStrc* pUnit)
    conventionunknown→__fastcall