# haydntrigg/liberty architecture

> Architecture diagram of the GitHub repository haydntrigg/liberty, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/haydntrigg/liberty
- Repository: https://github.com/haydntrigg/liberty

## Overview

Liberty is a prototype export of Excalibur’s Freelancer decompilation, rather than a standalone end-user product. The tree is organized around reconstructed Freelancer executables and engine DLLs, alongside shared engine services. This map highlights the executable/server hosts, shared game and physics types, component management, file access, rendering, sound, and spline/curve support. Evidence is limited to the README, tree, and sampled excerpts; many modules are unsampled, so their runtime connections are intentionally not inferred.

Main entry points: [`Code/ReadFile/FileSys.h`](https://github.com/haydntrigg/liberty/blob/main/Code/ReadFile/FileSys.h) (File System), [`Code/RP8/NewRenderPipeline.cpp`](https://github.com/haydntrigg/liberty/blob/main/Code/RP8/NewRenderPipeline.cpp) (Render Pipeline), [`Code/FreeLancer/WinMain.cpp`](https://github.com/haydntrigg/liberty/blob/main/Code/FreeLancer/WinMain.cpp) (Freelancer Client), [`Code/FLServer/WinMain.cpp`](https://github.com/haydntrigg/liberty/blob/main/Code/FLServer/WinMain.cpp) (FL Server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_hosts["Game Hosts"]
  node_freelancer["Freelancer Client<br/>[WinMain.cpp]"]
  node_flserver["FL Server<br/>[WinMain.cpp]"]
  node_globalserver["Global Server<br/>[Program.cs]"]
  node_serverdll["Server Runtime<br/>[DllMain.cpp]"]
end

subgraph group_engine["Engine Services"]
  node_dacomanager["Component Manager<br/>[DACOManager.cpp]"]
  node_dacominterfaces["Component Interfaces<br/>[TComponent.h]"]
  node_filesystem["File System<br/>[FileSys.h]"]
  node_dosfilesystem["DOS File System<br/>[DOSFileSystem.h]"]
  node_baseutf["UTF File Access<br/>[BaseUTF.h]"]
  node_memfile["Memory Files<br/>[MemFile.h]"]
  node_searchpath["Search Paths<br/>[SearchPath.h]"]
  node_thorn["Curves and Splines<br/>[DllMain.cpp]"]
end

subgraph group_graphics["Graphics and Audio"]
  node_renderpipeline["Render Pipeline"]
  node_renderinterfaces["Render Interfaces<br/>[RenderPipeline.h]"]
  node_vertexbuffers["Vertex Buffers<br/>[RPVertexBuffer.h]"]
  node_indexbuffers["Index Buffers<br/>[RPIndexBuffer.h]"]
  node_textures["Texture Interfaces<br/>[RPTexture.h]"]
  node_soundmanager["Sound Manager<br/>[ISoundManager.h]"]
  node_soundruntime["Sound Runtime<br/>[SoundMan.cpp]"]
end

subgraph group_shared["Shared Game Runtime"]
  node_common["Common Runtime<br/>[Enums.hpp]"]
  node_archetypes["Equipment Archetypes<br/>[Engine.hpp]"]
  node_engineobject["Physics Objects<br/>[EngineObject.cpp]"]
end

node_freelancer -.->|"uses shared types"| node_common
node_flserver -.->|"uses server runtime"| node_serverdll
node_filesystem -->|"registers"| node_dosfilesystem
node_filesystem -->|"registers"| node_baseutf
node_filesystem -->|"registers"| node_memfile
node_filesystem -->|"registers"| node_searchpath
node_renderpipeline -->|"implements"| node_renderinterfaces
node_renderpipeline -->|"uses"| node_vertexbuffers
node_renderpipeline -->|"uses"| node_indexbuffers
node_renderpipeline -->|"uses"| node_textures
node_soundruntime -.->|"implements"| node_soundmanager
node_thorn -.->|"registers components"| node_dacomanager

click node_freelancer "https://github.com/haydntrigg/liberty/blob/main/Code/FreeLancer/WinMain.cpp"
click node_flserver "https://github.com/haydntrigg/liberty/blob/main/Code/FLServer/WinMain.cpp"
click node_globalserver "https://github.com/haydntrigg/liberty/blob/main/Code/GlobalServer/Program.cs"
click node_serverdll "https://github.com/haydntrigg/liberty/blob/main/Code/Server/DllMain.cpp"
click node_common "https://github.com/haydntrigg/liberty/blob/main/Code/Common/Include/Enums.hpp"
click node_archetypes "https://github.com/haydntrigg/liberty/blob/main/Code/Common/Include/Archetype/Root/Equipment/Engine.hpp"
click node_engineobject "https://github.com/haydntrigg/liberty/blob/main/Code/Common/Physics/EngineObject.cpp"
click node_dacomanager "https://github.com/haydntrigg/liberty/blob/main/Code/DACOM/DACOManager.cpp"
click node_dacominterfaces "https://github.com/haydntrigg/liberty/blob/main/Code/DACOM/TComponent.h"
click node_filesystem "https://github.com/haydntrigg/liberty/blob/main/Code/ReadFile/FileSys.h"
click node_dosfilesystem "https://github.com/haydntrigg/liberty/blob/main/Code/ReadFile/DOSFileSystem.h"
click node_baseutf "https://github.com/haydntrigg/liberty/blob/main/Code/ReadFile/BaseUTF.h"
click node_memfile "https://github.com/haydntrigg/liberty/blob/main/Code/ReadFile/MemFile.h"
click node_searchpath "https://github.com/haydntrigg/liberty/blob/main/Code/ReadFile/SearchPath.h"
click node_renderpipeline "https://github.com/haydntrigg/liberty/blob/main/Code/RP8/NewRenderPipeline.cpp"
click node_renderinterfaces "https://github.com/haydntrigg/liberty/blob/main/Code/RP8/RenderPipeline.h"
click node_vertexbuffers "https://github.com/haydntrigg/liberty/blob/main/Code/RP8/RPVertexBuffer.h"
click node_indexbuffers "https://github.com/haydntrigg/liberty/blob/main/Code/RP8/RPIndexBuffer.h"
click node_textures "https://github.com/haydntrigg/liberty/blob/main/Code/RP8/RPTexture.h"
click node_soundmanager "https://github.com/haydntrigg/liberty/blob/main/Code/Sound/ISoundManager.h"
click node_soundruntime "https://github.com/haydntrigg/liberty/blob/main/Code/Sound/SoundMan.cpp"
click node_thorn "https://github.com/haydntrigg/liberty/blob/main/Code/THORN/DllMain.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_freelancer,node_flserver,node_globalserver,node_serverdll toneBlue
class node_dacomanager,node_dacominterfaces,node_filesystem,node_dosfilesystem,node_baseutf,node_memfile,node_searchpath,node_thorn toneAmber
class node_renderpipeline,node_renderinterfaces,node_vertexbuffers,node_indexbuffers,node_textures,node_soundmanager,node_soundruntime toneMint
class node_common,node_archetypes,node_engineobject toneRose
```

## Components

### Game Hosts

- [Freelancer Client](https://github.com/haydntrigg/liberty/blob/main/Code/FreeLancer/WinMain.cpp): `Code/FreeLancer/WinMain.cpp`
- [FL Server](https://github.com/haydntrigg/liberty/blob/main/Code/FLServer/WinMain.cpp): `Code/FLServer/WinMain.cpp`
- [Global Server](https://github.com/haydntrigg/liberty/blob/main/Code/GlobalServer/Program.cs): `Code/GlobalServer/Program.cs`
- [Server Runtime](https://github.com/haydntrigg/liberty/blob/main/Code/Server/DllMain.cpp): `Code/Server/DllMain.cpp`

### Engine Services

- [Component Manager](https://github.com/haydntrigg/liberty/blob/main/Code/DACOM/DACOManager.cpp): `Code/DACOM/DACOManager.cpp`
- [Component Interfaces](https://github.com/haydntrigg/liberty/blob/main/Code/DACOM/TComponent.h): `Code/DACOM/TComponent.h`
- [File System](https://github.com/haydntrigg/liberty/blob/main/Code/ReadFile/FileSys.h): `Code/ReadFile/FileSys.h`
- [DOS File System](https://github.com/haydntrigg/liberty/blob/main/Code/ReadFile/DOSFileSystem.h): `Code/ReadFile/DOSFileSystem.h`
- [UTF File Access](https://github.com/haydntrigg/liberty/blob/main/Code/ReadFile/BaseUTF.h): `Code/ReadFile/BaseUTF.h`
- [Memory Files](https://github.com/haydntrigg/liberty/blob/main/Code/ReadFile/MemFile.h): `Code/ReadFile/MemFile.h`
- [Search Paths](https://github.com/haydntrigg/liberty/blob/main/Code/ReadFile/SearchPath.h): `Code/ReadFile/SearchPath.h`
- [Curves and Splines](https://github.com/haydntrigg/liberty/blob/main/Code/THORN/DllMain.cpp): `Code/THORN/DllMain.cpp`

### Graphics and Audio

- [Render Pipeline](https://github.com/haydntrigg/liberty/blob/main/Code/RP8/NewRenderPipeline.cpp): `Code/RP8/NewRenderPipeline.cpp`
- [Render Interfaces](https://github.com/haydntrigg/liberty/blob/main/Code/RP8/RenderPipeline.h): `Code/RP8/RenderPipeline.h`
- [Vertex Buffers](https://github.com/haydntrigg/liberty/blob/main/Code/RP8/RPVertexBuffer.h): `Code/RP8/RPVertexBuffer.h`
- [Index Buffers](https://github.com/haydntrigg/liberty/blob/main/Code/RP8/RPIndexBuffer.h): `Code/RP8/RPIndexBuffer.h`
- [Texture Interfaces](https://github.com/haydntrigg/liberty/blob/main/Code/RP8/RPTexture.h): `Code/RP8/RPTexture.h`
- [Sound Manager](https://github.com/haydntrigg/liberty/blob/main/Code/Sound/ISoundManager.h): `Code/Sound/ISoundManager.h`
- [Sound Runtime](https://github.com/haydntrigg/liberty/blob/main/Code/Sound/SoundMan.cpp): `Code/Sound/SoundMan.cpp`

### Shared Game Runtime

- [Common Runtime](https://github.com/haydntrigg/liberty/blob/main/Code/Common/Include/Enums.hpp): `Code/Common/Include/Enums.hpp`
- [Equipment Archetypes](https://github.com/haydntrigg/liberty/blob/main/Code/Common/Include/Archetype/Root/Equipment/Engine.hpp): `Code/Common/Include/Archetype/Root/Equipment/Engine.hpp`
- [Physics Objects](https://github.com/haydntrigg/liberty/blob/main/Code/Common/Physics/EngineObject.cpp): `Code/Common/Physics/EngineObject.cpp`

## Connections

- Freelancer Client → Common Runtime: uses shared types
- FL Server → Server Runtime: uses server runtime
- File System → DOS File System: registers (evidence: `Code/ReadFile/DllMain.cpp`)
- File System → UTF File Access: registers (evidence: `Code/ReadFile/DllMain.cpp`)
- File System → Memory Files: registers (evidence: `Code/ReadFile/DllMain.cpp`)
- File System → Search Paths: registers (evidence: `Code/ReadFile/DllMain.cpp`)
- Render Pipeline → Render Interfaces: implements (evidence: `Code/RP8/NewRenderPipeline.cpp`)
- Render Pipeline → Vertex Buffers: uses (evidence: `Code/RP8/NewRenderPipeline.cpp`)
- Render Pipeline → Index Buffers: uses (evidence: `Code/RP8/NewRenderPipeline.cpp`)
- Render Pipeline → Texture Interfaces: uses (evidence: `Code/RP8/NewRenderPipeline.cpp`)
- Sound Runtime → Sound Manager: implements
- Curves and Splines → Component Manager: registers components
