Open-source rebuild of the Decal plugin framework for Asheron's Call
Find a file
erik f0b6fedc9b Fix DecalDat to work with real AC DAT files
The DAT file reader had several bugs inherited from the old C++ reference
code, which targeted an older format version. Verified and fixed against
real client_portal.dat and client_cell_1.dat files:

- Fix header offset: BTree root is at 0x160, not 0x148 (file size field)
- Fix BTree entry size: 24 bytes (flags+id+offset+size+timestamp), not 12
- Fix sector-chain node reading: BTree nodes span multiple sectors via
  linked-list headers; must assemble node data across sector boundaries
- Fix DatStreamImpl.Read() BSTR handling: use Buffer.BlockCopy to match
  C++ SysAllocStringByteLen instead of Marshal.PtrToStringAnsi
- Fix DatStreamImpl.ReadBinary() pointer lifetime: inline fixed block to
  keep destination buffer pinned during Marshal.Copy
- Document LoadFilters() dependency on parameterized COM properties in
  IDecalCore.Configuration that need IDispatch to call correctly

Add smoke test project (13/13 tests pass against real DAT files).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 23:12:04 +01:00
docs Add project plan and next steps documentation 2026-02-08 18:29:49 +01:00
Installer Initial commit: Complete open-source Decal rebuild 2026-02-08 18:27:56 +01:00
Managed Fix DecalDat to work with real AC DAT files 2026-02-08 23:12:04 +01:00
Native Initial commit: Complete open-source Decal rebuild 2026-02-08 18:27:56 +01:00
NewNativeStubs Initial commit: Complete open-source Decal rebuild 2026-02-08 18:27:56 +01:00
.gitignore Initial commit: Complete open-source Decal rebuild 2026-02-08 18:27:56 +01:00
build.cmd Initial commit: Complete open-source Decal rebuild 2026-02-08 18:27:56 +01:00
CLAUDE.md Add CLAUDE.md for session continuity 2026-02-08 18:31:04 +01:00