REDIVIVUS

Proposals / #767

Recover the Mac grid rectangle tests with exact byte dimensions

applied · by Commit-Will · submitted 2026-11-01, applied 2026-11-02

Ghidra vmac 109 · 39698f0

Mac0016a7c4 and bounds wrapper0016a9d4 currently have no arguments and unknown conventions. Complete109/78-byte native bodies prove ECX existing D2InventoryGridInfoStrc*, EDX signedX, Stack4 signedY, Stack8 byteWidth, Stack12 byteHeight. Both zero-extend only the dimension bytes; grid width/height/cells are existing offsets8/9/12. Leaf returns fullEAX0 for an occupied cell and1 for an empty rectangle; wrapper returns full0 for bounds failure or forwards leafEAX. All2 leaf calls and4 wrapper calls prepare the same five semantic inputs and test fullEAX. Item-dimension producer independently writes bytes. Recover complete BOOL __fastcc signatures, with existing grid type and exact scalar widths/names. All declared native bodies/callers/providers and original Windows corroborating bytes checked. Windows custom arguments/metadata are not imported; shared layouts and selected names remain untouched.

Changes 2, applied together

  1. Set prototype mac 0x0016a7c4

    signatureundefined INVENTORY_IsGridRectEmpty(void)→BOOL INVENTORY_IsGridRectEmpty(D2InventoryGridInfoStrc * pGridInfo, int32_t nX, int32_t nY, byte nItemWidth, byte nItemHeight)
    conventionunknown→__fastcc
  2. Set prototype mac 0x0016a9d4

    signatureundefined INVENTORY_CheckItemFitsInGrid(void)→BOOL INVENTORY_CheckItemFitsInGrid(D2InventoryGridInfoStrc * pGridInfo, int32_t nX, int32_t nY, byte nItemWidth, byte nItemHeight)
    conventionunknown→__fastcc