# smkh4x/sanlibre architecture

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

- Interactive diagram: https://gitdiagram.com/smkh4x/sanlibre
- Repository: https://github.com/smkh4x/sanlibre

## Overview

SanLibre is an early-stage GTA San Andreas port targeting modern platforms. The only sampled runtime workflow initializes SDL video, opens a window, handles quit/Escape and mouse-motion events, then shuts down. The repository does not yet show game or platform-porting subsystems; the graph reflects only this small scaffold.

Main entry points: [`src/main.cpp`](https://github.com/smkh4x/sanlibre/blob/main/src/main.cpp) (Application Loop)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_app["Application Loop<br/>[main.cpp]"]
node_sdl["SDL Runtime"]
node_console["Console Output"]

node_app -->|"initializes video"| node_sdl
node_app -->|"creates window"| node_sdl
node_app -->|"polls events"| node_sdl
node_user -->|"provides input"| node_sdl
node_app -->|"prints mouse coordinates"| node_console
node_app -->|"destroys window and quits"| node_sdl

click node_app "https://github.com/smkh4x/sanlibre/blob/main/src/main.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_user toneBlue
class node_app toneTeal
class node_sdl,node_console toneIndigo
```

## Components

### Other components

- **User**
- [Application Loop](https://github.com/smkh4x/sanlibre/blob/main/src/main.cpp): `src/main.cpp`
- **SDL Runtime**
- **Console Output**

## Connections

- Application Loop → SDL Runtime: initializes video (evidence: `src/main.cpp`)
- Application Loop → SDL Runtime: creates window (evidence: `src/main.cpp`)
- Application Loop → SDL Runtime: polls events (evidence: `src/main.cpp`)
- User → SDL Runtime: provides input
- Application Loop → Console Output: prints mouse coordinates (evidence: `src/main.cpp`)
- Application Loop → SDL Runtime: destroys window and quits (evidence: `src/main.cpp`)
