REDIVIVUS

Proposals / #718

Name generic parameters of dialog string, DC6 draw, skill text, party and SID functions

applied · by dtchitt · submitted 2026-11-01, applied 2026-11-02

Ghidra v1805 · 8293ab3

Each name comes from the instruction that stores or forwards the value. AddStringData's are the pDialog->aStringData fields they fill. IMAGE_DrawDC6ImageOnScreen branches 1 to center and 2 to right-align. SKILLDESC_DrawTwoLineText's reach UI_DrawTextCentered's end X and color. UI_CloseTradeWindow toggles UI_INVENTORY after closing when ECX is nonzero. SendPlayerEvent's is the 0x5A kind 7 party code, confirmed by a live lan capture in the repo that holds my packet captures: byte [7] picks the text and the sender picks the color from it. SendRelationshipStatus sets or clears dwFlagMask's bits. NET_SID_CLIENT_GetRequiredAnswer indexes the same table by the same value as its siblings. Least proven: that last one, which rests on those siblings. Left out: NET_D2GS_CLIENT_Send_INT (26 callers with different opcodes), FORMS_SetGlobalFormImage (31 callers, only one read).

Changes 12, applied together

  1. Rename variable win 0x004b85f0 Stack[0xc]

    namenParam1→nLineType
  2. Rename variable win 0x004b85f0 Stack[0x10]

    namenParam→nFont
  3. Rename variable win 0x004b85f0 Stack[0x14]

    namenParam2→pfnOnClick
  4. Rename variable win 0x004b85f0 Stack[0x18]

    namenParam3→nCallbackParam
  5. Rename variable win 0x00502680 Stack[0x8]

    namenParam→nAlignment
  6. Rename variable win 0x004e9870 Stack[0xc]

    namenParam1→nXRight
  7. Rename variable win 0x004e9870 Stack[0x10]

    namenParam2→dwColor1
  8. Rename variable win 0x004e9870 Stack[0x14]

    namenParam3→dwColor2
  9. Rename variable win 0x004b8940 ECX

    namenParam→bToggleInventory
  10. Rename variable win 0x005a5690 Stack[0x8]

    namebParam→nPartyEventCode
  11. Rename variable win 0x0055b260 Stack[0xc]

    namenParam→bSet
  12. Rename variable win 0x00520bf0 CL

    namebParam→nPacketId