REDIVIVUS

Proposals / #947

Mac D2WINFONT_BuildFontPath: __fastcc void (int32_t nFontIndex, char * szPathOut)

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

Ghidra vmac 111 · 3c6740e

Mac body: ECX (EDI) indexes the font-name table ([EBX + EDI*4 + 0x3887b8]) and is compared with 13 (Korean chat font special case); EDX is saved and used as the sprintf destination for 'DATA\\LOCAL\\Font\\{lang}\\{name}'; no stack arguments are read, so there is no buffer-size parameter on Mac; plain RET after the stack guard. Windows twin D2WINFONT_BuildFontPath 0x005013a0 is void (char * szPathOut, int32_t nFontIndex, int32_t nBufferSize); Mac passes the index first and drops the size.

Changes 1, applied together

  1. Set prototype mac 0x000473cf

    signatureundefined D2WINFONT_BuildFontPath(void)→void D2WINFONT_BuildFontPath(int32_t nFontIndex, char * szPathOut)
    conventionunknown→__fastcc