REDIVIVUS

Proposals / #862

Type the LRU-removal helper's cache and entry register inputs

stale · by Commit-Will · submitted 2026-11-02

The register types are right (ECX is used as D2GfxMemoryStrc at +0x14/+0x1c/+0x20 and EAX as D2SpriteCacheEntryStrc at +0xc/+0x14/+0x18), but both parameters have since been named pGfxMemory and pEntry, so the rename ops no longer match. Please resubmit the two retype ops alone.

Both original callers pass a cache control object in ECX and a linked cache entry in EAX. The complete helper accesses normal/priority list heads and tails through ECX, and flags/next/previous fields through the original entry. The native initializer and 5120-slot allocation/selector/producer chain independently establish the existing D2GfxMemoryStrc and D2SpriteCacheEntryStrc identities; this does not depend on the pending caller correction. Replace the two integer input types and generic names coherently. Preserve the selected function name, void return, custom __cdecl convention and exact ECX:4/EAX:4 storage.

Changes 4, applied together

  1. Retype variable win 0x005ff1b0 ECX

    typeint32_t→D2GfxMemoryStrc *
  2. Retype variable win 0x005ff1b0 EAX

    typeint32_t→D2SpriteCacheEntryStrc *
  3. Rename variable win 0x005ff1b0 ECX

    namenParam1→pCache
  4. Rename variable win 0x005ff1b0 EAX

    namenParam2→pEntry