Mac DRAW_CalcRoofLightPerspective: __fastcc void (pLightGrid, nTileX, nTileY, nDepth, nSplitSide, bBorderOnly)
Ghidra vmac 111 · 3c6740e
Mac body: ECX is the 6x6 light-entry grid written row by row (0x48-byte rows, 0xc-byte entries: intensity at +0, RGB at +1..+3, X/Y at +4/+8); EDX is shifted to 16.16 and stepped by 0x10000 per column (tile X); [EBP+8] plus the row index is shifted to 16.16 (tile Y); [EBP+0xc] selects perspective vs flat and is passed to the perspective call (depth); [EBP+0x10] is compared with 1/2 for the split-screen offset; [EBP+0x14] gates the border-only writes. Windows twin DRAW_CalcRoofLightPerspective 0x004de260 has the same six (nRow, nTileX, nTileY, nDepth, nSplitSide, bBorderOnly) in the same order.
Changes 1, applied together
Set prototype
mac 0x0005ff42signatureundefined DRAW_CalcRoofLightPerspective(void)→void DRAW_CalcRoofLightPerspective(D2GfxLightExStrc * pLightGrid, int32_t nTileX, int32_t nTileY, int32_t nDepth, int32_t nSplitSide, int32_t bBorderOnly)conventionunknown→__fastcc