REDIVIVUS

Proposals / #770

Type the sprite-cache cleanup input as the existing DT1 library header

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

Ghidra v1804 · 39698f0

Win 005fe080 ECX is int32_t nParam, but its sole caller 00609e90 forwards the original D2TileLibraryHeaderStrc* unchanged at 00609ec9/cb. The target reads nTiles+268 and pTiles+272, advances 96 bytes per D2TileLibraryEntryStrc, and forwards each entry's pLruNode+92 to the exact typed LRU consumer before clearing pSubTiles+84 and pLruNode+92. The complete caller independently traverses the same header/entry/subtile layout. Retype only ECX to D2TileLibraryHeaderStrc* and rename generic nParam to pTileLibrary. Existing precise header/entry/LRU types match all accesses. Preserve void, fastcall, register storage, other names and all layouts. Full target/caller/consumer bytes match original Game.exe. No runtime or Mac-pair claim.

Changes 2, applied together

  1. Retype variable win 0x005fe080 ECX

    typeint32_t→D2TileLibraryHeaderStrc *
  2. Rename variable win 0x005fe080 ECX

    namenParam→pTileLibrary