REDIVIVUS

Proposals / #1417

Restore the Mac unit-room clearer's unit argument and paired void result

checked · by eejitgames · submitted 2026-11-08

Mac0018f311 UNITS_ClearRoom is undefined(uint*), but its full110B body reads a unit's type/path and clears the corresponding room pointer. Paired Windows00620b50 ResetRoom already has void(D2UnitStrc*) and the same static2/4/5 and dynamic-path branches with halt0x87d. Restore that typed void contract, preserving chosen names and Mac one-stack cdecl rather than Windows RET4. The sole incoming Mac transfer0018e56f is E9 JMP, not CALL despite its xref label; full290B caller restores the frame and forwards the unchanged original unit argument. Full221B paired Windows removal caller supplies the same unit and ignores ResetRoom's result. Void follows this matched side-effect API, not leftover EAX.1416 edits only the separate setter leaf and is not assumed applied.

Changes 1, applied together

  1. Set prototype mac 0x0018f311

    signatureundefined UNITS_ClearRoom(uint * pUnit)→void UNITS_ClearRoom(D2UnitStrc * pUnit)
    convention__cdecl