Mac D2WINFONT_DrawWideString: __fastcc void (wszText, nX, nY, nWidth, eGlobalPalette, bCenterHorizontally)
Ghidra vmac 111 · 3c6740e
Mac body: ECX (EDI) goes to wcslen and the text-width call and is walked as the string; EDX (ESI) is the X origin, to which (nWidth - textWidth)/2 is added when [EBP+0x14] is non-zero; [EBP+0xc] is that width; [EBP+8] and [EBP+0x10] are copied as the Y position and the palette for the glyph draw. Four stack slots, no others read. Windows twin D2WINFONT_DrawWideString 0x00501a80 is void (WCHAR * wszText, int32_t nX, int32_t nY, int32_t nWidth, GLOBALPALLETE eGlobalPalette, int32_t bCenterHorizontally); same order on Mac (ECX, EDX, then stack).
Changes 1, applied together
Set prototype
mac 0x0004817dsignatureundefined D2WINFONT_DrawWideString(void)→void D2WINFONT_DrawWideString(WCHAR * wszText, int32_t nX, int32_t nY, int32_t nWidth, GLOBALPALLETE eGlobalPalette, int32_t bCenterHorizontally)conventionunknown→__fastcc