REDIVIVUS

Proposals / #732

Type and name DRLGROOMTILE_FindTileAtPosition's room parameter

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

Ghidra v1803 · bc4e150

The first stack parameter dwParam2 is a D2RoomExStrc: the body tests +0x54 (pRoomTiles), uses +0x34 as a D2DrlgCoordsStrc (sCoords) and reads sCoords.x/y at +0x34/+0x38. Its only caller, DRLGROOMTILE_FindTileInNearRooms, pushes EDX = [EAX] (0x0066e5a6), an element of the room's ppDrlgRoomsExNear array (EAX = [EBX+8] + EDI*4 at 0x0066e590-96), i.e. a D2RoomExStrc *. Same-width retype; generic dwParam2 renamed pRoomEx.

Changes 2, applied together

  1. Retype variable win 0x0066e4c0 Stack[0x4]

    typeundefined4→D2RoomExStrc *
  2. Rename variable win 0x0066e4c0 Stack[0x4]

    namedwParam2→pRoomEx