REDIVIVUS

Proposals / #1377

Recover the Mac wide and ANSI text-box adapter contracts

checked · by eejitgames · submitted 2026-11-06

The Mac wide-text adapter has undefined pointer inputs/result; the ANSI adapter takes its text box as int* and declares void. Both complete bodies explicitly set full EAX=1 after the setter call (and ANSI guard check), so recover existing four-byte BOOL results. Type the receiver as D2WinTextBox* and wide input as WCHAR*, preserving cdecl and all chosen names, including pnParam. ANSI char*/line-style inputs already match native code. Windows twins corroborate the input roles. Core setter proposal1376 targets a different function; these ops recover only the adapters.

Changes 2, applied together

  1. Set prototype mac 0x0004e8bf

    signatureundefined D2WINTEXTBOX_SetTextW(undefined4 pTextBox, undefined4 wszText)→BOOL D2WINTEXTBOX_SetTextW(D2WinTextBox * pTextBox, WCHAR * wszText)
    convention__cdecl
  2. Set prototype mac 0x0004e80a

    signaturevoid D2WINTEXTBOX_SetTextFromAnsi(int * pnParam, char * szText, int32_t nLineStyle)→BOOL D2WINTEXTBOX_SetTextFromAnsi(D2WinTextBox * pnParam, char * szText, int32_t nLineStyle)
    convention__cdecl