# serjam/mwclap architecture

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

- Interactive diagram: https://gitdiagram.com/serjam/mwclap
- Repository: https://github.com/serjam/mwclap

## Overview

#### Purpose and execution model
MWClap is a Windows external game-overlay program for Call of Duty: Warzone. It reads game process memory and renders ESP player boxes/names through NVIDIA GeForce Experience’s in-game overlay. The executable entry point is `main.cpp`.

#### Bootstrap and process attachment
`main.cpp` initializes the application, locates/attaches to the target game process, and coordinates the recurring update/render loop. Process-memory access is abstracted behind `driver.h`, separating game-specific state collection from the rest of the overlay logic.

#### Game-memory integration
`game.h` and `sdk.h` define the game-facing interface: offsets, game structures, and routines needed to locate the active game state and entity data in the target process. This is the primary reverse-engineering boundary; stale offsets can break all downstream features.

#### Entity and player model
`player.h` represents player/entity data used by ESP decisions, such as identity and spatial state. The application converts raw memory-derived entities into renderable player information before drawing, keeping game-memory interpretation distinct from presentation.

#### Spatial math and projection
`vectors.h` provides vector/matrix-style types and transformations used to turn world positions into screen coordinates. This stage feeds screen-space coordinates to the ESP renderer and determines whether an entity is visible/on-screen.

#### Overlay rendering boundary
`overlay.h` and `overlay.cpp` implement the overlay window/rendering lifecycle, intended to run through NVIDIA’s enabled in-game overlay in fullscreen-borderless mode. Rendering consumes projected player data and draws the supported ESP primitives: boxes and names.

#### Runtime flow and dependencies
The expected control flow is: initialize → attach to Warzone → acquire game/player state through `driver.h`/`game.h` → project positions via `vectors.h` → render ESP through `overlay.cpp` → repeat while the game is active. Material external dependencies are Windows process APIs, the Warzone client process, and NVIDIA GeForce Experience’s in-game overlay; no server-side or web infrastructure is indicated.

#### Obfuscation/support utilities
`xor.h` likely supplies lightweight compile-time/runtime string obfuscation for sensitive literals such as process names or offsets. `sdk.h` and `game.h` remain the key maintenance points when the target game changes.

Main entry points: [`main.cpp`](https://github.com/serjam/mwclap/blob/main/main.cpp) (Application Loop), [`game.h`](https://github.com/serjam/mwclap/blob/main/game.h) (Game State Access), [`driver.h`](https://github.com/serjam/mwclap/blob/main/driver.h) (Process Memory Access), [`overlay.cpp`](https://github.com/serjam/mwclap/blob/main/overlay.cpp) (ESP Renderer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_main["Application Loop<br/>C++ entry point<br/>[main.cpp]"]
  node_xor["String Obfuscation<br/>support utility<br/>[xor.h]"]
end

subgraph group_game["Game Integration"]
  node_driver["Process Memory Access<br/>driver interface<br/>[driver.h]"]
  node_game["Game State Access<br/>game interface<br/>[game.h]"]
  node_sdk["Offsets and SDK Types<br/>game SDK<br/>[sdk.h]"]
  node_player["Player Model<br/>entity model<br/>[player.h]"]
end

subgraph group_render["Overlay Rendering"]
  node_vectors["World-to-Screen Math<br/>projection math<br/>[vectors.h]"]
  node_overlay["ESP Renderer<br/>overlay lifecycle<br/>[overlay.cpp]"]
  node_overlay_api["Overlay Interface<br/>renderer interface<br/>[overlay.h]"]
end

node_warzone[("Warzone Client<br/>target process")]
node_nvidia{{"NVIDIA In-Game Overlay<br/>external runtime"}}
node_windows["Windows Process APIs<br/>platform API"]

node_main -->|"attaches and reads"| node_driver
node_main -->|"coordinates state acquisition"| node_game
node_main -->|"projects entities"| node_vectors
node_main -->|"submits ESP frames"| node_overlay
node_main -.->|"uses protected literals"| node_xor
node_driver -->|"uses"| node_windows
node_driver -->|"reads memory"| node_warzone
node_game -->|"acquires raw state through"| node_driver
node_game -->|"uses offsets and structures"| node_sdk
node_game -->|"builds entity data"| node_player
node_player -->|"provides world positions"| node_vectors
node_vectors -->|"provides screen coordinates"| node_overlay
node_overlay_api -->|"declares"| node_overlay
node_overlay -->|"renders through"| node_nvidia

click node_main "https://github.com/serjam/mwclap/blob/main/main.cpp"
click node_driver "https://github.com/serjam/mwclap/blob/main/driver.h"
click node_game "https://github.com/serjam/mwclap/blob/main/game.h"
click node_sdk "https://github.com/serjam/mwclap/blob/main/sdk.h"
click node_player "https://github.com/serjam/mwclap/blob/main/player.h"
click node_vectors "https://github.com/serjam/mwclap/blob/main/vectors.h"
click node_overlay "https://github.com/serjam/mwclap/blob/main/overlay.cpp"
click node_overlay_api "https://github.com/serjam/mwclap/blob/main/overlay.h"
click node_xor "https://github.com/serjam/mwclap/blob/main/xor.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_main,node_xor toneBlue
class node_driver,node_game,node_sdk,node_player toneAmber
class node_vectors,node_overlay,node_overlay_api toneMint
class node_warzone,node_nvidia,node_windows toneNeutral
```

## Components

### Application

- [Application Loop](https://github.com/serjam/mwclap/blob/main/main.cpp): C++ entry point · Initializes, attaches, updates, and renders while the game is active. · `main.cpp`
- [String Obfuscation](https://github.com/serjam/mwclap/blob/main/xor.h): support utility · Obfuscates sensitive literals such as process names. · `xor.h`

### Game Integration

Reverse-engineering boundary for Warzone state.

- [Process Memory Access](https://github.com/serjam/mwclap/blob/main/driver.h): driver interface · Abstracts reads from the target process. · `driver.h`
- [Game State Access](https://github.com/serjam/mwclap/blob/main/game.h): game interface · Locates active game state and entity data. · `game.h`
- [Offsets and SDK Types](https://github.com/serjam/mwclap/blob/main/sdk.h): game SDK · Defines offsets and game-facing structures. · `sdk.h`
- [Player Model](https://github.com/serjam/mwclap/blob/main/player.h): entity model · Renderable identity and spatial player state. · `player.h`

### Overlay Rendering

- [World-to-Screen Math](https://github.com/serjam/mwclap/blob/main/vectors.h): projection math · Transforms world positions and evaluates screen visibility. · `vectors.h`
- [ESP Renderer](https://github.com/serjam/mwclap/blob/main/overlay.cpp): overlay lifecycle · Draws player boxes and names through the in-game overlay. · `overlay.cpp`
- [Overlay Interface](https://github.com/serjam/mwclap/blob/main/overlay.h): renderer interface · `overlay.h`

### Other components

- **Warzone Client**: target process · Supplies live game memory.
- **NVIDIA In-Game Overlay**: external runtime · Hosts the fullscreen-borderless overlay.
- **Windows Process APIs**: platform API

## Connections

- Application Loop → Process Memory Access: attaches and reads
- Application Loop → Game State Access: coordinates state acquisition
- Application Loop → World-to-Screen Math: projects entities
- Application Loop → ESP Renderer: submits ESP frames
- Application Loop → String Obfuscation: uses protected literals
- Process Memory Access → Windows Process APIs: uses
- Process Memory Access → Warzone Client: reads memory
- Game State Access → Process Memory Access: acquires raw state through
- Game State Access → Offsets and SDK Types: uses offsets and structures
- Game State Access → Player Model: builds entity data
- Player Model → World-to-Screen Math: provides world positions
- World-to-Screen Math → ESP Renderer: provides screen coordinates
- Overlay Interface → ESP Renderer: declares
- ESP Renderer → NVIDIA In-Game Overlay: renders through
