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>
This commit is contained in:
erik 2026-02-08 18:27:56 +01:00
commit d1442e3747
1382 changed files with 170725 additions and 0 deletions

View file

@ -0,0 +1,34 @@
# D3DService.DLL
## Origin
**Entirely new** — no corresponding code in the old source tree.
Provides a higher-level 3D graphics API that plugins can use to render 3D objects
in the game world (meshes, 3D text, transformed geometry).
## Binary Facts
- Size: **262 KB** (the largest of the new native modules)
- Type: COM in-process server (DLL)
- Standard 4 COM exports: `DllCanUnloadNow`, `DllGetClassObject`, `DllRegisterServer`, `DllUnregisterServer`
## Key Imports
| DLL | Functions |
|-----|-----------|
| **Inject.DLL** | `BeginSceneO`, `EndSceneO` |
| **d3dx9_30.dll** | `D3DXCreateRenderToSurface`, `D3DXLoadMeshFromXResource`, `D3DXLoadMeshFromXW`, `D3DXCreateTextW`, `D3DXMatrixTranslation`, `D3DXMatrixRotationY`, and others |
## What It Does
- Loads `.x` mesh files (from resources or from disk)
- Creates 3D text geometry
- Performs matrix transforms (translation, rotation)
- Renders to off-screen surfaces
- Essentially a "3D drawing toolkit" layered on top of Inject's scene hooks
## Reconstruction Notes
- **LOOK AT:** `Managed/Decal.Interop.D3DService/` for the COM interface definitions
this DLL must implement. That directory contains **8 decompiled C# files**.
- There is **no old source** to reference. This must be reimplemented from:
1. The COM interfaces defined in the interop assembly
2. Knowledge of the D3DX9 API calls it makes
3. Understanding of how `BeginSceneO`/`EndSceneO` work (see `Native/Inject/`)
- This is the most complex new module to reconstruct due to its size and the
lack of any prior source code.

View file

@ -0,0 +1,31 @@
# DHS.DLL (Decal Hotkey System)
## Origin
Factored out of the old **DecalInput.DLL** — the hotkey registration, detection,
and dispatch logic was extracted into its own COM server.
## Binary Facts
- Size: **139 KB**
- Type: COM in-process server (DLL)
- Standard 4 COM exports: `DllCanUnloadNow`, `DllGetClassObject`, `DllRegisterServer`, `DllUnregisterServer`
## What It Does
Manages hotkey bindings for Decal plugins — registering key combinations, detecting
when they are pressed, and firing events to the appropriate plugin. This was
previously part of DecalInput's responsibilities.
## Reconstruction Notes
- **COMPARE WITH:** The old source files:
- `Native/DecalInput/Hotkey.cpp`
- `Native/DecalInput/Hotkey.h`
The DHS module almost certainly started as a copy of that hotkey code, then was
expanded and wrapped in its own COM server.
- **LOOK AT:** `Managed/Decal.Interop.DHS/` for the COM interface definitions
this DLL must implement. That directory contains **13 decompiled C# files**.
- **Strategy:** Start by extracting the hotkey-related classes from the old
`DecalInput` source, then wrap them in the COM interfaces defined by the
interop assembly. The delta between old `Hotkey.cpp` and the new interop
interfaces will show what was added/changed.

View file

@ -0,0 +1,32 @@
# DecalRender.DLL
## Origin
Factored out of the old **Inject.DLL** — the rendering functionality (texture creation,
font rendering, surface blitting) that previously lived inside Inject was moved into
this dedicated COM server.
## Binary Facts
- Size: **108 KB**
- Type: COM in-process server (DLL)
- Standard 4 COM exports: `DllCanUnloadNow`, `DllGetClassObject`, `DllRegisterServer`, `DllUnregisterServer`
## Key Imports
| DLL | Functions |
|-----|-----------|
| **Inject.DLL** | `BeginSceneO`, `EndSceneO` |
| **d3dx9_30.dll** | `D3DXCreateTexture`, `D3DXLoadSurfaceFromMemory`, `D3DXCreateFontW`, and others |
## What It Does
Provides the 2D rendering layer for Decal's overlay UI — creating textures, loading
surfaces from memory, and drawing text with DirectX fonts. Inject.DLL hooks the
Direct3D scene begin/end, and DecalRender plugs into those hooks to draw.
## Reconstruction Notes
- **LOOK AT:** `Managed/Decal.Interop.Render/` for the COM interface definitions
this DLL must implement. That directory contains **19 decompiled C# files**
describing every interface, enum, and coclass.
- **LOOK AT:** The old `Native/Inject/` source for rendering code that was likely
moved here. Search for anything that touches `IDirect3DTexture9`, `ID3DXFont`,
surface blitting, etc.
- The interop assembly will define the exact vtable layout the managed side expects.
Every COM interface in `Decal.Interop.Render` maps to an interface this DLL exposes.

View file

@ -0,0 +1,31 @@
# SpellFilter.DLL
## Origin
**Entirely new** — no corresponding code in the old source tree.
A dedicated module for filtering and managing spell-related game data.
## Binary Facts
- Size: **185 KB**
- Type: COM in-process server (DLL)
- Standard 4 COM exports: `DllCanUnloadNow`, `DllGetClassObject`, `DllRegisterServer`, `DllUnregisterServer`
## What It Does
Provides spell filtering functionality for Asheron's Call — likely parsing spell
tables from the DAT files, categorizing spells, and letting plugins query/filter
spells by school, level, name, or other criteria.
## Reconstruction Notes
- **LOOK AT:** `Managed/Decal.Interop.SpellFilter/` for the COM interface definitions
this DLL must implement. That directory contains **20 decompiled C# files** — the
most of any interop assembly, suggesting a rich API surface.
- There is **no old source** to reference. This must be reimplemented from:
1. The COM interfaces defined in the interop assembly
2. Understanding of AC's spell data structures (from the DAT file format)
3. Possibly referencing `Native/DecalDat/` for how spell data was already
being parsed from DAT files
4. Possibly referencing `Native/DecalFilters/` for the general filtering
pattern used by Decal
- The 20 interop files suggest this module exposes multiple interfaces for
spell tables, individual spells, spell schools, filtering criteria, etc.