# gaming-with-portals/cruelerthandat architecture

> Architecture diagram of the GitHub repository gaming-with-portals/cruelerthandat, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gaming-with-portals/cruelerthandat
- Repository: https://github.com/gaming-with-portals/cruelerthandat

## Overview

CruelerThanDAT is a desktop tool for viewing and editing game assets across several titles. Its central workflow is opening game files, inspecting them in the application, and editing or extracting supported content. The README also documents model and scene viewing, multiple file editors, audio ripping, and CPK browsing. The excerpts show CPK table parsing and WMB4 parsing, but do not expose the application’s main dispatch or most editor implementations; uncertain connections are therefore omitted.

Main entry points: [`CruelerThanDAT/src/CPKManager.cpp`](https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/src/CPKManager.cpp) (CPK Browser), [`CruelerThanDAT/CruelerThanDAT.cpp`](https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/CruelerThanDAT.cpp) (Desktop Application), [`CruelerThanDAT/inc/FileNodes.h`](https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/inc/FileNodes.h) (Open File UI), [`CruelerThanDAT/inc/BinaryHandler.h`](https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/inc/BinaryHandler.h) (Binary I/O)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_appentry["Desktop Application<br/>[CruelerThanDAT.cpp]"]
  node_filebrowser["Open File UI<br/>[FileNodes.h]"]
  node_filetree["File Nodes<br/>[FileNodes.cpp]"]
end

subgraph group_assets["Asset Viewing"]
  node_wmbview["WMB/SCR Viewer<br/>[WMBModel.h]"]
  node_wmbparser["WMB Parser<br/>[WMBParser.cpp]"]
  node_texture["Texture Handling<br/>[TextureHelper.cpp]"]
  node_camera["Model Camera<br/>[Camera.cpp]"]
end

subgraph group_editing["File Editing"]
  node_dat["DAT Editor<br/>[CTDDocument.h]"]
  node_bxm["BXM Editor<br/>[CTDDocument.h]"]
  node_ly2["LY2 Editor<br/>[CTDDocument.h]"]
end

subgraph group_archives["Archives And Audio"]
  node_bnkview["BNK Viewer<br/>[wwise.cpp]"]
  node_wemrip["WEM Ripping<br/>[wwise.cpp]"]
  node_cpk["CPK Browser<br/>[CPKManager.cpp]"]
  node_cpkdata["CPK Contents<br/>[CPKManager.h]"]
end

subgraph group_core["Shared Runtime"]
  node_binary["Binary I/O<br/>[BinaryHandler.h]"]
  node_files["File Utilities<br/>[FileUtils.cpp]"]
  node_settings["Settings And Model<br/>[CTDSettings.h]"]
end

node_user(("User"))

node_user -->|"uses"| node_appentry
node_appentry -->|"presents"| node_filebrowser
node_filebrowser -->|"opens files"| node_filetree
node_wmbparser -->|"reads bytes"| node_binary
node_cpk -->|"parses tables"| node_binary
node_cpk -->|"builds contents"| node_cpkdata
node_cpk -->|"extracts files"| node_files

click node_appentry "https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/CruelerThanDAT.cpp"
click node_filebrowser "https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/inc/FileNodes.h"
click node_filetree "https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/src/FileNodes.cpp"
click node_wmbview "https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/inc/WMB/WMBModel.h"
click node_wmbparser "https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/src/WMB/WMBParser.cpp"
click node_texture "https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/src/TextureHelper.cpp"
click node_camera "https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/src/Camera.cpp"
click node_dat "https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/inc/CTDDocument.h"
click node_bxm "https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/inc/CTDDocument.h"
click node_ly2 "https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/inc/CTDDocument.h"
click node_bnkview "https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/src/Wwise/wwise.cpp"
click node_wemrip "https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/src/Wwise/wwise.cpp"
click node_cpk "https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/src/CPKManager.cpp"
click node_cpkdata "https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/inc/CPKManager.h"
click node_binary "https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/inc/BinaryHandler.h"
click node_files "https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/src/FileUtils.cpp"
click node_settings "https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/inc/CTDSettings.h"

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_appentry,node_filebrowser,node_filetree,node_user toneBlue
class node_wmbview,node_wmbparser,node_texture,node_camera toneAmber
class node_dat,node_bxm,node_ly2 toneMint
class node_bnkview,node_wemrip,node_cpk,node_cpkdata toneRose
class node_binary,node_files,node_settings toneIndigo
```

## Components

### Application

- [Desktop Application](https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/CruelerThanDAT.cpp): `CruelerThanDAT/CruelerThanDAT.cpp`
- [Open File UI](https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/inc/FileNodes.h): `CruelerThanDAT/inc/FileNodes.h`
- [File Nodes](https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/src/FileNodes.cpp): `CruelerThanDAT/src/FileNodes.cpp`

### Asset Viewing

- [WMB/SCR Viewer](https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/inc/WMB/WMBModel.h): `CruelerThanDAT/inc/WMB/WMBModel.h`
- [WMB Parser](https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/src/WMB/WMBParser.cpp): `CruelerThanDAT/src/WMB/WMBParser.cpp`
- [Texture Handling](https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/src/TextureHelper.cpp): `CruelerThanDAT/src/TextureHelper.cpp`
- [Model Camera](https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/src/Camera.cpp): `CruelerThanDAT/src/Camera.cpp`

### File Editing

- [DAT Editor](https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/inc/CTDDocument.h): `CruelerThanDAT/inc/CTDDocument.h`
- [BXM Editor](https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/inc/CTDDocument.h): `CruelerThanDAT/inc/CTDDocument.h`
- [LY2 Editor](https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/inc/CTDDocument.h): `CruelerThanDAT/inc/CTDDocument.h`

### Archives And Audio

- [BNK Viewer](https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/src/Wwise/wwise.cpp): `CruelerThanDAT/src/Wwise/wwise.cpp`
- [WEM Ripping](https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/src/Wwise/wwise.cpp): `CruelerThanDAT/src/Wwise/wwise.cpp`
- [CPK Browser](https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/src/CPKManager.cpp): `CruelerThanDAT/src/CPKManager.cpp`
- [CPK Contents](https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/inc/CPKManager.h): `CruelerThanDAT/inc/CPKManager.h`

### Shared Runtime

- [Binary I/O](https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/inc/BinaryHandler.h): `CruelerThanDAT/inc/BinaryHandler.h`
- [File Utilities](https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/src/FileUtils.cpp): `CruelerThanDAT/src/FileUtils.cpp`
- [Settings And Model](https://github.com/gaming-with-portals/cruelerthandat/blob/main/CruelerThanDAT/inc/CTDSettings.h): `CruelerThanDAT/inc/CTDSettings.h`

### Other components

- **User**

## Connections

- User → Desktop Application: uses
- Desktop Application → Open File UI: presents
- Open File UI → File Nodes: opens files
- WMB Parser → Binary I/O: reads bytes
- CPK Browser → Binary I/O: parses tables
- CPK Browser → CPK Contents: builds contents
- CPK Browser → File Utilities: extracts files
