REDIVIVUS

Proposals / #859

Type the sprite-cache queue operation's object and entry inputs

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

The EDX parameter of 0x005ff5b0 is already named pEntry, so the rename op no longer matches. The two retypes check out against the asm (ECX = global 0x0089db60 using D2GfxMemoryStrc fields 0xc/0x18/0x14/0x30/0x4c, EDX = entry node using flags/next/prev/lastAccess at 0xc/0x14/0x18/0x10); please resubmit them without the rename.

The sole original caller passes the exact initialized global cache object in ECX and an actual linked-entry node in EDX. The native constructor allocates 5120 entries of 28 bytes; the selector/allocator returns one of those nodes, separately storing its payload at +0. Both producer paths store that node in an opaque owner slot subsequently loaded by the caller. This helper uses cache fields and entry flags/timestamp/links through those exact inputs. Use the existing D2GfxMemoryStrc* and D2SpriteCacheEntryStrc* types, naming generic nParam2 as pEntry. Preserve the chosen names, void return and original two-register fastcall ABI.

Changes 3, applied together

  1. Retype variable win 0x005ff5b0 ECX

    typevoid *→D2GfxMemoryStrc *
  2. Retype variable win 0x005ff5b0 EDX

    typeint32_t→D2SpriteCacheEntryStrc *
  3. Rename variable win 0x005ff5b0 EDX

    namenParam2→pEntry