REDIVIVUS

Proposals / #941

Mac WALL2_AddRoofTile: __fastcc void (pDrawList, pWall2Cell, pTileData, pRoom)

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

Ghidra vmac 111 · 3c6740e

Mac body: ECX (EDI) is the draw list (entry count at +0xea64, capped at 0xbb7, 0x14-byte entries, flags OR'd into +0); EDX is the cell whose +0x10 chain the new entry is appended to; [EBP+8] is stored as the entry's object and its +0x8/+0xc tile coordinates are scaled into the entry position, so it is the tile data; [EBP+0xc] is passed to the room-coordinates getter, so it is the room. Windows twin WALL2_AddRoofTile 0x004dd460 is void (pDrawList, pWall2Cell, pRoom, pTileData); the Mac stack order swaps the last two. The D2Wall2* structs do not exist in the Mac database, so those two are void * for now.

Changes 1, applied together

  1. Set prototype mac 0x0007ec22

    signatureundefined WALL2_AddRoofTile(void)→void WALL2_AddRoofTile(void * pDrawList, void * pWall2Cell, D2DrlgTileDataStrc * pTileData, D2RoomStrc * pRoom)
    conventionunknown→__fastcc