REDIVIVUS

Proposals / #1281

Mac D2GFX_DrawPerspectiveImage: void __cdecl 7-arg (pData, nPosX, nPosY, dwGamma, nDrawMode, nScreenMode, pPalette)

checked · by KierTaylor · submitted 2026-11-06

The Mac body is a tail-jump wrapper (renderer table slot +0x8c, stack untouched). The caller DRAW_WORLD_Unit_1 0x000676dc stores seven slots: [ESP]=LEA of a local gfx-data block, [ESP+4]/[ESP+8]=x/y, [ESP+0xc]=gamma, [ESP+0x10]=5 (draw mode), [ESP+0x14], [ESP+0x18]. It JMPs away without testing EAX. Matches the Windows twin 0x004f6450 (pData, nPosX, nPosY, dwGamma, nDrawMode, nScreenMode, pPalette; void).

Changes 1, applied together

  1. Set prototype mac 0x002b55be

    signatureundefined D2GFX_DrawPerspectiveImage(void)→void D2GFX_DrawPerspectiveImage(D2GfxDataStrc* pData, int32_t nPosX, int32_t nPosY, DWORD dwGamma, int32_t nDrawMode, int32_t nScreenMode, BYTE* pPalette)
    conventionunknown→__cdecl