# matheus2x/ie3ogre-nds-recomp architecture

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

- Interactive diagram: https://gitdiagram.com/matheus2x/ie3ogre-nds-recomp
- Repository: https://github.com/matheus2x/ie3ogre-nds-recomp

## Overview

This is a native PC recompilation port of Inazuma Eleven 3: The Ogre. The main user workflow is to provide a cartridge dump, let the launcher prepare game data and compile the executable, then play with PC graphics, controls, saves, and port features. Separate branches cover launcher management and mod/translation authoring. Several subsystems are represented from README capabilities and the file tree; their internal calls were not sampled, so those links are documented at the product level rather than asserted as source-level calls.

Main entry points: [`game/main.cpp`](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/game/main.cpp) (Recompiled Game), [`tools/text.py`](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/tools/text.py) (Translation Editor), [`launcher/prepare.cpp`](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/launcher/prepare.cpp) (Game Preparation), [`recompiler/src/main.cpp`](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/recompiler/src/main.cpp) (Recompiler CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_launch["Launcher"]
  node_launcher_ui["Launcher UI<br/>[main.cpp]"]
  node_prepare["Game Preparation<br/>[prepare.cpp]"]
  node_launcher_settings["Launcher Settings<br/>[settings.cpp]"]
  node_launcher_mods["Mod Manager<br/>[mods.cpp]"]
  node_launcher_saves["Save Manager<br/>[saves.cpp]"]
  node_launcher_achievements["Achievement Browser<br/>[achievements.cpp]"]
  node_launcher_gallery["Screenshot Gallery<br/>[gallery.cpp]"]
  node_launcher_update["Update Manager<br/>[update.cpp]"]
end

subgraph group_recomp["Recompilation"]
  node_recomp_entry["Recompiler CLI<br/>[main.cpp]"]
  node_program_model["Program Model<br/>[program.h]"]
  node_translator["ARM Translator<br/>[translator.h]"]
end

subgraph group_runtime["Game Runtime"]
  node_game["Recompiled Game<br/>[main.cpp]"]
  node_host["Host Platform<br/>[host.cpp]"]
  node_gpu2d["2D Graphics<br/>[gpu2d.cpp]"]
  node_gpu3d["3D Graphics<br/>[gpu3d.cpp]"]
  node_shaders["Embedded Shaders<br/>[shaders_embedded.h]"]
  node_runtime_ui["Pause UI<br/>[ui.cpp]"]
  node_ui_fonts["Embedded Fonts<br/>[fonts_embedded.h]"]
  node_input["DS Input<br/>[arm7_input.cpp]"]
  node_sound["DS Sound<br/>[arm7_sound.cpp]"]
end

subgraph group_manage["Play Features"]
  node_runtime_state["Savestates<br/>[savestate.cpp]"]
  node_rewind["Rewind<br/>[task.cpp]"]
  node_save_data[("Save Data<br/>[savedata.cpp]")]
  node_runtime_achievements["Achievements<br/>[achievements.cpp]"]
  node_diagnostics["Logs and Replay<br/>[diag.cpp]"]
  node_discord["Discord Presence<br/>[discord.cpp]"]
end

subgraph group_mods["Mod Authoring"]
  node_runtime_mods["Runtime Mods<br/>[mods.cpp]"]
  node_pak["Game Package<br/>[package.cpp]"]
  node_mod_tool["Mod Utility<br/>[mod.py]"]
  node_text_tool["Translation Editor<br/>[text.py]"]
  node_translation_language["Language Metadata<br/>[language.py]"]
  node_game_text["Game Text Format<br/>[text.py]"]
end

node_player(("Player"))
node_dump["Cartridge Dump"]

node_player -->|"opens"| node_launcher_ui
node_player -->|"provides"| node_dump
node_launcher_ui -->|"starts preparation"| node_prepare
node_dump -->|"validates and packages"| node_prepare
node_prepare -->|"compiles executable"| node_game
node_player -->|"plays"| node_game
node_recomp_entry -->|"loads program"| node_program_model
node_recomp_entry -->|"translates functions"| node_translator
node_game -.->|"runs as PC port"| node_host
node_host -->|"uses embedded"| node_shaders
node_gpu3d -.->|"uses embedded"| node_shaders
node_runtime_ui -->|"uses embedded"| node_ui_fonts
node_player -->|"configures"| node_launcher_settings
node_player -->|"manages mods"| node_launcher_mods
node_player -->|"chooses saves"| node_launcher_saves
node_player -->|"views achievements"| node_launcher_achievements
node_player -->|"views screenshots"| node_launcher_gallery
node_player -->|"updates game"| node_launcher_update
node_player -->|"opens pause menu"| node_runtime_ui
node_player -->|"controls game"| node_input
node_player -->|"saves state"| node_runtime_state
node_player -->|"rewinds play"| node_rewind
node_game -->|"persists progress"| node_save_data
node_game -->|"tracks achievements"| node_runtime_achievements
node_game -->|"records sessions"| node_diagnostics
node_game -->|"reports presence"| node_discord
node_game -->|"loads mod content"| node_runtime_mods
node_runtime_mods -.->|"preserves base package"| node_pak
node_player -->|"authors mods"| node_mod_tool
node_player -->|"translates text"| node_text_tool
node_text_tool -->|"reads game formats"| node_game_text
node_text_tool -->|"loads language data"| node_translation_language
node_mod_tool -->|"patches package"| node_pak

click node_launcher_ui "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/launcher/main.cpp"
click node_prepare "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/launcher/prepare.cpp"
click node_launcher_settings "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/launcher/settings.cpp"
click node_launcher_mods "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/launcher/mods.cpp"
click node_launcher_saves "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/launcher/saves.cpp"
click node_launcher_achievements "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/launcher/achievements.cpp"
click node_launcher_gallery "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/launcher/gallery.cpp"
click node_launcher_update "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/launcher/update.cpp"
click node_recomp_entry "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/recompiler/src/main.cpp"
click node_program_model "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/recompiler/src/program.h"
click node_translator "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/recompiler/src/translator.h"
click node_game "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/game/main.cpp"
click node_host "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/src/host.cpp"
click node_gpu2d "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/src/gpu2d.cpp"
click node_gpu3d "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/src/gpu3d.cpp"
click node_shaders "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/src/shaders_embedded.h"
click node_runtime_ui "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/ui/ui.cpp"
click node_ui_fonts "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/ui/fonts_embedded.h"
click node_input "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/src/arm7_input.cpp"
click node_sound "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/src/arm7_sound.cpp"
click node_runtime_state "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/src/savestate.cpp"
click node_rewind "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/src/task.cpp"
click node_save_data "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/src/savedata.cpp"
click node_runtime_achievements "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/src/achievements.cpp"
click node_diagnostics "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/src/diag.cpp"
click node_discord "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/src/discord.cpp"
click node_runtime_mods "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/src/mods.cpp"
click node_pak "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/src/package.cpp"
click node_mod_tool "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/tools/mod.py"
click node_text_tool "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/tools/text.py"
click node_translation_language "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/tools/language.py"
click node_game_text "https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/tools/ntr/text.py"

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_launcher_ui,node_prepare,node_launcher_settings,node_launcher_mods,node_launcher_saves,node_launcher_achievements,node_launcher_gallery,node_launcher_update toneBlue
class node_recomp_entry,node_program_model,node_translator toneAmber
class node_game,node_host,node_gpu2d,node_gpu3d,node_shaders,node_runtime_ui,node_ui_fonts,node_input,node_sound toneMint
class node_runtime_state,node_rewind,node_save_data,node_runtime_achievements,node_diagnostics,node_discord toneRose
class node_runtime_mods,node_pak,node_mod_tool,node_text_tool,node_translation_language,node_game_text,node_player,node_dump toneIndigo
```

## Components

### Launcher

- [Launcher UI](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/launcher/main.cpp): `launcher/main.cpp`
- [Game Preparation](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/launcher/prepare.cpp): `launcher/prepare.cpp`
- [Launcher Settings](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/launcher/settings.cpp): `launcher/settings.cpp`
- [Mod Manager](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/launcher/mods.cpp): `launcher/mods.cpp`
- [Save Manager](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/launcher/saves.cpp): `launcher/saves.cpp`
- [Achievement Browser](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/launcher/achievements.cpp): `launcher/achievements.cpp`
- [Screenshot Gallery](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/launcher/gallery.cpp): `launcher/gallery.cpp`
- [Update Manager](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/launcher/update.cpp): `launcher/update.cpp`

### Recompilation

- [Recompiler CLI](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/recompiler/src/main.cpp): `recompiler/src/main.cpp`
- [Program Model](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/recompiler/src/program.h): `recompiler/src/program.h`
- [ARM Translator](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/recompiler/src/translator.h): `recompiler/src/translator.h`

### Game Runtime

- [Recompiled Game](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/game/main.cpp): `game/main.cpp`
- [Host Platform](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/src/host.cpp): `runtime/src/host.cpp`
- [2D Graphics](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/src/gpu2d.cpp): `runtime/src/gpu2d.cpp`
- [3D Graphics](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/src/gpu3d.cpp): `runtime/src/gpu3d.cpp`
- [Embedded Shaders](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/src/shaders_embedded.h): `runtime/src/shaders_embedded.h`
- [Pause UI](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/ui/ui.cpp): `runtime/ui/ui.cpp`
- [Embedded Fonts](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/ui/fonts_embedded.h): `runtime/ui/fonts_embedded.h`
- [DS Input](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/src/arm7_input.cpp): `runtime/src/arm7_input.cpp`
- [DS Sound](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/src/arm7_sound.cpp): `runtime/src/arm7_sound.cpp`

### Play Features

- [Savestates](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/src/savestate.cpp): `runtime/src/savestate.cpp`
- [Rewind](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/src/task.cpp): `runtime/src/task.cpp`
- [Save Data](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/src/savedata.cpp): `runtime/src/savedata.cpp`
- [Achievements](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/src/achievements.cpp): `runtime/src/achievements.cpp`
- [Logs and Replay](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/src/diag.cpp): `runtime/src/diag.cpp`
- [Discord Presence](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/src/discord.cpp): `runtime/src/discord.cpp`

### Mod Authoring

- [Runtime Mods](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/src/mods.cpp): `runtime/src/mods.cpp`
- [Game Package](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/runtime/src/package.cpp): `runtime/src/package.cpp`
- [Mod Utility](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/tools/mod.py): `tools/mod.py`
- [Translation Editor](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/tools/text.py): `tools/text.py`
- [Language Metadata](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/tools/language.py): `tools/language.py`
- [Game Text Format](https://github.com/matheus2x/ie3ogre-nds-recomp/blob/main/tools/ntr/text.py): `tools/ntr/text.py`

### Other components

- **Player**
- **Cartridge Dump**

## Connections

- Player → Launcher UI: opens (evidence: `README.md`)
- Player → Cartridge Dump: provides (evidence: `README.md`)
- Launcher UI → Game Preparation: starts preparation (evidence: `launcher/main.cpp`)
- Cartridge Dump → Game Preparation: validates and packages (evidence: `README.md`)
- Game Preparation → Recompiled Game: compiles executable (evidence: `README.md`)
- Player → Recompiled Game: plays (evidence: `README.md`)
- Recompiler CLI → Program Model: loads program (evidence: `recompiler/src/main.cpp`)
- Recompiler CLI → ARM Translator: translates functions (evidence: `recompiler/src/main.cpp`)
- Recompiled Game → Host Platform: runs as PC port
- Host Platform → Embedded Shaders: uses embedded (evidence: `runtime/src/host.cpp`)
- 3D Graphics → Embedded Shaders: uses embedded
- Pause UI → Embedded Fonts: uses embedded (evidence: `runtime/ui/ui.cpp`)
- Player → Launcher Settings: configures (evidence: `README.md`)
- Player → Mod Manager: manages mods (evidence: `README.md`)
- Player → Save Manager: chooses saves (evidence: `README.md`)
- Player → Achievement Browser: views achievements (evidence: `README.md`)
- Player → Screenshot Gallery: views screenshots (evidence: `README.md`)
- Player → Update Manager: updates game (evidence: `README.md`)
- Player → Pause UI: opens pause menu (evidence: `README.md`)
- Player → DS Input: controls game (evidence: `README.md`)
- Player → Savestates: saves state (evidence: `README.md`)
- Player → Rewind: rewinds play (evidence: `README.md`)
- Recompiled Game → Save Data: persists progress (evidence: `README.md`)
- Recompiled Game → Achievements: tracks achievements (evidence: `README.md`)
- Recompiled Game → Logs and Replay: records sessions (evidence: `README.md`)
- Recompiled Game → Discord Presence: reports presence (evidence: `README.md`)
- Recompiled Game → Runtime Mods: loads mod content (evidence: `README.md`)
- Runtime Mods → Game Package: preserves base package
- Player → Mod Utility: authors mods (evidence: `README.md`)
- Player → Translation Editor: translates text (evidence: `tools/text.py`)
- Translation Editor → Game Text Format: reads game formats (evidence: `tools/text.py`)
- Translation Editor → Language Metadata: loads language data (evidence: `tools/text.py`)
- Mod Utility → Game Package: patches package (evidence: `tools/mod.py`)
