REDIVIVUS

Proposals / #763

Mac: type pLevel in DRLGLEVEL_GetRoomExBounds and pDrlgMap in DRLGPRESET_SetPickedFileInDrlgMap

applied · by Captain-Fwiffo · submitted 2026-11-01, applied 2026-11-02

Ghidra vmac 108 · bc4e150

GetRoomExBounds walks pLevel+0x10 (D2DrlgLevelStrc.pRoomExFirst) through each room's +0x24 (pRoomExNext) and computes the min/max of the rooms' sCoords at +0x34/+0x38/+0x3c/+0x40, so pLevel is a D2DrlgLevelStrc *. SetPickedFileInDrlgMap writes its second argument to pDrlgMap+4, which is D2DrlgMapStrc.nRandomMapFileSelector (the randomly picked file index); the comment names its Windows twin 00666ec0. Same-width retypes of the first stack parameter; names kept; the min/max out-pointers stay int *. Mac callers were not traced.

Changes 2, applied together

  1. Retype variable mac 0x0014d0dd Stack[0x4]

    typeint→D2DrlgLevelStrc *
  2. Retype variable mac 0x001608e7 Stack[0x4]

    typeint→D2DrlgMapStrc *