# julianozelrose/trr-savemaster architecture

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

- Interactive diagram: https://gitdiagram.com/julianozelrose/trr-savemaster
- Repository: https://github.com/julianozelrose/trr-savemaster

## Overview

TRR-SaveMaster is a Windows desktop editor for Tomb Raider I–VI Remastered savegames. The principal workflow is selecting a savegame in the main window, editing its game-specific data through the relevant editor, and saving changes back to the file. Separate editors cover position, statistics, unlocks, and outfits; game-specific utilities interpret differing save formats, with entity caches supporting level/object mapping. README features establish cross-platform and patch compatibility, deletion, and dark mode, while the excerpts show only portions of the implementation, so some documented capability links are not traced to specific calls.

Main entry points: [`TRR-SaveMaster/MainForm.cs`](https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/MainForm.cs) (Main window), [`TRR-SaveMaster/PositionForm.cs`](https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/PositionForm.cs) (Position editor), [`TRR-SaveMaster/StatisticsForm.cs`](https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/StatisticsForm.cs) (Statistics editor), [`TRR-SaveMaster/ThemeUtilities.cs`](https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/ThemeUtilities.cs) (Theme utilities)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Desktop workflow"]
  node_main["Main window<br/>[MainForm.cs]"]
end

subgraph group_editors["Savegame editors"]
  node_position["Position editor<br/>[PositionForm.cs]"]
  node_statistics["Statistics editor<br/>[StatisticsForm.cs]"]
  node_unlocks["Unlocks editor<br/>[UnlocksForm.cs]"]
  node_outfits1["TRX outfits<br/>[OutfitsTRXForm.cs]"]
  node_outfits2["TRX2 outfits<br/>[OutfitsTRX2Form.cs]"]
end

subgraph group_formats["Game formats"]
  node_tr1["TR1 format logic<br/>[TR1Utilities.cs]"]
  node_tr1cache[("TR1 entity cache<br/>[TR1EntityCache.cs]")]
  node_tr2["TR2 format logic<br/>[TR2Utilities.cs]"]
  node_tr2cache[("TR2 entity cache<br/>[TR2EntityCache.cs]")]
  node_tr3["TR3 format logic<br/>[TR3Utilities.cs]"]
  node_tr3cache[("TR3 entity cache<br/>[TR3EntityCache.cs]")]
  node_tr4["TR4 format logic<br/>[TR4Utilities.cs]"]
  node_tr4cache[("TR4 entity cache<br/>[TR4EntityCache.cs]")]
  node_tr5["TR5 format logic<br/>[TR5Utilities.cs]"]
  node_tr5cache[("TR5 entity cache<br/>[TR5EntityCache.cs]")]
  node_tr6["TR6 format logic<br/>[TR6Utilities.cs]"]
  node_tr6cache[("TR6 entity cache<br/>[TR6EntityCache.cs]")]
  node_tr6inventory["TR6 inventory model<br/>[TR6Inventory.cs]"]
end

subgraph group_support["Shared support"]
  node_savegame["Savegame metadata<br/>[Savegame.cs]"]
  node_globals["Format constants<br/>[Globals.cs]"]
  node_theme["Theme utilities<br/>[ThemeUtilities.cs]"]
end

node_user(("User"))
node_savefiles[("Savegame files")]

node_user -->|"edits saves"| node_main
node_main -->|"creates metadata"| node_savegame
node_main -->|"uses constants"| node_globals
node_main -->|"dispatches TR1"| node_tr1
node_main -->|"dispatches TR2"| node_tr2
node_main -->|"dispatches TR3"| node_tr3
node_main -->|"dispatches TR4"| node_tr4
node_main -->|"dispatches TR5"| node_tr5
node_main -->|"dispatches TR6"| node_tr6
node_main -->|"opens editor"| node_position
node_main -->|"opens editor"| node_statistics
node_main -->|"opens editor"| node_unlocks
node_main -->|"reads and writes"| node_savefiles
node_position -->|"uses format logic"| node_tr1
node_position -->|"uses format logic"| node_tr2
node_position -->|"uses format logic"| node_tr3
node_position -->|"uses format logic"| node_tr4
node_position -->|"uses format logic"| node_tr5
node_position -->|"uses format logic"| node_tr6
node_statistics -->|"uses format logic"| node_tr1
node_statistics -->|"uses format logic"| node_tr2
node_statistics -->|"uses format logic"| node_tr3
node_statistics -->|"uses format logic"| node_tr4
node_statistics -->|"uses format logic"| node_tr5
node_statistics -->|"uses format logic"| node_tr6
node_tr1 -->|"reads definitions"| node_tr1cache
node_tr2 -->|"reads definitions"| node_tr2cache
node_tr3 -->|"reads definitions"| node_tr3cache
node_tr4 -->|"reads definitions"| node_tr4cache
node_tr5 -->|"reads definitions"| node_tr5cache
node_tr6 -->|"reads definitions"| node_tr6cache
node_tr6 -->|"builds inventory"| node_tr6inventory
node_unlocks -->|"opens outfits"| node_outfits1
node_unlocks -->|"opens outfits"| node_outfits2
node_main -->|"applies theme"| node_theme
node_position -->|"uses theme"| node_theme
node_statistics -->|"uses theme"| node_theme
node_unlocks -->|"uses theme"| node_theme
node_outfits1 -->|"uses theme"| node_theme
node_outfits2 -->|"uses theme"| node_theme
node_savefiles -.->|"selects platform"| node_main

click node_main "https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/MainForm.cs"
click node_savegame "https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/Savegame.cs"
click node_globals "https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/Globals.cs"
click node_position "https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/PositionForm.cs"
click node_statistics "https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/StatisticsForm.cs"
click node_unlocks "https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/UnlocksForm.cs"
click node_outfits1 "https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/OutfitsTRXForm.cs"
click node_outfits2 "https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/OutfitsTRX2Form.cs"
click node_theme "https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/ThemeUtilities.cs"
click node_tr1 "https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/TR1Utilities.cs"
click node_tr1cache "https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/TR1EntityCache.cs"
click node_tr2 "https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/TR2Utilities.cs"
click node_tr2cache "https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/TR2EntityCache.cs"
click node_tr3 "https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/TR3Utilities.cs"
click node_tr3cache "https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/TR3EntityCache.cs"
click node_tr4 "https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/TR4Utilities.cs"
click node_tr4cache "https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/TR4EntityCache.cs"
click node_tr5 "https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/TR5Utilities.cs"
click node_tr5cache "https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/TR5EntityCache.cs"
click node_tr6 "https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/TR6Utilities.cs"
click node_tr6cache "https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/TR6EntityCache.cs"
click node_tr6inventory "https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/TR6Inventory.cs"

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_main,node_user toneBlue
class node_position,node_statistics,node_unlocks,node_outfits1,node_outfits2,node_savefiles toneAmber
class node_tr1,node_tr1cache,node_tr2,node_tr2cache,node_tr3,node_tr3cache,node_tr4,node_tr4cache,node_tr5,node_tr5cache,node_tr6,node_tr6cache,node_tr6inventory toneMint
class node_savegame,node_globals,node_theme toneRose
```

## Components

### Desktop workflow

- [Main window](https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/MainForm.cs): `TRR-SaveMaster/MainForm.cs`

### Savegame editors

- [Position editor](https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/PositionForm.cs): `TRR-SaveMaster/PositionForm.cs`
- [Statistics editor](https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/StatisticsForm.cs): `TRR-SaveMaster/StatisticsForm.cs`
- [Unlocks editor](https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/UnlocksForm.cs): `TRR-SaveMaster/UnlocksForm.cs`
- [TRX outfits](https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/OutfitsTRXForm.cs): `TRR-SaveMaster/OutfitsTRXForm.cs`
- [TRX2 outfits](https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/OutfitsTRX2Form.cs): `TRR-SaveMaster/OutfitsTRX2Form.cs`

### Game formats

- [TR1 format logic](https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/TR1Utilities.cs): `TRR-SaveMaster/TR1Utilities.cs`
- [TR1 entity cache](https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/TR1EntityCache.cs): `TRR-SaveMaster/TR1EntityCache.cs`
- [TR2 format logic](https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/TR2Utilities.cs): `TRR-SaveMaster/TR2Utilities.cs`
- [TR2 entity cache](https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/TR2EntityCache.cs): `TRR-SaveMaster/TR2EntityCache.cs`
- [TR3 format logic](https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/TR3Utilities.cs): `TRR-SaveMaster/TR3Utilities.cs`
- [TR3 entity cache](https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/TR3EntityCache.cs): `TRR-SaveMaster/TR3EntityCache.cs`
- [TR4 format logic](https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/TR4Utilities.cs): `TRR-SaveMaster/TR4Utilities.cs`
- [TR4 entity cache](https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/TR4EntityCache.cs): `TRR-SaveMaster/TR4EntityCache.cs`
- [TR5 format logic](https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/TR5Utilities.cs): `TRR-SaveMaster/TR5Utilities.cs`
- [TR5 entity cache](https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/TR5EntityCache.cs): `TRR-SaveMaster/TR5EntityCache.cs`
- [TR6 format logic](https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/TR6Utilities.cs): `TRR-SaveMaster/TR6Utilities.cs`
- [TR6 entity cache](https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/TR6EntityCache.cs): `TRR-SaveMaster/TR6EntityCache.cs`
- [TR6 inventory model](https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/TR6Inventory.cs): `TRR-SaveMaster/TR6Inventory.cs`

### Shared support

- [Savegame metadata](https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/Savegame.cs): `TRR-SaveMaster/Savegame.cs`
- [Format constants](https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/Globals.cs): `TRR-SaveMaster/Globals.cs`
- [Theme utilities](https://github.com/julianozelrose/trr-savemaster/blob/master/TRR-SaveMaster/ThemeUtilities.cs): `TRR-SaveMaster/ThemeUtilities.cs`

### Other components

- **User**
- **Savegame files**

## Connections

- User → Main window: edits saves (evidence: `README.md`)
- Main window → Savegame metadata: creates metadata (evidence: `TRR-SaveMaster/MainForm.cs`)
- Main window → Format constants: uses constants (evidence: `TRR-SaveMaster/MainForm.cs`)
- Main window → TR1 format logic: dispatches TR1 (evidence: `TRR-SaveMaster/MainForm.cs`)
- Main window → TR2 format logic: dispatches TR2 (evidence: `TRR-SaveMaster/MainForm.cs`)
- Main window → TR3 format logic: dispatches TR3 (evidence: `TRR-SaveMaster/MainForm.cs`)
- Main window → TR4 format logic: dispatches TR4 (evidence: `TRR-SaveMaster/MainForm.cs`)
- Main window → TR5 format logic: dispatches TR5 (evidence: `TRR-SaveMaster/MainForm.cs`)
- Main window → TR6 format logic: dispatches TR6 (evidence: `TRR-SaveMaster/MainForm.cs`)
- Main window → Position editor: opens editor (evidence: `TRR-SaveMaster/MainForm.cs`)
- Main window → Statistics editor: opens editor (evidence: `TRR-SaveMaster/MainForm.cs`)
- Main window → Unlocks editor: opens editor (evidence: `TRR-SaveMaster/MainForm.cs`)
- Main window → Savegame files: reads and writes (evidence: `TRR-SaveMaster/MainForm.cs`)
- Position editor → TR1 format logic: uses format logic (evidence: `TRR-SaveMaster/PositionForm.cs`)
- Position editor → TR2 format logic: uses format logic (evidence: `TRR-SaveMaster/PositionForm.cs`)
- Position editor → TR3 format logic: uses format logic (evidence: `TRR-SaveMaster/PositionForm.cs`)
- Position editor → TR4 format logic: uses format logic (evidence: `TRR-SaveMaster/PositionForm.cs`)
- Position editor → TR5 format logic: uses format logic (evidence: `TRR-SaveMaster/PositionForm.cs`)
- Position editor → TR6 format logic: uses format logic (evidence: `TRR-SaveMaster/PositionForm.cs`)
- Statistics editor → TR1 format logic: uses format logic (evidence: `TRR-SaveMaster/StatisticsForm.cs`)
- Statistics editor → TR2 format logic: uses format logic (evidence: `TRR-SaveMaster/StatisticsForm.cs`)
- Statistics editor → TR3 format logic: uses format logic (evidence: `TRR-SaveMaster/StatisticsForm.cs`)
- Statistics editor → TR4 format logic: uses format logic (evidence: `TRR-SaveMaster/StatisticsForm.cs`)
- Statistics editor → TR5 format logic: uses format logic (evidence: `TRR-SaveMaster/StatisticsForm.cs`)
- Statistics editor → TR6 format logic: uses format logic (evidence: `TRR-SaveMaster/StatisticsForm.cs`)
- TR1 format logic → TR1 entity cache: reads definitions (evidence: `TRR-SaveMaster/TR1Utilities.cs`)
- TR2 format logic → TR2 entity cache: reads definitions (evidence: `TRR-SaveMaster/TR2Utilities.cs`)
- TR3 format logic → TR3 entity cache: reads definitions (evidence: `TRR-SaveMaster/TR3Utilities.cs`)
- TR4 format logic → TR4 entity cache: reads definitions (evidence: `TRR-SaveMaster/TR4Utilities.cs`)
- TR5 format logic → TR5 entity cache: reads definitions (evidence: `TRR-SaveMaster/TR5Utilities.cs`)
- TR6 format logic → TR6 entity cache: reads definitions (evidence: `TRR-SaveMaster/TR6Utilities.cs`)
- TR6 format logic → TR6 inventory model: builds inventory (evidence: `TRR-SaveMaster/TR6Utilities.cs`)
- Unlocks editor → TRX outfits: opens outfits (evidence: `TRR-SaveMaster/UnlocksForm.cs`)
- Unlocks editor → TRX2 outfits: opens outfits (evidence: `TRR-SaveMaster/UnlocksForm.cs`)
- Main window → Theme utilities: applies theme (evidence: `TRR-SaveMaster/MainForm.cs`)
- Position editor → Theme utilities: uses theme (evidence: `TRR-SaveMaster/PositionForm.cs`)
- Statistics editor → Theme utilities: uses theme (evidence: `TRR-SaveMaster/StatisticsForm.cs`)
- Unlocks editor → Theme utilities: uses theme (evidence: `TRR-SaveMaster/UnlocksForm.cs`)
- TRX outfits → Theme utilities: uses theme (evidence: `TRR-SaveMaster/OutfitsTRXForm.cs`)
- TRX2 outfits → Theme utilities: uses theme (evidence: `TRR-SaveMaster/OutfitsTRX2Form.cs`)
- Savegame files → Main window: selects platform (evidence: `README.md`)
