How tunepham/hookshot works
Hookshot turns a player’s own supported game files into a native Windows or Linux game, then launches that game. The README describes the major stages and capabilities; the source index additionally confirms selected builder, shader-baking, recompiler, and rendering relationships. Several runtime subsystems are represented by their exact enclosing directories because their implementation files were not sampled.
Main entry points: hos_main.c Console services · vk Graphics features · hookshot_builder.py Build orchestration · make_game.py Native game
Components 21
Build and launch
- Builder UI
builder/py/hookshot_builder/window.py - Build orchestration
builder/linux/hookshot_builder.py - Game files
- Native game
nx2/make_game.py - Game launcher
builder/linux/linux_update.py
Game recompilation
- Static recompilation
nx2 - Shader baking
nx2/bake_ds/bake_ds.cpp - Shader batch
gpu/shaderbatch.cpp - Shader frontend
gpu/vk/eden/shader_recompiler/frontend/maxwell/translate/translate.cpp - Shader IR
gpu/vk/eden/shader_recompiler/frontend/ir/program.h - IR optimization
gpu/vk/eden/shader_recompiler/ir_opt/global_memory_to_storage_buffer_pass.cpp - SPIR-V backend
gpu/vk/eden/shader_recompiler/backend/spirv/emit_spirv.cpp
Host runtime
- Console services
host/hos_main.c - Input and audio
host - Saves and files
host/nn_fs.c - Game mods
host/mods.c
Graphics and performance
- Vulkan renderer
gpu/render/rx_draw.cpp - Graphics features
gpu/vk - In-game menu
gpu/vk/vk_menu.cpp - Pipeline cache
gpu/vk/vk_progcache.cpp
Other components
- Player
Connections 23
- Player → Builder UI: selects files
- Game files → Builder UI: provides input
- Builder UI → Build orchestration: starts build
- Build orchestration → Native game: builds
builder/linux/hookshot_builder.py - Build orchestration → Static recompilation: runs recompilation
builder/linux/hookshot_builder.py - Native game → Game launcher: launches through
- Game launcher → Player: offers Play
- Static recompilation → Shader baking: bakes shaders
- Shader baking → Shader frontend: translates programs
nx2/bake_ds/bake_ds.cpp - Shader batch → Shader frontend: translates programs
gpu/shaderbatch.cpp - Shader frontend → Shader IR: produces IR
- IR optimization → Shader IR: rewrites IR
- Shader batch → SPIR-V backend: emits SPIR-V
gpu/shaderbatch.cpp - Shader baking → SPIR-V backend: emits SPIR-V
nx2/bake_ds/bake_ds.cpp - Native game → Console services: runs with
- Console services → Input and audio: provides services
- Console services → Saves and files: provides services
- Console services → Game mods: loads mods
- Console services → Vulkan renderer: uses renderer
- Vulkan renderer → Graphics features: uses Vulkan
gpu/render/rx_draw.cpp - Graphics features → In-game menu: exposes controls
- Graphics features → Pipeline cache: caches pipelines
- Graphics features → Player: provides upscaling and frame generation