Commit graph

6 commits

Author SHA1 Message Date
erik
84e3cb5a77 Update docs with Phase 6 progress
CLAUDE.md: Update status to Phase 6 in progress, add new pitfalls
and key files discovered during verification.

PLAN.md: Mark Steps 1, 2, and 2b complete with results (50/50 CLSIDs,
13/13 DAT tests). Add DecalDat functional test as Step 2b.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 00:15:06 +01:00
erik
6a67ec2056 Add COM registration verification script
Test-ComRegistration.ps1 registers all 10 COM server DLLs via regasm
and verifies all 50 CLSIDs appear in the registry. Supports -Build
to compile first and -Unregister to clean up. Checks both native and
WOW6432Node registry paths for 32-bit COM on 64-bit Windows.

Result: 50/50 CLSIDs pass, 0 GUID mismatches vs original Decal.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 00:12:37 +01:00
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
erik
c0d1135431 Add CLAUDE.md for session continuity
Claude Code auto-loads this file at session start, giving full project
context so new sessions can pick up where we left off.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:31:04 +01:00
erik
a415c6d6ac Add project plan and next steps documentation
Covers all 5 completed phases, project structure, Phase 6 verification
strategy (bottom-up one-DLL-at-a-time testing), and known pitfalls.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:29:49 +01:00
erik
d1442e3747 Initial commit: Complete open-source Decal rebuild
All 5 phases of the open-source Decal rebuild:

Phase 1: 14 decompiled .NET projects (Interop.*, Adapter, FileService, DecalUtil)
Phase 2: 10 native DLLs rewritten as C# COM servers with matching GUIDs
  - DecalDat, DHS, SpellFilter, DecalInput, DecalNet, DecalFilters
  - Decal.Core, DecalControls, DecalRender, D3DService
Phase 3: C++ shims for Inject.DLL (D3D9 hooking) and LauncherHook.DLL
Phase 4: DenAgent WinForms tray application
Phase 5: WiX installer and build script

25 C# projects building with 0 errors.
Native C++ projects require VS 2022 + Windows SDK (x86).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:27:56 +01:00