REDIVIVUS

Proposals / #942

Mac WALL2_InsertUnitDraw: __fastcc void (void * pDrawList, void * pWall2Cell, D2UnitStrc * pUnit)

applied · by KierTaylor · submitted 2026-11-02, applied 2026-11-02

Ghidra vmac 111 · 3c6740e

Mac body: ECX (EDI) is the draw list (count at +0xea64, capped at 0xbb7, 0x14-byte entries); [EBP+8] (EBX) is a unit (dwUnitType at +0, path at +0x2c used for the X/Y position) stored as the entry object; EDX is saved and is the cell whose +0x10 chain the entry is appended to, exactly as in WALL2_AddRoofTile. Windows twin WALL2_InsertUnitDraw 0x004dd600 is void (D2Wall2CellStrc * pWall2Cell, D2UnitStrc * pUnit, D2Wall2DrawListStrc * pDrawList); the Mac order puts the draw list first. The D2Wall2* structs are missing on Mac, hence void *.

Changes 1, applied together

  1. Set prototype mac 0x0007ecc3

    signatureundefined WALL2_InsertUnitDraw(void)→void WALL2_InsertUnitDraw(void * pDrawList, void * pWall2Cell, D2UnitStrc * pUnit)
    conventionunknown→__fastcc