REDIVIVUS

Proposals / #1680

Recover the Mac monster weapon accessor's pointer API and DWORD output locals

checked · by eejitgames · submitted 2026-11-08

Mac 00191e14 is stored as undefined(int*), but its complete native body accepts a unit, checks monster type and inventory, then returns an equipped D2UnitStrc* or NULL. Windows 00622830 has the same behavior and already declares that pointer API. The sole Mac caller preserves the full result and checks item unit type. The inventory callee writes DWORD body-location and primary-weapon outputs into two frame locals currently stored as one byte each. Recover the pointer input/result and those existing four-byte local types/names, preserving cdecl and chosen names. Function-name alignment and the stale no-Windows-twin plate remain for review.

Changes 5, applied together

  1. Set prototype mac 0x00191e14

    signatureundefined FUN_00191e14(int * pUnit)→D2UnitStrc * FUN_00191e14(D2UnitStrc * pUnit)
    convention__cdecl
  2. Retype variable mac 0x00191e14 Stack[-0xc]

    typeundefined→eD2BodyLocDWORD
  3. Rename variable mac 0x00191e14 Stack[-0xc]

    namelocal_c→eBodyLoc
  4. Retype variable mac 0x00191e14 Stack[-0x10]

    typeundefined→BOOL
  5. Rename variable mac 0x00191e14 Stack[-0x10]

    namelocal_10→bIsPrimary