# thirteenag/gtaiv.eflc.fusionfix architecture

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

- Interactive diagram: https://gitdiagram.com/thirteenag/gtaiv.eflc.fusionfix
- Repository: https://github.com/thirteenag/gtaiv.eflc.fusionfix

## Overview

FusionFix is a single-player GTA IV: Complete Edition compatibility and enhancement mod. Users install it into the game directory, then launch the game; its DLL hooks game and Direct3D lifecycle events and dispatches mod callbacks, while replacement data and shaders supply game-facing fixes and enhancements. The tree documents in-game configurable options, but sampled source does not reveal their implementation or most feature wiring, so those links are intentionally broad or omitted.

Main entry points: [`source`](https://github.com/thirteenag/gtaiv.eflc.fusionfix/tree/master/source) (Feature callbacks), [`installer/main.cpp`](https://github.com/thirteenag/gtaiv.eflc.fusionfix/blob/master/installer/main.cpp) (Installer), [`source/d3d9/d3d9.cpp`](https://github.com/thirteenag/gtaiv.eflc.fusionfix/blob/master/source/d3d9/d3d9.cpp) (D3D9 proxy), [`source/dllmain.cpp`](https://github.com/thirteenag/gtaiv.eflc.fusionfix/blob/master/source/dllmain.cpp) (Lifecycle hooks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_install["Installation"]
  node_installer["Installer<br/>[main.cpp]"]
end

subgraph group_runtime["Runtime hooks"]
  node_proxy["D3D9 proxy<br/>[d3d9.cpp]"]
  node_hooks["Lifecycle hooks<br/>[dllmain.cpp]"]
  node_callbacks["Feature callbacks"]
end

subgraph group_features["Game features"]
  node_config["Plugin config"]
  node_menu["Menu options"]
  node_seasonal["Seasonal features"]
end

subgraph group_assets["Game assets"]
  node_game_data["Game data fixes"]
  node_shaders["Graphics shaders"]
  node_textures["Replacement textures"]
end

subgraph group_support["Support libraries"]
  node_gxt["GXT strings"]
  node_game_refs["Game references<br/>[gameref.hpp]"]
  node_module_list["Module discovery<br/>[ModuleList.hpp]"]
  node_fxaa["FXAA implementation<br/>[FXAA3_11.h]"]
end

node_player(("Player"))
node_game["GTA IV"]
node_direct3d["Direct3D 9"]

node_player -->|"installs"| node_installer
node_installer -->|"writes mod files"| node_game
node_game -->|"loads DLL"| node_proxy
node_proxy -->|"forwards API calls"| node_direct3d
node_game -->|"triggers hooks"| node_hooks
node_hooks -->|"dispatches events"| node_callbacks
node_menu -->|"customizes options"| node_config
node_game -->|"loads replacements"| node_game_data
node_game -->|"uses shaders"| node_shaders
node_game -->|"loads textures"| node_textures
node_game -.->|"uses text support"| node_gxt
node_callbacks -.->|"accesses game state"| node_game_refs
node_callbacks -.->|"discovers modules"| node_module_list
node_callbacks -.->|"uses antialiasing"| node_fxaa
node_callbacks -.->|"feature wiring uncertain"| node_seasonal

click node_installer "https://github.com/thirteenag/gtaiv.eflc.fusionfix/blob/master/installer/main.cpp"
click node_proxy "https://github.com/thirteenag/gtaiv.eflc.fusionfix/blob/master/source/d3d9/d3d9.cpp"
click node_hooks "https://github.com/thirteenag/gtaiv.eflc.fusionfix/blob/master/source/dllmain.cpp"
click node_callbacks "https://github.com/thirteenag/gtaiv.eflc.fusionfix/tree/master/source"
click node_config "https://github.com/thirteenag/gtaiv.eflc.fusionfix/blob/master/data/plugins/GTAIV.EFLC.FusionFix.ini"
click node_menu "https://github.com/thirteenag/gtaiv.eflc.fusionfix/tree/master/source"
click node_seasonal "https://github.com/thirteenag/gtaiv.eflc.fusionfix/tree/master/source/seasonal"
click node_game_data "https://github.com/thirteenag/gtaiv.eflc.fusionfix/tree/master/data/update"
click node_shaders "https://github.com/thirteenag/gtaiv.eflc.fusionfix/tree/master/shaders"
click node_textures "https://github.com/thirteenag/gtaiv.eflc.fusionfix/tree/master/textures"
click node_gxt "https://github.com/thirteenag/gtaiv.eflc.fusionfix/tree/master/source/gxt/src"
click node_game_refs "https://github.com/thirteenag/gtaiv.eflc.fusionfix/blob/master/source/includes/gameref.hpp"
click node_module_list "https://github.com/thirteenag/gtaiv.eflc.fusionfix/blob/master/source/includes/ModuleList.hpp"
click node_fxaa "https://github.com/thirteenag/gtaiv.eflc.fusionfix/blob/master/source/resources/FXAA3_11.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_installer toneBlue
class node_proxy,node_hooks,node_callbacks toneAmber
class node_config,node_menu,node_seasonal toneMint
class node_game_data,node_shaders,node_textures toneRose
class node_gxt,node_game_refs,node_module_list,node_fxaa,node_player,node_game,node_direct3d toneIndigo
```

## Components

### Installation

- [Installer](https://github.com/thirteenag/gtaiv.eflc.fusionfix/blob/master/installer/main.cpp): `installer/main.cpp`

### Runtime hooks

- [D3D9 proxy](https://github.com/thirteenag/gtaiv.eflc.fusionfix/blob/master/source/d3d9/d3d9.cpp): `source/d3d9/d3d9.cpp`
- [Lifecycle hooks](https://github.com/thirteenag/gtaiv.eflc.fusionfix/blob/master/source/dllmain.cpp): `source/dllmain.cpp`
- [Feature callbacks](https://github.com/thirteenag/gtaiv.eflc.fusionfix/tree/master/source): `source`

### Game features

- [Plugin config](https://github.com/thirteenag/gtaiv.eflc.fusionfix/blob/master/data/plugins/GTAIV.EFLC.FusionFix.ini): `data/plugins/GTAIV.EFLC.FusionFix.ini`
- [Menu options](https://github.com/thirteenag/gtaiv.eflc.fusionfix/tree/master/source): `source`
- [Seasonal features](https://github.com/thirteenag/gtaiv.eflc.fusionfix/tree/master/source/seasonal): `source/seasonal`

### Game assets

- [Game data fixes](https://github.com/thirteenag/gtaiv.eflc.fusionfix/tree/master/data/update): `data/update`
- [Graphics shaders](https://github.com/thirteenag/gtaiv.eflc.fusionfix/tree/master/shaders): `shaders`
- [Replacement textures](https://github.com/thirteenag/gtaiv.eflc.fusionfix/tree/master/textures): `textures`

### Support libraries

- [GXT strings](https://github.com/thirteenag/gtaiv.eflc.fusionfix/tree/master/source/gxt/src): `source/gxt/src`
- [Game references](https://github.com/thirteenag/gtaiv.eflc.fusionfix/blob/master/source/includes/gameref.hpp): `source/includes/gameref.hpp`
- [Module discovery](https://github.com/thirteenag/gtaiv.eflc.fusionfix/blob/master/source/includes/ModuleList.hpp): `source/includes/ModuleList.hpp`
- [FXAA implementation](https://github.com/thirteenag/gtaiv.eflc.fusionfix/blob/master/source/resources/FXAA3_11.h): `source/resources/FXAA3_11.h`

### Other components

- **Player**
- **GTA IV**
- **Direct3D 9**

## Connections

- Player → Installer: installs
- Installer → GTA IV: writes mod files
- GTA IV → D3D9 proxy: loads DLL
- D3D9 proxy → Direct3D 9: forwards API calls
- GTA IV → Lifecycle hooks: triggers hooks
- Lifecycle hooks → Feature callbacks: dispatches events
- Menu options → Plugin config: customizes options
- GTA IV → Game data fixes: loads replacements
- GTA IV → Graphics shaders: uses shaders
- GTA IV → Replacement textures: loads textures
- GTA IV → GXT strings: uses text support
- Feature callbacks → Game references: accesses game state
- Feature callbacks → Module discovery: discovers modules
- Feature callbacks → FXAA implementation: uses antialiasing
- Feature callbacks → Seasonal features: feature wiring uncertain
