Mac: type DRLG level/room parameters in three Outdoor/RoomTile/RoomEx helpers (GetPresetCoord, ShadowTile, Overlap)
Ghidra vmac 108 · bc4e150
All parameters are int-typed DRLG structs, identified from the Mac bodies. GetPresetCoordFromGrid: pLevel+0x14 (D2DrlgLevelStrc.pDrlgLevelData) is the wilderness data whose grids at +0x2c / +4 it reads. CreateShadowTileData: pRoomEx+0x54 (D2RoomExStrc.pRoomTiles) feeds the shadow tile array, and +0x34/+0x38 (sCoords) are subtracted from the tile position. CheckNotOverlappingLevelRooms: pLevel+0x10 (pRoomExFirst) is walked by +0x24 (pRoomExNext), pRoomEx and pIgnoreRoomEx are compared with each element and their +0x34 (sCoords) is passed to the overlap check. The Mac D2RoomExStrc / D2DrlgLevelStrc layouts match these offsets. Windows twins are named in the first two comments (00674120, 0066df40). Same-width retypes; names kept; the unrelated stack parameters (coordinates, flags) are untouched. Mac callers were not traced.
Changes 5, applied together
Retype variable
mac 0x0015453a Stack[0x4]typeint→D2DrlgLevelStrc *Retype variable
mac 0x00161a23 Stack[0x4]typeint→D2RoomExStrc *Retype variable
mac 0x0014fd90 Stack[0x4]typeint→D2DrlgLevelStrc *Retype variable
mac 0x0014fd90 Stack[0x8]typeint→D2RoomExStrc *Retype variable
mac 0x0014fd90 Stack[0xc]typeint→D2RoomExStrc *