REDIVIVUS

Proposals / #667

Mac unit timer accessors exchange individual timer records

applied · by Commit-Will · submitted 2026-11-01, applied 2026-11-01

Ghidra vmac 105 · 3bccb89

GetTimerList returns unit+0xdc or NULL; its paired setter stores the second stack argument there. The complete allocator takes a 0x30-byte record from a 600-record pool, initializes unit/GUID/type, links the getter's result at record+0x24 and passes that new record to the setter. Recycler supplies the record+0x24 successor; free/clear supply NULL. All six getter calls and four setter calls are audited, including consumers that read timer byte0/frame+4 and traverse +0x24. Existing D2TimerStrc is48 bytes; D2TimerListStrc is the28808-byte pool, not one head record. Correct only the getter return and setter Stack8 input to D2TimerStrc*, preserving chosen names, void setter return, cdecl and stack slots. Both complete accessors and all callers/producers verified from original Mac database bytes; Windows already has these record contracts. Shared unit/timer fields are held for wider audit. Static proof only.

Changes 2, applied together

  1. Set prototype mac 0x0027a244

    signatureD2TimerListStrc * GetTimerList(D2UnitStrc * pUnit)→D2TimerStrc * GetTimerList(D2UnitStrc * pUnit)
    convention__cdecl
  2. Retype variable mac 0x0027a22f Stack[0x8]

    typeD2TimerListStrc *→D2TimerStrc *