gk3hd 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. gk3hd-1.0.0/PKG-INFO +239 -0
  2. gk3hd-1.0.0/README.md +207 -0
  3. gk3hd-1.0.0/pyproject.toml +233 -0
  4. gk3hd-1.0.0/pyproject.toml.orig +191 -0
  5. gk3hd-1.0.0/src/gk3hd/__init__.py +12 -0
  6. gk3hd-1.0.0/src/gk3hd/__main__.py +5 -0
  7. gk3hd-1.0.0/src/gk3hd/assets/FACES.TXT +928 -0
  8. gk3hd-1.0.0/src/gk3hd/assets/d7vk-lock.json +8 -0
  9. gk3hd-1.0.0/src/gk3hd/assets/texture-pack-lock.json +16 -0
  10. gk3hd-1.0.0/src/gk3hd/assets/texture-policy.json +793 -0
  11. gk3hd-1.0.0/src/gk3hd/assets/textures/LHO_CHST.PNG +0 -0
  12. gk3hd-1.0.0/src/gk3hd/cli/__init__.py +209 -0
  13. gk3hd-1.0.0/src/gk3hd/cli/common.py +160 -0
  14. gk3hd-1.0.0/src/gk3hd/cli/patch.py +127 -0
  15. gk3hd-1.0.0/src/gk3hd/cli/textures.py +388 -0
  16. gk3hd-1.0.0/src/gk3hd/driving_map.py +27 -0
  17. gk3hd-1.0.0/src/gk3hd/install.py +170 -0
  18. gk3hd-1.0.0/src/gk3hd/package/__init__.py +259 -0
  19. gk3hd-1.0.0/src/gk3hd/patch/__init__.py +5 -0
  20. gk3hd-1.0.0/src/gk3hd/patch/binary/__init__.py +17 -0
  21. gk3hd-1.0.0/src/gk3hd/patch/binary/aes.py +148 -0
  22. gk3hd-1.0.0/src/gk3hd/patch/binary/compiled.py +66 -0
  23. gk3hd-1.0.0/src/gk3hd/patch/binary/executor.py +70 -0
  24. gk3hd-1.0.0/src/gk3hd/patch/binary/image.py +426 -0
  25. gk3hd-1.0.0/src/gk3hd/patch/binary/mutations.py +173 -0
  26. gk3hd-1.0.0/src/gk3hd/patch/binary/normalize.py +71 -0
  27. gk3hd-1.0.0/src/gk3hd/patch/binary/operations.py +136 -0
  28. gk3hd-1.0.0/src/gk3hd/patch/binary/payload.py +109 -0
  29. gk3hd-1.0.0/src/gk3hd/patch/binary/x86.py +264 -0
  30. gk3hd-1.0.0/src/gk3hd/patch/builds.py +1632 -0
  31. gk3hd-1.0.0/src/gk3hd/patch/catalog.py +233 -0
  32. gk3hd-1.0.0/src/gk3hd/patch/definitions/README.md +54 -0
  33. gk3hd-1.0.0/src/gk3hd/patch/definitions/__init__.py +1 -0
  34. gk3hd-1.0.0/src/gk3hd/patch/definitions/engine.py +374 -0
  35. gk3hd-1.0.0/src/gk3hd/patch/definitions/guard_stale_mouse_move_targets.py +1494 -0
  36. gk3hd-1.0.0/src/gk3hd/patch/definitions/normalize_keyboard_camera_motion.py +332 -0
  37. gk3hd-1.0.0/src/gk3hd/patch/definitions/repair_2d_to_3d_transition_frames.py +801 -0
  38. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/__init__.py +5 -0
  39. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/captions.py +1029 -0
  40. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/compiler.py +249 -0
  41. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/console.py +377 -0
  42. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/cursor_history.py +83 -0
  43. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/dropdown_cache.py +37 -0
  44. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/fingerprint.py +879 -0
  45. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/fingerprint_alpha.py +200 -0
  46. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/fingerprint_tools.py +226 -0
  47. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/font_bank.py +505 -0
  48. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/font_sampling.py +182 -0
  49. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/geometry.py +17 -0
  50. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/gps.py +240 -0
  51. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/inventory.py +1068 -0
  52. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/inventory_alpha.py +525 -0
  53. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/inventory_filter.py +146 -0
  54. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/inventory_navigation.py +351 -0
  55. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/layout.py +913 -0
  56. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/map_overview.py +75 -0
  57. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/resource_driving_map.py +338 -0
  58. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/resource_selection.py +553 -0
  59. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/resource_timeblock.py +677 -0
  60. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/resources.py +883 -0
  61. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/room_rendering.py +105 -0
  62. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/sidney_alpha.py +198 -0
  63. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/sidney_composition.py +530 -0
  64. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/sidney_construction.py +324 -0
  65. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/sidney_frame.py +130 -0
  66. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/sidney_images.py +166 -0
  67. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/sidney_input.py +1097 -0
  68. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/sidney_presentation.py +1247 -0
  69. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/sprite_cache.py +483 -0
  70. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/styled_cache.py +117 -0
  71. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/system/__init__.py +5 -0
  72. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/system/binoculars.py +571 -0
  73. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/system/blit_dispatch.py +767 -0
  74. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/system/bordered_screens.py +270 -0
  75. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/system/compiler.py +553 -0
  76. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/system/cursor.py +1412 -0
  77. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/system/cursor_blend.py +110 -0
  78. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/system/cursor_density.py +92 -0
  79. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/system/fixed_screens.py +1866 -0
  80. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/system/lifecycle.py +15 -0
  81. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/system/load_save.py +2434 -0
  82. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/system/load_save_buttons.py +223 -0
  83. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/system/menu_action.py +822 -0
  84. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/system/menu_dropdown.py +505 -0
  85. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/system/menu_exports.py +44 -0
  86. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/system/menu_tooltip.py +1261 -0
  87. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/system/menus.py +417 -0
  88. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/system/resource_dimensions.py +134 -0
  89. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/system/room_status.py +221 -0
  90. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/system/shared.py +1077 -0
  91. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/system/toolbar_layout.py +95 -0
  92. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/system/toolbar_preview.py +94 -0
  93. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/system/zodiac.py +175 -0
  94. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/timeblock_overlay.py +176 -0
  95. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/ui_alpha.py +186 -0
  96. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/ui_filter.py +136 -0
  97. gk3hd-1.0.0/src/gk3hd/patch/definitions/runtime2d/ui_frames.py +618 -0
  98. gk3hd-1.0.0/src/gk3hd/patch/definitions/skip_steam_launcher.py +214 -0
  99. gk3hd-1.0.0/src/gk3hd/patch/definitions/speed_up_surface_checks.py +154 -0
  100. gk3hd-1.0.0/src/gk3hd/patch/install/__init__.py +1 -0
  101. gk3hd-1.0.0/src/gk3hd/patch/install/configuration.py +134 -0
  102. gk3hd-1.0.0/src/gk3hd/patch/install/journal.py +162 -0
  103. gk3hd-1.0.0/src/gk3hd/patch/install/launcher.py +99 -0
  104. gk3hd-1.0.0/src/gk3hd/patch/install/platform.py +17 -0
  105. gk3hd-1.0.0/src/gk3hd/patch/install/proton.py +137 -0
  106. gk3hd-1.0.0/src/gk3hd/patch/install/transaction.py +475 -0
  107. gk3hd-1.0.0/src/gk3hd/patch/install/windows.py +707 -0
  108. gk3hd-1.0.0/src/gk3hd/patch/manifest.py +308 -0
  109. gk3hd-1.0.0/src/gk3hd/patch/model.py +218 -0
  110. gk3hd-1.0.0/src/gk3hd/patch/planner.py +203 -0
  111. gk3hd-1.0.0/src/gk3hd/patch/service.py +145 -0
  112. gk3hd-1.0.0/src/gk3hd/renderer/LICENSE +24 -0
  113. gk3hd-1.0.0/src/gk3hd/renderer/README.md +163 -0
  114. gk3hd-1.0.0/src/gk3hd/renderer/__init__.py +1 -0
  115. gk3hd-1.0.0/src/gk3hd/renderer/artifact.py +169 -0
  116. gk3hd-1.0.0/src/gk3hd/renderer/build.ps1 +197 -0
  117. gk3hd-1.0.0/src/gk3hd/renderer/build.py +105 -0
  118. gk3hd-1.0.0/src/gk3hd/renderer/cli.py +101 -0
  119. gk3hd-1.0.0/src/gk3hd/renderer/distribution.py +225 -0
  120. gk3hd-1.0.0/src/gk3hd/renderer/renderer.patch +2948 -0
  121. gk3hd-1.0.0/src/gk3hd/renderer/service.py +238 -0
  122. gk3hd-1.0.0/src/gk3hd/renderer/state.py +111 -0
  123. gk3hd-1.0.0/src/gk3hd/renderer/tests/check_area_blend.cpp +118 -0
  124. gk3hd-1.0.0/src/gk3hd/renderer/tests/check_area_blt.cpp +178 -0
  125. gk3hd-1.0.0/src/gk3hd/renderer/tests/check_baseline_damage.cpp +63 -0
  126. gk3hd-1.0.0/src/gk3hd/renderer/tests/check_key_scaling.h +165 -0
  127. gk3hd-1.0.0/src/gk3hd/renderer/tests/check_lock_regions.cpp +57 -0
  128. gk3hd-1.0.0/src/gk3hd/renderer/tests/check_native_copy.cpp +141 -0
  129. gk3hd-1.0.0/src/gk3hd/renderer/tests/check_stretch.cpp +115 -0
  130. gk3hd-1.0.0/src/gk3hd/renderer/tests/check_surface_aliases.cpp +266 -0
  131. gk3hd-1.0.0/src/gk3hd/renderer/tests/check_surface_failures.h +232 -0
  132. gk3hd-1.0.0/src/gk3hd/renderer/tests/check_texture_lifetime.h +41 -0
  133. gk3hd-1.0.0/src/gk3hd/renderer/tests/dxvk.conf +4 -0
  134. gk3hd-1.0.0/src/gk3hd/renderer/tests/region_tests.cpp +59 -0
  135. gk3hd-1.0.0/src/gk3hd/renderer/toolchain.ps1 +50 -0
  136. gk3hd-1.0.0/src/gk3hd/renderer/upstream.json +13 -0
  137. gk3hd-1.0.0/src/gk3hd/system/__init__.py +1 -0
  138. gk3hd-1.0.0/src/gk3hd/system/appinfo.py +140 -0
  139. gk3hd-1.0.0/src/gk3hd/system/discovery.py +117 -0
  140. gk3hd-1.0.0/src/gk3hd/system/display.py +167 -0
  141. gk3hd-1.0.0/src/gk3hd/system/download.py +136 -0
  142. gk3hd-1.0.0/src/gk3hd/system/files.py +94 -0
  143. gk3hd-1.0.0/src/gk3hd/system/ini.py +150 -0
  144. gk3hd-1.0.0/src/gk3hd/system/locking.py +97 -0
  145. gk3hd-1.0.0/src/gk3hd/system/proton.py +271 -0
  146. gk3hd-1.0.0/src/gk3hd/system/steam.py +154 -0
  147. gk3hd-1.0.0/src/gk3hd/textures/__init__.py +5 -0
  148. gk3hd-1.0.0/src/gk3hd/textures/_vendor/__init__.py +2 -0
  149. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/LICENSE +201 -0
  150. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/NOTICE.md +19 -0
  151. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/__init__.py +5 -0
  152. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/common/__init__.py +1 -0
  153. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/common/cache.py +47 -0
  154. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/common/distributed/__init__.py +10 -0
  155. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/common/distributed/advanced.py +26 -0
  156. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/common/distributed/basic.py +29 -0
  157. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/common/distributed/ops.py +39 -0
  158. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/common/half_precision_fixes.py +160 -0
  159. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/common/logger.py +10 -0
  160. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/models/__init__.py +1 -0
  161. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/models/dit_3b/attention.py +123 -0
  162. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/models/dit_3b/embedding.py +62 -0
  163. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/models/dit_3b/mlp.py +62 -0
  164. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/models/dit_3b/mm.py +74 -0
  165. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/models/dit_3b/modulation.py +121 -0
  166. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/models/dit_3b/na.py +641 -0
  167. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/models/dit_3b/nablocks/__init__.py +26 -0
  168. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/models/dit_3b/nablocks/attention/__init__.py +25 -0
  169. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/models/dit_3b/nablocks/attention/mmattn.py +271 -0
  170. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/models/dit_3b/nablocks/mmsr_block.py +128 -0
  171. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/models/dit_3b/nadit.py +248 -0
  172. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/models/dit_3b/normalization.py +150 -0
  173. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/models/dit_3b/patch/__init__.py +19 -0
  174. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/models/dit_3b/patch/patch_v1.py +127 -0
  175. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/models/dit_3b/rope.py +184 -0
  176. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/models/dit_3b/window.py +83 -0
  177. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/models/video_vae_v3/__init__.py +1 -0
  178. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/models/video_vae_v3/modules/__init__.py +1 -0
  179. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/models/video_vae_v3/modules/attn_video_vae.py +1733 -0
  180. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/models/video_vae_v3/modules/causal_inflation_lib.py +503 -0
  181. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/models/video_vae_v3/modules/context_parallel_lib.py +67 -0
  182. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/models/video_vae_v3/modules/global_config.py +28 -0
  183. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/models/video_vae_v3/modules/types.py +76 -0
  184. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/optimization/__init__.py +1 -0
  185. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/optimization/compatibility.py +8 -0
  186. gk3hd-1.0.0/src/gk3hd/textures/_vendor/seedvr2/optimization/memory_manager.py +43 -0
  187. gk3hd-1.0.0/src/gk3hd/textures/analyze/__init__.py +1 -0
  188. gk3hd-1.0.0/src/gk3hd/textures/analyze/alpha_shape.py +43 -0
  189. gk3hd-1.0.0/src/gk3hd/textures/analyze/classify.py +115 -0
  190. gk3hd-1.0.0/src/gk3hd/textures/analyze/manifest.py +280 -0
  191. gk3hd-1.0.0/src/gk3hd/textures/analyze/policy.py +175 -0
  192. gk3hd-1.0.0/src/gk3hd/textures/analyze/script_usage.py +119 -0
  193. gk3hd-1.0.0/src/gk3hd/textures/analyze/usage.py +342 -0
  194. gk3hd-1.0.0/src/gk3hd/textures/bmp.py +225 -0
  195. gk3hd-1.0.0/src/gk3hd/textures/brn.py +397 -0
  196. gk3hd-1.0.0/src/gk3hd/textures/extraction.py +300 -0
  197. gk3hd-1.0.0/src/gk3hd/textures/flat.py +90 -0
  198. gk3hd-1.0.0/src/gk3hd/textures/install/__init__.py +1 -0
  199. gk3hd-1.0.0/src/gk3hd/textures/install/conversion.py +300 -0
  200. gk3hd-1.0.0/src/gk3hd/textures/install/journal.py +181 -0
  201. gk3hd-1.0.0/src/gk3hd/textures/install/service.py +466 -0
  202. gk3hd-1.0.0/src/gk3hd/textures/model.py +205 -0
  203. gk3hd-1.0.0/src/gk3hd/textures/native_bmp.py +47 -0
  204. gk3hd-1.0.0/src/gk3hd/textures/pack/__init__.py +1 -0
  205. gk3hd-1.0.0/src/gk3hd/textures/pack/build.py +276 -0
  206. gk3hd-1.0.0/src/gk3hd/textures/pack/format.py +286 -0
  207. gk3hd-1.0.0/src/gk3hd/textures/pack/source.py +437 -0
  208. gk3hd-1.0.0/src/gk3hd/textures/progress.py +80 -0
  209. gk3hd-1.0.0/src/gk3hd/textures/review.py +227 -0
  210. gk3hd-1.0.0/src/gk3hd/textures/routing.py +245 -0
  211. gk3hd-1.0.0/src/gk3hd/textures/upscale/__init__.py +1 -0
  212. gk3hd-1.0.0/src/gk3hd/textures/upscale/_lab.py +195 -0
  213. gk3hd-1.0.0/src/gk3hd/textures/upscale/alpha_guard.py +64 -0
  214. gk3hd-1.0.0/src/gk3hd/textures/upscale/cursor_art.py +72 -0
  215. gk3hd-1.0.0/src/gk3hd/textures/upscale/driving_map.py +90 -0
  216. gk3hd-1.0.0/src/gk3hd/textures/upscale/fingerprint.py +187 -0
  217. gk3hd-1.0.0/src/gk3hd/textures/upscale/fonts/__init__.py +1 -0
  218. gk3hd-1.0.0/src/gk3hd/textures/upscale/fonts/atlas.py +594 -0
  219. gk3hd-1.0.0/src/gk3hd/textures/upscale/fonts/bank.py +253 -0
  220. gk3hd-1.0.0/src/gk3hd/textures/upscale/fonts/button.py +69 -0
  221. gk3hd-1.0.0/src/gk3hd/textures/upscale/fonts/color.py +232 -0
  222. gk3hd-1.0.0/src/gk3hd/textures/upscale/fonts/coverage.py +192 -0
  223. gk3hd-1.0.0/src/gk3hd/textures/upscale/fonts/emboss.py +218 -0
  224. gk3hd-1.0.0/src/gk3hd/textures/upscale/fonts/layout.py +506 -0
  225. gk3hd-1.0.0/src/gk3hd/textures/upscale/fonts/outline.py +481 -0
  226. gk3hd-1.0.0/src/gk3hd/textures/upscale/fonts/reconstruction.py +389 -0
  227. gk3hd-1.0.0/src/gk3hd/textures/upscale/generation.py +41 -0
  228. gk3hd-1.0.0/src/gk3hd/textures/upscale/menu_art.py +189 -0
  229. gk3hd-1.0.0/src/gk3hd/textures/upscale/pipeline.py +596 -0
  230. gk3hd-1.0.0/src/gk3hd/textures/upscale/replacement.py +60 -0
  231. gk3hd-1.0.0/src/gk3hd/textures/upscale/seedvr2.py +531 -0
  232. gk3hd-1.0.0/src/gk3hd/textures/upscale/service.py +745 -0
  233. gk3hd-1.0.0/src/gk3hd/textures/upscale/sidney_frame.py +100 -0
  234. gk3hd-1.0.0/src/gk3hd/textures/upscale/thumbnail.py +290 -0
  235. gk3hd-1.0.0/src/gk3hd/textures/upscale/thumbnail_recipes.py +1114 -0
  236. gk3hd-1.0.0/src/gk3hd/textures/upscale/timeblock.py +141 -0
  237. gk3hd-1.0.0/src/gk3hd/textures/upscale/ui_art.py +591 -0
  238. gk3hd-1.0.0/src/gk3hd/textures/workspace.py +55 -0
gk3hd-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,239 @@
1
+ Metadata-Version: 2.4
2
+ Name: gk3hd
3
+ Version: 1.0.0
4
+ Summary: Modern high-resolution graphics for Gabriel Knight 3
5
+ Keywords: gabriel-knight-3,modding,upscaling,widescreen
6
+ Author: Laurent Sorber
7
+ License-Expression: MIT
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: Microsoft :: Windows
10
+ Classifier: Operating System :: POSIX :: Linux
11
+ Classifier: Programming Language :: Python :: 3.13
12
+ Classifier: Programming Language :: Python :: 3.14
13
+ Classifier: Topic :: Games/Entertainment
14
+ Requires-Dist: lzokay>=2.1,<3
15
+ Requires-Dist: pillow>=12.3.0
16
+ Requires-Dist: typer>=0.27.2
17
+ Requires-Dist: diffusers>=0.40 ; extra == 'upscale'
18
+ Requires-Dist: einops>=0.8.1 ; extra == 'upscale'
19
+ Requires-Dist: freetype-py==2.5.1 ; extra == 'upscale'
20
+ Requires-Dist: huggingface-hub>=0.34 ; extra == 'upscale'
21
+ Requires-Dist: numpy>=2.3 ; extra == 'upscale'
22
+ Requires-Dist: rotary-embedding-torch>=0.5.3 ; extra == 'upscale'
23
+ Requires-Dist: safetensors>=0.6 ; extra == 'upscale'
24
+ Requires-Dist: scipy>=1.16 ; extra == 'upscale'
25
+ Requires-Dist: torch>=2.8 ; extra == 'upscale'
26
+ Requires-Python: >=3.13, <4.0
27
+ Project-URL: Changelog, https://github.com/lsorber/gk3hd/releases
28
+ Project-URL: Issues, https://github.com/lsorber/gk3hd/issues
29
+ Project-URL: Repository, https://github.com/lsorber/gk3hd
30
+ Provides-Extra: upscale
31
+ Description-Content-Type: text/markdown
32
+
33
+ # GK3HD
34
+
35
+ This project's goal is to modernize [Gabriel Knight 3](https://en.wikipedia.org/wiki/Gabriel_Knight_3:_Blood_of_the_Sacred,_Blood_of_the_Damned) while faithfully preserving its original look and feel, using its highest supported resolution of 1024×768 as the visual reference.
36
+
37
+ ## Features
38
+
39
+ ### Features and fixes
40
+
41
+ - 🖥️ Select modern resolutions from the in-game menu
42
+ - 🗺️ Restored SIDNEY and driving map functionality at modern resolutions
43
+ - ⌨️ Fixed keyboard camera speed to match the 1024×768 reference
44
+ - 📐 UI scaled to match the 1024×768 reference
45
+ - 💿 Removed the game's disc drive requirement
46
+
47
+ ### Graphics improvements
48
+
49
+ - ⚙️ Highest-quality graphics settings by default
50
+ - 🔍 Added support for and enabled anisotropic filtering by default
51
+ - 🖼️ 99.63% of textures (>1024 pixels) upscaled at 4× resolution with [SeedVR2 3B](https://github.com/numz/ComfyUI-SeedVR2_VideoUpscaler)
52
+ - 🔤 90% of font atlases reconstructed at 4× resolution for sharper text
53
+ - 📍 Corrected location alignment with background on the driving map
54
+ - 👁️ Corrected facial feature alignment for 4× textures
55
+ - 🎨 Corrected gamma and colors to match the original game's native rendering
56
+
57
+ ### Performance and compatibility improvements
58
+
59
+ - ⚡ Modern Vulkan rendering with an improved [D7VK](https://github.com/WinterSnowfall/d7vk) build
60
+ - 🚀 Faster high-resolution rendering with fewer readbacks and less overhead
61
+ - 🧩 Support for the Steam and GOG editions
62
+ - 🐧 Experimental Linux and Steam Deck support through Proton
63
+
64
+ ## Install and use
65
+
66
+ > [!WARNING]
67
+ > `gk3hd` is currently considered beta software.
68
+
69
+ > [!TIP]
70
+ > On Linux, install/select Proton in Steam first and close GK3 before
71
+ > running the command in Desktop Mode. Settings are written through that game's
72
+ > Proton registry, including its `ddraw` override.
73
+
74
+ [Install uv](https://docs.astral.sh/uv/), then run this from a terminal on
75
+ Windows or on Linux with Steam and Proton:
76
+
77
+ ```sh
78
+ uvx gk3hd install # Download & install renderer, patch `GK3.exe`, download & install textures
79
+ uvx gk3hd status
80
+ uvx gk3hd uninstall
81
+ ```
82
+
83
+ Installation selects the current display resolution and finds Steam libraries
84
+ automatically. Windows requires Vulkan-capable graphics drivers.
85
+ Nonstandard game locations can use `--game-dir PATH` (protected Windows folders
86
+ may require an elevated terminal).
87
+
88
+ ## Advanced use
89
+
90
+ Use `gk3hd --help` for an overview of all top-level commands.
91
+
92
+ ### Patch the game
93
+
94
+ ```sh
95
+ uvx gk3hd patch list # Browse patch groups and individual patches
96
+ uvx gk3hd patch install --dry-run # Preview without changing the game
97
+ uvx gk3hd patch install # Apply the recommended executable patches
98
+ uvx gk3hd patch verify # Verify patches and game settings
99
+ uvx gk3hd patch uninstall # Restore the original executable and settings
100
+ ```
101
+
102
+ This leaves the renderer and textures untouched. Game location and display resolution are detected
103
+ automatically; override them with `--game-dir PATH` and `--resolution 3840x2160`.
104
+ Use `--group GROUP` or repeat `--patch PATCH_ID` to choose patches from `patch list`.
105
+ The two groups are `recommended` (default) and `testing` (recommended patches plus
106
+ skipping all movies). `--dry-run` lists the exact patches, including dependencies, without
107
+ changing the game.
108
+
109
+ ### Build and install the renderer
110
+
111
+ Install the published renderer independently, or build our modified D7VK locally:
112
+
113
+ ```sh
114
+ uvx gk3hd renderer build # Download source, build and test in `<GAME>/gk3hd/renderer/`
115
+ uvx gk3hd renderer install --local # Reinstall the last verified local build
116
+ uvx gk3hd renderer verify # Check the DLL and its platform settings
117
+ uvx gk3hd renderer uninstall # Restore the previous renderer and settings (uninstall patches first)
118
+ ```
119
+
120
+ Close GK3 before installation or removal. No manual copying or registry editing is needed.
121
+ Building requires the Windows C++ toolchain, activated automatically from a normal terminal;
122
+ install the result with `renderer install --local`.
123
+ Builds live under `<GAME>/gk3hd/renderer/`; matching verified builds are reused.
124
+ The game is detected automatically; use `--game-dir PATH` to select another installation.
125
+ `install --local` finds that game's last verified build, regardless of your current directory.
126
+ See the [native build requirements](src/gk3hd/renderer/README.md#build).
127
+ Use `renderer download` to download only, or
128
+ `renderer install --dll PATH` to select a local DLL. `renderer uninstall` restores
129
+ the previous settings after executable patches have been removed.
130
+
131
+ ### Extract, upscale, and install textures
132
+
133
+ To extract and upscale the original textures locally, use a persistent tool
134
+ installation:
135
+
136
+ ```sh
137
+ uv tool install "gk3hd[upscale]" --torch-backend auto
138
+ gk3hd textures extract # Extract BMPs from game archives to `<GAME>/gk3hd/textures/original/`
139
+ gk3hd textures analyze # Classify textures and write `<GAME>/gk3hd/textures/texture-analysis.json`
140
+ gk3hd textures upscale # Apply each texture's pipeline and write PNGs to `<GAME>/gk3hd/textures/upscaled/`
141
+ gk3hd textures pack # Bundle PNGs into a versioned texture-pack ZIP (or ZIP parts)
142
+ gk3hd textures install --local # Convert the local pack to BMPs in `<GAME>/gk3hd/textures/installed/` and enable in `GK3.ini`
143
+ gk3hd textures verify # Verify installed textures and their `GK3.ini` configuration
144
+ gk3hd textures uninstall # Remove installed textures and restore the previous `GK3.ini`
145
+ ```
146
+
147
+ These commands discover GK3 automatically and keep every texture stage under
148
+ `gk3hd/textures/` in the game directory: extracted BMPs in `original/`, the
149
+ shared `texture-analysis.json` beside the stage directories, release-ready PNGs
150
+ in `upscaled/`, and game-ready BMPs in `installed/`.
151
+
152
+ uv's automatic PyTorch backend selection uses a supported GPU when one is
153
+ available and otherwise falls back to CPU. CPU upscaling works, but is much
154
+ slower. Project checkouts select PyTorch's CUDA build on Windows automatically.
155
+
156
+ ## Development
157
+
158
+ ### Test
159
+
160
+ From a checkout:
161
+
162
+ ```sh
163
+ uv run poe lint # Formatting, lint, types and spelling
164
+ uv run poe test # Fast tests; never launches GK3
165
+ uv run poe test --slow # Also test reconstruction and native patch execution
166
+ uv run poe coverage # Both suites with coverage (slower instrumentation)
167
+ uv run poe visual # 12 views: ten day-one scenes, SIDNEY and the driving map
168
+ uv run poe visual --suite medium # 25 views across all three days, including key interfaces
169
+ uv run poe visual --suite large # 100 views: varied locations, characters and interface states
170
+ uv run poe visual -k driving # Select the driving interaction checks
171
+ ```
172
+
173
+ CI runs both portable suites on Linux. Windows API tests run automatically on
174
+ Windows and are excluded elsewhere. Neither suite needs the game or downloads
175
+ AI models; slow tests use small, representative fixtures, not the full texture catalog.
176
+ To run only slow tests, use `uv run poe test --slow -m slow`.
177
+
178
+ Visual tests require a patched game with its renderer and textures installed.
179
+ They compare original textures at 1024×768 against the mod at 4K, using one
180
+ generated save and curated camera recipes; your own saves are left untouched.
181
+ The sets are nested: medium includes small, and large includes medium. Medium
182
+ also covers inventory, the driving map, SIDNEY, save/restore, the title and a
183
+ timeblock. Large adds more interface states and locations.
184
+ Captures and animated WebPs go to ignored `build/visual/`, not your game folder.
185
+ Resume an interrupted run with `--resume build/visual/<run>`; unchanged, verified
186
+ world captures are reused. Start a new run after changing the game, assets or camera recipes.
187
+ Passing capture checks does not replace reviewing the images for visual fidelity.
188
+ Use `uv run --extra upscale gk3hd textures review` to compare texture pipeline alternatives.
189
+
190
+ ### Release
191
+
192
+ Commit your changes on `main` using conventional commits. From a clean checkout,
193
+ choose which assets to include:
194
+
195
+ ```sh
196
+ uv run gk3hd package draft # New package; reuse published assets
197
+ uv run gk3hd package draft --textures # Also pack/upload the local upscaled PNGs
198
+ uv run gk3hd package draft --renderer # Also upload the last verified local renderer build
199
+ uv run gk3hd package draft --textures --renderer # Include both
200
+ ```
201
+
202
+ Generate/review changed textures with `textures analyze` and `textures upscale`,
203
+ or build a changed renderer with `renderer build`, before drafting the release.
204
+
205
+ The draft command uses Commitizen to bump the version, runs normal checks,
206
+ commits release metadata, pushes the tag, and uploads a GitHub draft. Don't run
207
+ `cz bump` or `textures pack` separately. Review and publish the draft on GitHub
208
+ to publish to PyPI. Keep older asset releases available for pinned texture packs.
209
+ `package verify` checks that the published assets match their recorded identities.
210
+
211
+ ## Gallery
212
+
213
+ > [!NOTE]
214
+ > This gallery showcases ten Day 1 scenes plus SIDNEY and the driving map, alternating between the original at 1024×768 and GK3HD at 4K.
215
+ > Open an image to inspect it at full resolution.
216
+
217
+ ![Gabriel's hotel room](gallery/r25-110a-fr_du1.webp)
218
+
219
+ ![Gabriel in his hotel room](gallery/r25-110a-gabriel_portrait.webp)
220
+
221
+ ![Jean, the guest book and the painting](gallery/lby-110a-jean_desk.webp)
222
+
223
+ ![Hotel room-number buzzers](gallery/lby-110a-all_buzzers.webp)
224
+
225
+ ![Mosely and Gabriel in the hotel dining room](gallery/din-110a-breakfast_near.webp)
226
+
227
+ ![Gabriel and the mopeds in the courtyard](gallery/mop-110a-fr_rc1.webp)
228
+
229
+ ![Postcard tower and museum hallway](gallery/ms2-110a-postcards_hall.webp)
230
+
231
+ ![Lady Howard, Estelle and the museum panels](gallery/ms3-110a-visitors_panels.webp)
232
+
233
+ ![The fountain with the hotel behind it](gallery/rc1-110a-fountain_hotel.webp)
234
+
235
+ ![The bookstore beside the hotel](gallery/rc1-110a-bookstore_front.webp)
236
+
237
+ ![An email in SIDNEY](gallery/sidney-email.webp)
238
+
239
+ ![Driving map with Rennes-le-Chateau highlighted](gallery/driving-map-rennes-le-chateau-hover.webp)
gk3hd-1.0.0/README.md ADDED
@@ -0,0 +1,207 @@
1
+ # GK3HD
2
+
3
+ This project's goal is to modernize [Gabriel Knight 3](https://en.wikipedia.org/wiki/Gabriel_Knight_3:_Blood_of_the_Sacred,_Blood_of_the_Damned) while faithfully preserving its original look and feel, using its highest supported resolution of 1024×768 as the visual reference.
4
+
5
+ ## Features
6
+
7
+ ### Features and fixes
8
+
9
+ - 🖥️ Select modern resolutions from the in-game menu
10
+ - 🗺️ Restored SIDNEY and driving map functionality at modern resolutions
11
+ - ⌨️ Fixed keyboard camera speed to match the 1024×768 reference
12
+ - 📐 UI scaled to match the 1024×768 reference
13
+ - 💿 Removed the game's disc drive requirement
14
+
15
+ ### Graphics improvements
16
+
17
+ - ⚙️ Highest-quality graphics settings by default
18
+ - 🔍 Added support for and enabled anisotropic filtering by default
19
+ - 🖼️ 99.63% of textures (>1024 pixels) upscaled at 4× resolution with [SeedVR2 3B](https://github.com/numz/ComfyUI-SeedVR2_VideoUpscaler)
20
+ - 🔤 90% of font atlases reconstructed at 4× resolution for sharper text
21
+ - 📍 Corrected location alignment with background on the driving map
22
+ - 👁️ Corrected facial feature alignment for 4× textures
23
+ - 🎨 Corrected gamma and colors to match the original game's native rendering
24
+
25
+ ### Performance and compatibility improvements
26
+
27
+ - ⚡ Modern Vulkan rendering with an improved [D7VK](https://github.com/WinterSnowfall/d7vk) build
28
+ - 🚀 Faster high-resolution rendering with fewer readbacks and less overhead
29
+ - 🧩 Support for the Steam and GOG editions
30
+ - 🐧 Experimental Linux and Steam Deck support through Proton
31
+
32
+ ## Install and use
33
+
34
+ > [!WARNING]
35
+ > `gk3hd` is currently considered beta software.
36
+
37
+ > [!TIP]
38
+ > On Linux, install/select Proton in Steam first and close GK3 before
39
+ > running the command in Desktop Mode. Settings are written through that game's
40
+ > Proton registry, including its `ddraw` override.
41
+
42
+ [Install uv](https://docs.astral.sh/uv/), then run this from a terminal on
43
+ Windows or on Linux with Steam and Proton:
44
+
45
+ ```sh
46
+ uvx gk3hd install # Download & install renderer, patch `GK3.exe`, download & install textures
47
+ uvx gk3hd status
48
+ uvx gk3hd uninstall
49
+ ```
50
+
51
+ Installation selects the current display resolution and finds Steam libraries
52
+ automatically. Windows requires Vulkan-capable graphics drivers.
53
+ Nonstandard game locations can use `--game-dir PATH` (protected Windows folders
54
+ may require an elevated terminal).
55
+
56
+ ## Advanced use
57
+
58
+ Use `gk3hd --help` for an overview of all top-level commands.
59
+
60
+ ### Patch the game
61
+
62
+ ```sh
63
+ uvx gk3hd patch list # Browse patch groups and individual patches
64
+ uvx gk3hd patch install --dry-run # Preview without changing the game
65
+ uvx gk3hd patch install # Apply the recommended executable patches
66
+ uvx gk3hd patch verify # Verify patches and game settings
67
+ uvx gk3hd patch uninstall # Restore the original executable and settings
68
+ ```
69
+
70
+ This leaves the renderer and textures untouched. Game location and display resolution are detected
71
+ automatically; override them with `--game-dir PATH` and `--resolution 3840x2160`.
72
+ Use `--group GROUP` or repeat `--patch PATCH_ID` to choose patches from `patch list`.
73
+ The two groups are `recommended` (default) and `testing` (recommended patches plus
74
+ skipping all movies). `--dry-run` lists the exact patches, including dependencies, without
75
+ changing the game.
76
+
77
+ ### Build and install the renderer
78
+
79
+ Install the published renderer independently, or build our modified D7VK locally:
80
+
81
+ ```sh
82
+ uvx gk3hd renderer build # Download source, build and test in `<GAME>/gk3hd/renderer/`
83
+ uvx gk3hd renderer install --local # Reinstall the last verified local build
84
+ uvx gk3hd renderer verify # Check the DLL and its platform settings
85
+ uvx gk3hd renderer uninstall # Restore the previous renderer and settings (uninstall patches first)
86
+ ```
87
+
88
+ Close GK3 before installation or removal. No manual copying or registry editing is needed.
89
+ Building requires the Windows C++ toolchain, activated automatically from a normal terminal;
90
+ install the result with `renderer install --local`.
91
+ Builds live under `<GAME>/gk3hd/renderer/`; matching verified builds are reused.
92
+ The game is detected automatically; use `--game-dir PATH` to select another installation.
93
+ `install --local` finds that game's last verified build, regardless of your current directory.
94
+ See the [native build requirements](src/gk3hd/renderer/README.md#build).
95
+ Use `renderer download` to download only, or
96
+ `renderer install --dll PATH` to select a local DLL. `renderer uninstall` restores
97
+ the previous settings after executable patches have been removed.
98
+
99
+ ### Extract, upscale, and install textures
100
+
101
+ To extract and upscale the original textures locally, use a persistent tool
102
+ installation:
103
+
104
+ ```sh
105
+ uv tool install "gk3hd[upscale]" --torch-backend auto
106
+ gk3hd textures extract # Extract BMPs from game archives to `<GAME>/gk3hd/textures/original/`
107
+ gk3hd textures analyze # Classify textures and write `<GAME>/gk3hd/textures/texture-analysis.json`
108
+ gk3hd textures upscale # Apply each texture's pipeline and write PNGs to `<GAME>/gk3hd/textures/upscaled/`
109
+ gk3hd textures pack # Bundle PNGs into a versioned texture-pack ZIP (or ZIP parts)
110
+ gk3hd textures install --local # Convert the local pack to BMPs in `<GAME>/gk3hd/textures/installed/` and enable in `GK3.ini`
111
+ gk3hd textures verify # Verify installed textures and their `GK3.ini` configuration
112
+ gk3hd textures uninstall # Remove installed textures and restore the previous `GK3.ini`
113
+ ```
114
+
115
+ These commands discover GK3 automatically and keep every texture stage under
116
+ `gk3hd/textures/` in the game directory: extracted BMPs in `original/`, the
117
+ shared `texture-analysis.json` beside the stage directories, release-ready PNGs
118
+ in `upscaled/`, and game-ready BMPs in `installed/`.
119
+
120
+ uv's automatic PyTorch backend selection uses a supported GPU when one is
121
+ available and otherwise falls back to CPU. CPU upscaling works, but is much
122
+ slower. Project checkouts select PyTorch's CUDA build on Windows automatically.
123
+
124
+ ## Development
125
+
126
+ ### Test
127
+
128
+ From a checkout:
129
+
130
+ ```sh
131
+ uv run poe lint # Formatting, lint, types and spelling
132
+ uv run poe test # Fast tests; never launches GK3
133
+ uv run poe test --slow # Also test reconstruction and native patch execution
134
+ uv run poe coverage # Both suites with coverage (slower instrumentation)
135
+ uv run poe visual # 12 views: ten day-one scenes, SIDNEY and the driving map
136
+ uv run poe visual --suite medium # 25 views across all three days, including key interfaces
137
+ uv run poe visual --suite large # 100 views: varied locations, characters and interface states
138
+ uv run poe visual -k driving # Select the driving interaction checks
139
+ ```
140
+
141
+ CI runs both portable suites on Linux. Windows API tests run automatically on
142
+ Windows and are excluded elsewhere. Neither suite needs the game or downloads
143
+ AI models; slow tests use small, representative fixtures, not the full texture catalog.
144
+ To run only slow tests, use `uv run poe test --slow -m slow`.
145
+
146
+ Visual tests require a patched game with its renderer and textures installed.
147
+ They compare original textures at 1024×768 against the mod at 4K, using one
148
+ generated save and curated camera recipes; your own saves are left untouched.
149
+ The sets are nested: medium includes small, and large includes medium. Medium
150
+ also covers inventory, the driving map, SIDNEY, save/restore, the title and a
151
+ timeblock. Large adds more interface states and locations.
152
+ Captures and animated WebPs go to ignored `build/visual/`, not your game folder.
153
+ Resume an interrupted run with `--resume build/visual/<run>`; unchanged, verified
154
+ world captures are reused. Start a new run after changing the game, assets or camera recipes.
155
+ Passing capture checks does not replace reviewing the images for visual fidelity.
156
+ Use `uv run --extra upscale gk3hd textures review` to compare texture pipeline alternatives.
157
+
158
+ ### Release
159
+
160
+ Commit your changes on `main` using conventional commits. From a clean checkout,
161
+ choose which assets to include:
162
+
163
+ ```sh
164
+ uv run gk3hd package draft # New package; reuse published assets
165
+ uv run gk3hd package draft --textures # Also pack/upload the local upscaled PNGs
166
+ uv run gk3hd package draft --renderer # Also upload the last verified local renderer build
167
+ uv run gk3hd package draft --textures --renderer # Include both
168
+ ```
169
+
170
+ Generate/review changed textures with `textures analyze` and `textures upscale`,
171
+ or build a changed renderer with `renderer build`, before drafting the release.
172
+
173
+ The draft command uses Commitizen to bump the version, runs normal checks,
174
+ commits release metadata, pushes the tag, and uploads a GitHub draft. Don't run
175
+ `cz bump` or `textures pack` separately. Review and publish the draft on GitHub
176
+ to publish to PyPI. Keep older asset releases available for pinned texture packs.
177
+ `package verify` checks that the published assets match their recorded identities.
178
+
179
+ ## Gallery
180
+
181
+ > [!NOTE]
182
+ > This gallery showcases ten Day 1 scenes plus SIDNEY and the driving map, alternating between the original at 1024×768 and GK3HD at 4K.
183
+ > Open an image to inspect it at full resolution.
184
+
185
+ ![Gabriel's hotel room](gallery/r25-110a-fr_du1.webp)
186
+
187
+ ![Gabriel in his hotel room](gallery/r25-110a-gabriel_portrait.webp)
188
+
189
+ ![Jean, the guest book and the painting](gallery/lby-110a-jean_desk.webp)
190
+
191
+ ![Hotel room-number buzzers](gallery/lby-110a-all_buzzers.webp)
192
+
193
+ ![Mosely and Gabriel in the hotel dining room](gallery/din-110a-breakfast_near.webp)
194
+
195
+ ![Gabriel and the mopeds in the courtyard](gallery/mop-110a-fr_rc1.webp)
196
+
197
+ ![Postcard tower and museum hallway](gallery/ms2-110a-postcards_hall.webp)
198
+
199
+ ![Lady Howard, Estelle and the museum panels](gallery/ms3-110a-visitors_panels.webp)
200
+
201
+ ![The fountain with the hotel behind it](gallery/rc1-110a-fountain_hotel.webp)
202
+
203
+ ![The bookstore beside the hotel](gallery/rc1-110a-bookstore_front.webp)
204
+
205
+ ![An email in SIDNEY](gallery/sidney-email.webp)
206
+
207
+ ![Driving map with Rennes-le-Chateau highlighted](gallery/driving-map-rennes-le-chateau-hover.webp)
@@ -0,0 +1,233 @@
1
+ [project]
2
+ name = "gk3hd"
3
+ version = "1.0.0"
4
+ description = "Modern high-resolution graphics for Gabriel Knight 3"
5
+ readme = "README.md"
6
+ requires-python = ">=3.13,<4.0"
7
+ license = "MIT"
8
+ keywords = [
9
+ "gabriel-knight-3",
10
+ "modding",
11
+ "upscaling",
12
+ "widescreen",
13
+ ]
14
+ classifiers = [
15
+ "License :: OSI Approved :: MIT License",
16
+ "Operating System :: Microsoft :: Windows",
17
+ "Operating System :: POSIX :: Linux",
18
+ "Programming Language :: Python :: 3.13",
19
+ "Programming Language :: Python :: 3.14",
20
+ "Topic :: Games/Entertainment",
21
+ ]
22
+ dependencies = [
23
+ "lzokay>=2.1,<3",
24
+ "pillow>=12.3.0",
25
+ "typer>=0.27.2",
26
+ ]
27
+
28
+ [[project.authors]]
29
+ name = "Laurent Sorber"
30
+
31
+ [project.optional-dependencies]
32
+ upscale = [
33
+ "diffusers>=0.40",
34
+ "einops>=0.8.1",
35
+ "freetype-py==2.5.1",
36
+ "huggingface-hub>=0.34",
37
+ "numpy>=2.3",
38
+ "rotary-embedding-torch>=0.5.3",
39
+ "safetensors>=0.6",
40
+ "scipy>=1.16",
41
+ "torch>=2.8",
42
+ ]
43
+
44
+ [project.scripts]
45
+ gk3hd = "gk3hd.cli:app"
46
+
47
+ [project.urls]
48
+ Changelog = "https://github.com/lsorber/gk3hd/releases"
49
+ Issues = "https://github.com/lsorber/gk3hd/issues"
50
+ Repository = "https://github.com/lsorber/gk3hd"
51
+
52
+ [build-system]
53
+ requires = ["uv_build>=0.12.17,<0.13"]
54
+ build-backend = "uv_build"
55
+
56
+ [dependency-groups]
57
+ dev = [
58
+ "capstone>=5.0.6",
59
+ "codespell>=2.4.3",
60
+ "commitizen>=4.9",
61
+ "coverage>=7.10",
62
+ "numpy>=2.3",
63
+ "poethepoet>=0.38",
64
+ "pytest>=9.0",
65
+ "ruff>=0.16.8",
66
+ "scipy>=1.16",
67
+ "ty>=0.0.82",
68
+ "unicorn>=2.1.4",
69
+ "windows-capture>=2.0.1; sys_platform == 'win32'",
70
+ ]
71
+
72
+ [[tool.uv.sources.torch]]
73
+ index = "pytorch-cu130"
74
+ marker = "sys_platform == 'win32'"
75
+
76
+ [[tool.uv.index]]
77
+ name = "pytorch-cu130"
78
+ url = "https://download.pytorch.org/whl/cu130"
79
+ explicit = true
80
+
81
+ [tool.ruff]
82
+ extend-exclude = ["src/gk3hd/textures/_vendor"]
83
+ line-length = 100
84
+
85
+ [tool.ruff.format]
86
+ docstring-code-format = true
87
+
88
+ [tool.ruff.lint]
89
+ select = ["ALL"]
90
+ ignore = [
91
+ "COM812",
92
+ "CPY",
93
+ "D203",
94
+ "D213",
95
+ "FIX",
96
+ "PD008",
97
+ "PD009",
98
+ "TD003",
99
+ ]
100
+ unfixable = [
101
+ "ERA001",
102
+ "F401",
103
+ "F841",
104
+ "T201",
105
+ "T203",
106
+ ]
107
+
108
+ [tool.ruff.lint.per-file-ignores]
109
+ "src/gk3hd/cli/*.py" = [
110
+ "FBT001",
111
+ "FBT002",
112
+ "PLR0913",
113
+ "PLR0917",
114
+ ]
115
+ "src/gk3hd/patch/definitions/**/*.py" = [
116
+ "C901",
117
+ "PLR0912",
118
+ "PLR0913",
119
+ "PLR0915",
120
+ ]
121
+ "tests/**/*.py" = [
122
+ "D",
123
+ "FBT001",
124
+ "PLR2004",
125
+ "S101",
126
+ "SLF001",
127
+ ]
128
+
129
+ [tool.ruff.lint.flake8-tidy-imports]
130
+ ban-relative-imports = "all"
131
+
132
+ [tool.ruff.lint.isort]
133
+ split-on-trailing-comma = false
134
+
135
+ [tool.ruff.lint.pycodestyle]
136
+ max-doc-length = 100
137
+
138
+ [tool.ruff.lint.pydocstyle]
139
+ convention = "google"
140
+
141
+ [tool.ty.environment]
142
+ python-platform = "all"
143
+
144
+ [tool.ty.analysis]
145
+ allowed-unresolved-imports = [
146
+ "freetype.**",
147
+ "huggingface_hub.**",
148
+ "safetensors.**",
149
+ "torch.**",
150
+ "windows_capture",
151
+ ]
152
+
153
+ [tool.ty.src]
154
+ exclude = ["src/gk3hd/textures/_vendor"]
155
+
156
+ [tool.ty.rules]
157
+ unused-ignore-comment = "warn"
158
+
159
+ [tool.ty.terminal]
160
+ error-on-warning = true
161
+
162
+ [tool.pytest.ini_options]
163
+ addopts = [
164
+ "--strict-config",
165
+ "--strict-markers",
166
+ ]
167
+ testpaths = ["tests"]
168
+ filterwarnings = ["error"]
169
+ markers = [
170
+ "acceptance: uses a private local GK3 installation or full texture corpus",
171
+ "integration: exercises multiple production components",
172
+ "visual: opt-in live-game screenshots and interaction checks",
173
+ "slow: representative reconstruction and native-emulation checks, enabled with --slow",
174
+ "windows: requires Windows capture or operating-system APIs",
175
+ ]
176
+ xfail_strict = true
177
+
178
+ [tool.coverage.run]
179
+ branch = true
180
+ patch = ["subprocess"]
181
+ source = ["gk3hd"]
182
+ omit = ["src/gk3hd/textures/_vendor/*"]
183
+
184
+ [tool.coverage.report]
185
+ fail_under = 90
186
+ show_missing = true
187
+ skip_covered = true
188
+
189
+ [tool.codespell]
190
+ ignore-words-list = "lod,seh,tre"
191
+ skip = "./docs,./build,./dist,./src/gk3hd/assets/FACES.TXT,./src/gk3hd/assets/texture-policy.json,./src/gk3hd/textures/_vendor,./src/gk3hd/renderer/renderer.patch,./uv.lock"
192
+
193
+ [tool.commitizen]
194
+ version_provider = "uv"
195
+ tag_format = "v$version"
196
+ bump_message = "bump: v$current_version → v$new_version"
197
+ update_changelog_on_bump = true
198
+ changelog_incremental = true
199
+
200
+ [tool.poe.tasks]
201
+ format = "ruff format ."
202
+
203
+ [[tool.poe.tasks.lint]]
204
+ cmd = "ruff format --check ."
205
+
206
+ [[tool.poe.tasks.lint]]
207
+ cmd = "ruff check ."
208
+
209
+ [[tool.poe.tasks.lint]]
210
+ cmd = "ty check"
211
+
212
+ [[tool.poe.tasks.lint]]
213
+ cmd = "codespell ."
214
+
215
+ [tool.poe.tasks.visual]
216
+ cmd = "pytest tests/visual --visual"
217
+ help = "Opt-in visual comparisons (small=12, medium=25, large=100)"
218
+
219
+ [tool.poe.tasks.test]
220
+ cmd = "pytest"
221
+ help = "Fast tests; add --slow to include reconstruction and native emulation"
222
+
223
+ [[tool.poe.tasks.coverage.sequence]]
224
+ cmd = "coverage erase"
225
+
226
+ [[tool.poe.tasks.coverage.sequence]]
227
+ cmd = "coverage run -m pytest --slow"
228
+
229
+ [[tool.poe.tasks.coverage.sequence]]
230
+ cmd = "coverage combine"
231
+
232
+ [[tool.poe.tasks.coverage.sequence]]
233
+ cmd = "coverage report"