# zanostro/civ1-sve-file-edditor architecture

> Architecture diagram of the GitHub repository zanostro/civ1-sve-file-edditor, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zanostro/civ1-sve-file-edditor
- Repository: https://github.com/zanostro/civ1-sve-file-edditor

## Overview

This is a small Civilization I save-file reader/editor prototype. Its demonstrated workflow starts the program, selects the configured save path, reads the file into memory, and interprets it using the SVE structure definitions. The README describes broader inspection and editing goals, but the sampled runtime only loads a save; editing behavior is not evidenced. The graph therefore shows the implemented load path and avoids implying unsupported editing stages.

Main entry points: [`src/SVE_file_edditor.cpp`](https://github.com/zanostro/civ1-sve-file-edditor/blob/main/src/SVE_file_edditor.cpp) (Program Entry), [`src/file_reader.cpp`](https://github.com/zanostro/civ1-sve-file-edditor/blob/main/src/file_reader.cpp) (SVE File Reader), [`src/utill.hpp`](https://github.com/zanostro/civ1-sve-file-edditor/blob/main/src/utill.hpp) (Save Path Config), [`src/sve_format.hpp`](https://github.com/zanostro/civ1-sve-file-edditor/blob/main/src/sve_format.hpp) (SVE Data Layout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Application"]
  node_entry["Program Entry"]
  node_config["Save Path Config<br/>[utill.hpp]"]
end

subgraph group_loading["Save Loading"]
  node_reader["SVE File Reader<br/>[file_reader.cpp]"]
  node_format["SVE Data Layout<br/>[sve_format.hpp]"]
end

node_user(("User"))
node_save["Sample Save<br/>[CIVIL0.SVE]"]

node_user -->|"runs"| node_entry
node_entry -->|"uses path"| node_config
node_entry -->|"loads save"| node_reader
node_reader -->|"reads bytes"| node_save
node_reader -->|"uses layout"| node_format

click node_entry "https://github.com/zanostro/civ1-sve-file-edditor/blob/main/src/SVE_file_edditor.cpp"
click node_config "https://github.com/zanostro/civ1-sve-file-edditor/blob/main/src/utill.hpp"
click node_reader "https://github.com/zanostro/civ1-sve-file-edditor/blob/main/src/file_reader.cpp"
click node_format "https://github.com/zanostro/civ1-sve-file-edditor/blob/main/src/sve_format.hpp"
click node_save "https://github.com/zanostro/civ1-sve-file-edditor/blob/main/save_files/CIVIL0.SVE"

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_entry,node_config,node_user toneBlue
class node_reader,node_format toneAmber
class node_save toneTeal
```

## Components

### Application

- [Program Entry](https://github.com/zanostro/civ1-sve-file-edditor/blob/main/src/SVE_file_edditor.cpp): `src/SVE_file_edditor.cpp`
- [Save Path Config](https://github.com/zanostro/civ1-sve-file-edditor/blob/main/src/utill.hpp): `src/utill.hpp`

### Save Loading

- [SVE File Reader](https://github.com/zanostro/civ1-sve-file-edditor/blob/main/src/file_reader.cpp): `src/file_reader.cpp`
- [SVE Data Layout](https://github.com/zanostro/civ1-sve-file-edditor/blob/main/src/sve_format.hpp): `src/sve_format.hpp`

### Other components

- **User**
- [Sample Save](https://github.com/zanostro/civ1-sve-file-edditor/blob/main/save_files/CIVIL0.SVE): `save_files/CIVIL0.SVE`

## Connections

- User → Program Entry: runs (evidence: `README.md`)
- Program Entry → Save Path Config: uses path (evidence: `src/SVE_file_edditor.cpp`)
- Program Entry → SVE File Reader: loads save (evidence: `src/SVE_file_edditor.cpp`)
- SVE File Reader → Sample Save: reads bytes (evidence: `src/file_reader.cpp`)
- SVE File Reader → SVE Data Layout: uses layout (evidence: `src/file_reader.cpp`)
