REDIVIVUS

Proposals / #1691

Restore the Mac velocity-stat initializer's unit/class register inputs

checked · by eejitgames · submitted 2026-11-08

Mac0018f83c is undefined(void)/unknown, but native entry saves incoming ECX as the unit and EDX as the signed character-class index. Both known E8callers load exactly those registers, then overwrite EAX. Full199B Mac/117B Win00620e80 bodies match: allocate flag4 statlist using unit memory/type/GUID, read196B CharStats walk/run bytes, set stat0x43 to100*run/walk-100 and attach list. No independent result is formed; Windows already declaresvoid. Restore void __fastcc(D2UnitStrc*,int32_t) on Mac only; preserve Windows custom EBX/EAX and both chosen names.

Changes 1, applied together

  1. Set prototype mac 0x0018f83c

    signatureundefined AddWalkVelocityStatIfExistToPlayer(void)→void AddWalkVelocityStatIfExistToPlayer(D2UnitStrc * pUnit, int32_t nPlayerClassId)
    conventionunknown→__fastcc