REDIVIVUS

Proposals / #1538

gaTextStaticPopupRect (0x007bf1d0) is an {x, y} pair: int[2], not int

checked · by Nishimura-Katsuo · submitted 2026-11-08

TEXT_ShowStaticTextPopup writes x = 320 - nWidth/2 to 0x7bf1d0 and y = 100 - nHeight/4 to 0x7bf1d4. The only reader passes 0x7bf1d0 as the int* position to TEXT_DrawTextBoxWithBorderCheck, which reads [EDI] and [EDI+4]. Its other caller passes &rcBox.left of a RECT. 0x7bf1d4 is never read on its own, so it is the signed y, not a height. Ghidra types 0x7bf1d0 as a 4-byte int, so the rebuild (Source/D2Client/UI/Text.cpp:2225-2226) emits two separate statics, and pnPosition[1] (Text.cpp:2656) reads past a 4-byte object: undefined behaviour for every static text popup (packet 0x27, show type 3). In the loud build it reads the guard pattern, which is negative, so the popup is never drawn. Ask for the maintainer: delete the interior label gnTextStaticPopupHeight at 0x7bf1d4 so it is not emitted as its own static (the write at Text.cpp:7401 would stay detached otherwise).

Changes 1, applied together

  1. Retype global win 0x007bf1d0

    typeint (4 bytes)→int[2]