tcod 17.1.0__tar.gz → 18.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 (213) hide show
  1. {tcod-17.1.0 → tcod-18.0.0}/CHANGELOG.md +19 -0
  2. {tcod-17.1.0 → tcod-18.0.0}/PKG-INFO +1 -1
  3. {tcod-17.1.0 → tcod-18.0.0}/build_libtcod.py +5 -3
  4. {tcod-17.1.0 → tcod-18.0.0}/build_sdl.py +6 -6
  5. {tcod-17.1.0 → tcod-18.0.0}/pyproject.toml +25 -41
  6. {tcod-17.1.0 → tcod-18.0.0}/setup.py +4 -2
  7. {tcod-17.1.0 → tcod-18.0.0}/tcod/__init__.py +1 -1
  8. {tcod-17.1.0 → tcod-18.0.0}/tcod/_internal.py +11 -48
  9. {tcod-17.1.0 → tcod-18.0.0}/tcod/bsp.py +13 -22
  10. {tcod-17.1.0 → tcod-18.0.0}/tcod/cffi.py +2 -2
  11. {tcod-17.1.0 → tcod-18.0.0}/tcod/console.py +256 -61
  12. {tcod-17.1.0 → tcod-18.0.0}/tcod/context.py +3 -3
  13. {tcod-17.1.0 → tcod-18.0.0}/tcod/event.py +17 -7
  14. {tcod-17.1.0 → tcod-18.0.0}/tcod/image.py +48 -16
  15. {tcod-17.1.0 → tcod-18.0.0}/tcod/libtcodpy.py +23 -23
  16. {tcod-17.1.0 → tcod-18.0.0}/tcod/los.py +4 -2
  17. {tcod-17.1.0 → tcod-18.0.0}/tcod/map.py +4 -2
  18. {tcod-17.1.0 → tcod-18.0.0}/tcod/noise.py +8 -6
  19. {tcod-17.1.0 → tcod-18.0.0}/tcod/path.py +40 -31
  20. {tcod-17.1.0 → tcod-18.0.0}/tcod/sdl/_internal.py +6 -4
  21. {tcod-17.1.0 → tcod-18.0.0}/tcod/sdl/audio.py +7 -4
  22. {tcod-17.1.0 → tcod-18.0.0}/tcod/sdl/mouse.py +5 -3
  23. {tcod-17.1.0 → tcod-18.0.0}/tcod/sdl/render.py +4 -2
  24. {tcod-17.1.0 → tcod-18.0.0}/tcod/sdl/sys.py +3 -1
  25. {tcod-17.1.0 → tcod-18.0.0}/tcod/sdl/video.py +7 -3
  26. {tcod-17.1.0 → tcod-18.0.0}/tcod/tcod.py +1 -1
  27. {tcod-17.1.0 → tcod-18.0.0}/tcod/tileset.py +13 -7
  28. {tcod-17.1.0 → tcod-18.0.0}/tcod/version.py +2 -2
  29. {tcod-17.1.0 → tcod-18.0.0}/tcod.egg-info/PKG-INFO +1 -1
  30. {tcod-17.1.0 → tcod-18.0.0}/CONTRIBUTING.md +0 -0
  31. {tcod-17.1.0 → tcod-18.0.0}/LICENSE.txt +0 -0
  32. {tcod-17.1.0 → tcod-18.0.0}/MANIFEST.in +0 -0
  33. {tcod-17.1.0 → tcod-18.0.0}/README.rst +0 -0
  34. {tcod-17.1.0 → tcod-18.0.0}/libtcod/CHANGELOG.md +0 -0
  35. {tcod-17.1.0 → tcod-18.0.0}/libtcod/CMakeLists.txt +0 -0
  36. {tcod-17.1.0 → tcod-18.0.0}/libtcod/CONTRIBUTING.md +0 -0
  37. {tcod-17.1.0 → tcod-18.0.0}/libtcod/LIBTCOD-CREDITS.txt +0 -0
  38. {tcod-17.1.0 → tcod-18.0.0}/libtcod/LICENSE.txt +0 -0
  39. {tcod-17.1.0 → tcod-18.0.0}/libtcod/README.md +0 -0
  40. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/bresenham.h +0 -0
  41. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/bresenham_c.c +0 -0
  42. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/bsp.h +0 -0
  43. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/bsp_c.c +0 -0
  44. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/color.c +0 -0
  45. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/color.h +0 -0
  46. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/config.h +0 -0
  47. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/console.c +0 -0
  48. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/console.h +0 -0
  49. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/console_drawing.c +0 -0
  50. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/console_drawing.h +0 -0
  51. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/console_etc.c +0 -0
  52. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/console_etc.h +0 -0
  53. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/console_init.c +0 -0
  54. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/console_init.h +0 -0
  55. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/console_printing.c +0 -0
  56. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/console_printing.h +0 -0
  57. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/console_rexpaint.c +0 -0
  58. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/console_rexpaint.h +0 -0
  59. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/console_types.h +0 -0
  60. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/context.c +0 -0
  61. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/context.h +0 -0
  62. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/context_init.c +0 -0
  63. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/context_init.h +0 -0
  64. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/context_viewport.c +0 -0
  65. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/context_viewport.h +0 -0
  66. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/error.c +0 -0
  67. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/error.h +0 -0
  68. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/fov.h +0 -0
  69. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/fov_c.c +0 -0
  70. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/fov_circular_raycasting.c +0 -0
  71. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/fov_diamond_raycasting.c +0 -0
  72. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/fov_permissive2.c +0 -0
  73. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/fov_recursive_shadowcasting.c +0 -0
  74. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/fov_restrictive.c +0 -0
  75. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/fov_symmetric_shadowcast.c +0 -0
  76. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/fov_types.h +0 -0
  77. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/globals.c +0 -0
  78. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/globals.h +0 -0
  79. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/heapq.c +0 -0
  80. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/heapq.h +0 -0
  81. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/heightmap.h +0 -0
  82. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/heightmap_c.c +0 -0
  83. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/image.h +0 -0
  84. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/image_c.c +0 -0
  85. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/lex.h +0 -0
  86. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/lex_c.c +0 -0
  87. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/libtcod.h +0 -0
  88. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/libtcod_int.h +0 -0
  89. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/list.h +0 -0
  90. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/list_c.c +0 -0
  91. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/logging.c +0 -0
  92. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/logging.h +0 -0
  93. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/mersenne.h +0 -0
  94. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/mersenne_c.c +0 -0
  95. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/mersenne_types.h +0 -0
  96. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/mouse.h +0 -0
  97. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/mouse_types.h +0 -0
  98. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/namegen.h +0 -0
  99. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/namegen_c.c +0 -0
  100. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/noise.h +0 -0
  101. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/noise_c.c +0 -0
  102. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/noise_defaults.h +0 -0
  103. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/parser.h +0 -0
  104. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/parser_c.c +0 -0
  105. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/path.h +0 -0
  106. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/path_c.c +0 -0
  107. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/pathfinder.c +0 -0
  108. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/pathfinder.h +0 -0
  109. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/pathfinder_frontier.c +0 -0
  110. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/pathfinder_frontier.h +0 -0
  111. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/portability.h +0 -0
  112. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/random.c +0 -0
  113. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/random.h +0 -0
  114. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/renderer_sdl2.c +0 -0
  115. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/renderer_sdl2.h +0 -0
  116. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/renderer_xterm.c +0 -0
  117. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/renderer_xterm.h +0 -0
  118. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/sdl2/console_grid.glslf +0 -0
  119. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/sdl2/console_grid.glslv +0 -0
  120. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/sdl2/event.h +0 -0
  121. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/sys.h +0 -0
  122. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/sys_c.c +0 -0
  123. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/sys_sdl_c.c +0 -0
  124. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/sys_sdl_img_bmp.c +0 -0
  125. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/sys_sdl_img_png.c +0 -0
  126. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/tileset.c +0 -0
  127. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/tileset.h +0 -0
  128. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/tileset_bdf.c +0 -0
  129. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/tileset_bdf.h +0 -0
  130. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/tileset_fallback.c +0 -0
  131. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/tileset_fallback.h +0 -0
  132. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/tileset_render.c +0 -0
  133. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/tileset_render.h +0 -0
  134. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/tileset_truetype.c +0 -0
  135. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/tileset_truetype.h +0 -0
  136. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/timer.h +0 -0
  137. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/tree.h +0 -0
  138. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/tree_c.c +0 -0
  139. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/txtfield.h +0 -0
  140. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/txtfield_c.c +0 -0
  141. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/utility.h +0 -0
  142. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/version.h +0 -0
  143. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/wrappers.c +0 -0
  144. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/wrappers.h +0 -0
  145. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/zip.h +0 -0
  146. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod/zip_c.c +0 -0
  147. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod.h +0 -0
  148. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/libtcod_c.c +0 -0
  149. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/khrplatform.h +0 -0
  150. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/lodepng.c +0 -0
  151. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/lodepng.h +0 -0
  152. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/stb.c +0 -0
  153. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/stb_ds.h +0 -0
  154. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/stb_truetype.h +0 -0
  155. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/utf8proc/utf8proc.c +0 -0
  156. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/utf8proc/utf8proc.h +0 -0
  157. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/utf8proc/utf8proc_data.c +0 -0
  158. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/zlib/adler32.c +0 -0
  159. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/zlib/compress.c +0 -0
  160. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/zlib/crc32.c +0 -0
  161. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/zlib/crc32.h +0 -0
  162. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/zlib/deflate.c +0 -0
  163. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/zlib/deflate.h +0 -0
  164. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/zlib/gzclose.c +0 -0
  165. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/zlib/gzguts.h +0 -0
  166. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/zlib/gzlib.c +0 -0
  167. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/zlib/gzread.c +0 -0
  168. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/zlib/gzwrite.c +0 -0
  169. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/zlib/infback.c +0 -0
  170. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/zlib/inffast.c +0 -0
  171. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/zlib/inffast.h +0 -0
  172. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/zlib/inffixed.h +0 -0
  173. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/zlib/inflate.c +0 -0
  174. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/zlib/inflate.h +0 -0
  175. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/zlib/inftrees.c +0 -0
  176. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/zlib/inftrees.h +0 -0
  177. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/zlib/trees.c +0 -0
  178. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/zlib/trees.h +0 -0
  179. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/zlib/uncompr.c +0 -0
  180. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/zlib/zconf.h +0 -0
  181. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/zlib/zlib.h +0 -0
  182. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/zlib/zutil.c +0 -0
  183. {tcod-17.1.0 → tcod-18.0.0}/libtcod/src/vendor/zlib/zutil.h +0 -0
  184. {tcod-17.1.0 → tcod-18.0.0}/libtcodpy.py +0 -0
  185. {tcod-17.1.0 → tcod-18.0.0}/requirements.txt +0 -0
  186. {tcod-17.1.0 → tcod-18.0.0}/setup.cfg +0 -0
  187. {tcod-17.1.0 → tcod-18.0.0}/tcod/__pyinstaller/__init__.py +0 -0
  188. {tcod-17.1.0 → tcod-18.0.0}/tcod/__pyinstaller/hook-tcod.py +0 -0
  189. {tcod-17.1.0 → tcod-18.0.0}/tcod/cdef.h +0 -0
  190. {tcod-17.1.0 → tcod-18.0.0}/tcod/cffi.h +0 -0
  191. {tcod-17.1.0 → tcod-18.0.0}/tcod/color.py +0 -0
  192. {tcod-17.1.0 → tcod-18.0.0}/tcod/constants.py +0 -0
  193. {tcod-17.1.0 → tcod-18.0.0}/tcod/event_constants.py +0 -0
  194. {tcod-17.1.0 → tcod-18.0.0}/tcod/noise.c +0 -0
  195. {tcod-17.1.0 → tcod-18.0.0}/tcod/noise.h +0 -0
  196. {tcod-17.1.0 → tcod-18.0.0}/tcod/path.c +0 -0
  197. {tcod-17.1.0 → tcod-18.0.0}/tcod/path.h +0 -0
  198. {tcod-17.1.0 → tcod-18.0.0}/tcod/py.typed +0 -0
  199. {tcod-17.1.0 → tcod-18.0.0}/tcod/random.h +0 -0
  200. {tcod-17.1.0 → tcod-18.0.0}/tcod/random.py +0 -0
  201. {tcod-17.1.0 → tcod-18.0.0}/tcod/render.py +0 -0
  202. {tcod-17.1.0 → tcod-18.0.0}/tcod/sdl/__init__.py +0 -0
  203. {tcod-17.1.0 → tcod-18.0.0}/tcod/sdl/joystick.py +0 -0
  204. {tcod-17.1.0 → tcod-18.0.0}/tcod/tcod.c +0 -0
  205. {tcod-17.1.0 → tcod-18.0.0}/tcod/tcod.h +0 -0
  206. {tcod-17.1.0 → tcod-18.0.0}/tcod/tdl.c +0 -0
  207. {tcod-17.1.0 → tcod-18.0.0}/tcod/tdl.h +0 -0
  208. {tcod-17.1.0 → tcod-18.0.0}/tcod.egg-info/SOURCES.txt +0 -0
  209. {tcod-17.1.0 → tcod-18.0.0}/tcod.egg-info/dependency_links.txt +0 -0
  210. {tcod-17.1.0 → tcod-18.0.0}/tcod.egg-info/entry_points.txt +0 -0
  211. {tcod-17.1.0 → tcod-18.0.0}/tcod.egg-info/requires.txt +0 -0
  212. {tcod-17.1.0 → tcod-18.0.0}/tcod.egg-info/top_level.txt +0 -0
  213. {tcod-17.1.0 → tcod-18.0.0}/tox.ini +0 -0
@@ -6,6 +6,25 @@ This project adheres to [Semantic Versioning](https://semver.org/) since version
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [18.0.0] - 2025-04-08
10
+
11
+ ### Changed
12
+
13
+ - `Console.print` now accepts `height` and `width` keywords and has renamed `string` to `text`.
14
+ - Text printed with `Console.print` using right-alignment has been shifted to the left by 1-tile.
15
+
16
+ ### Deprecated
17
+
18
+ - In general the `fg`, `bg`, and `bg_blend` keywords are too hard to keep track of as positional arguments so they must be replaced with keyword arguments instead.
19
+ - `Console.print`: deprecated `string`, `fg`, `bg`, and `bg_blend` being given as positional arguments.
20
+ The `string` parameter has been renamed to `text`.
21
+ - `Console.print_box` has been replaced by `Console.print`.
22
+ - `Console.draw_frame`: deprecated `clear`, `fg`, `bg`, and `bg_blend` being given as positional arguments.
23
+ - `Console.draw_rect`: deprecated `fg`, `bg`, and `bg_blend` being given as positional arguments.
24
+ - The `EventDispatch` class is now deprecated.
25
+ This class was made before Python supported protocols and structural pattern matching,
26
+ now the class serves little purpose and its usage can create a minor technical burden.
27
+
9
28
  ## [17.1.0] - 2025-03-29
10
29
 
11
30
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tcod
3
- Version: 17.1.0
3
+ Version: 18.0.0
4
4
  Summary: The official Python port of libtcod.
5
5
  Author-email: Kyle Benesch <4b796c65+tcod@gmail.com>
6
6
  License: Simplified BSD License
@@ -14,6 +14,8 @@ from typing import Any, ClassVar, Iterable, Iterator
14
14
 
15
15
  from cffi import FFI
16
16
 
17
+ # ruff: noqa: T201
18
+
17
19
  sys.path.append(str(Path(__file__).parent)) # Allow importing local modules.
18
20
 
19
21
  import build_sdl
@@ -50,14 +52,14 @@ class ParsedHeader:
50
52
 
51
53
  def __init__(self, path: Path) -> None:
52
54
  """Initialize and organize a header file."""
53
- self.path = path = path.resolve(True)
55
+ self.path = path = path.resolve(strict=True)
54
56
  directory = path.parent
55
57
  depends = set()
56
58
  header = self.path.read_text(encoding="utf-8")
57
59
  header = RE_COMMENT.sub("", header)
58
60
  header = RE_CPLUSPLUS.sub("", header)
59
61
  for dependency in RE_INCLUDE.findall(header):
60
- depends.add((directory / str(dependency)).resolve(True))
62
+ depends.add((directory / str(dependency)).resolve(strict=True))
61
63
  header = RE_PREPROCESSOR.sub("", header)
62
64
  header = RE_TAGS.sub("", header)
63
65
  header = RE_VAFUNC.sub("", header)
@@ -91,7 +93,7 @@ def walk_includes(directory: str) -> Iterator[ParsedHeader]:
91
93
  if file in HEADER_PARSE_EXCLUDES:
92
94
  continue
93
95
  if file.endswith(".h"):
94
- yield ParsedHeader(Path(path, file).resolve(True))
96
+ yield ParsedHeader(Path(path, file).resolve(strict=True))
95
97
 
96
98
 
97
99
  def resolve_dependencies(
@@ -14,11 +14,11 @@ import zipfile
14
14
  from pathlib import Path
15
15
  from typing import Any
16
16
 
17
- import pcpp # type: ignore
17
+ import pcpp # type: ignore[import-untyped]
18
18
  import requests
19
19
 
20
20
  # This script calls a lot of programs.
21
- # ruff: noqa: S603, S607
21
+ # ruff: noqa: S603, S607, T201
22
22
 
23
23
  BIT_SIZE, LINKAGE = platform.architecture()
24
24
 
@@ -141,7 +141,7 @@ def unpack_sdl2(version: str) -> Path:
141
141
  return sdl2_path
142
142
 
143
143
 
144
- class SDLParser(pcpp.Preprocessor): # type: ignore
144
+ class SDLParser(pcpp.Preprocessor): # type: ignore[misc]
145
145
  """A modified preprocessor to output code in a format for CFFI."""
146
146
 
147
147
  def __init__(self) -> None:
@@ -159,7 +159,7 @@ class SDLParser(pcpp.Preprocessor): # type: ignore
159
159
  buffer.write(f"#define {name} ...\n")
160
160
  return buffer.getvalue()
161
161
 
162
- def on_include_not_found(self, is_malformed: bool, is_system_include: bool, curdir: str, includepath: str) -> None:
162
+ def on_include_not_found(self, is_malformed: bool, is_system_include: bool, curdir: str, includepath: str) -> None: # noqa: ARG002, FBT001
163
163
  """Remove bad includes such as stddef.h and stdarg.h."""
164
164
  raise pcpp.OutputDirective(pcpp.Action.IgnoreAndRemove)
165
165
 
@@ -190,7 +190,7 @@ class SDLParser(pcpp.Preprocessor): # type: ignore
190
190
  self,
191
191
  directive: Any, # noqa: ANN401
192
192
  tokens: list[Any],
193
- if_passthru: bool,
193
+ if_passthru: bool, # noqa: FBT001
194
194
  preceding_tokens: list[Any],
195
195
  ) -> Any: # noqa: ANN401
196
196
  """Catch and store definitions."""
@@ -204,7 +204,7 @@ class SDLParser(pcpp.Preprocessor): # type: ignore
204
204
 
205
205
  check_sdl_version()
206
206
 
207
- if sys.platform in ["win32", "darwin"]:
207
+ if sys.platform == "win32" or sys.platform == "darwin":
208
208
  SDL2_PARSE_PATH = unpack_sdl2(SDL2_PARSE_VERSION)
209
209
  SDL2_BUNDLE_PATH = unpack_sdl2(SDL2_BUNDLE_VERSION)
210
210
 
@@ -99,8 +99,7 @@ addopts = [
99
99
  log_file_level = "DEBUG"
100
100
  faulthandler_timeout = 5
101
101
  filterwarnings = [
102
- "ignore::DeprecationWarning:tcod.libtcodpy",
103
- "ignore::PendingDeprecationWarning:tcod.libtcodpy",
102
+ "ignore:This function may be deprecated in the future:PendingDeprecationWarning",
104
103
  "ignore:This class may perform poorly and is no longer needed.::tcod.map",
105
104
  "ignore:'import tcod as libtcodpy' is preferred.",
106
105
  ]
@@ -150,46 +149,31 @@ extend-exclude = ["libtcod"] # Ignore submodule
150
149
  line-length = 120
151
150
 
152
151
  [tool.ruff.lint] # https://docs.astral.sh/ruff/rules/
153
- select = [
154
- "C90", # mccabe
155
- "E", # pycodestyle
156
- "W", # pycodestyle
157
- "F", # Pyflakes
158
- "I", # isort
159
- "UP", # pyupgrade
160
- "YTT", # flake8-2020
161
- "ANN", # flake8-annotations
162
- "S", # flake8-bandit
163
- "B", # flake8-bugbear
164
- "C4", # flake8-comprehensions
165
- "DTZ", # flake8-datetimez
166
- "EM", # flake8-errmsg
167
- "EXE", # flake8-executable
168
- "RET", # flake8-return
169
- "ICN", # flake8-import-conventions
170
- "PIE", # flake8-pie
171
- "PT", # flake8-pytest-style
172
- "SIM", # flake8-simplify
173
- "PTH", # flake8-use-pathlib
174
- "PL", # Pylint
175
- "TRY", # tryceratops
176
- "RUF", # NumPy-specific rules
177
- "G", # flake8-logging-format
178
- "D", # pydocstyle
179
- ]
152
+ select = ["ALL"]
180
153
  ignore = [
181
- "E501", # line-too-long
182
- "S101", # assert
183
- "S301", # suspicious-pickle-usage
184
- "S311", # suspicious-non-cryptographic-random-usage
185
- "D203", # one-blank-line-before-class
186
- "D204", # one-blank-line-after-class
187
- "D213", # multi-line-summary-second-line
188
- "D407", # dashed-underline-after-section
189
- "D408", # section-underline-after-name
190
- "D409", # section-underline-matches-section-length
191
- "D206", # indent-with-spaces
192
- "W191", # tab-indentation
154
+ "COM", # flake8-commas
155
+ "D203", # one-blank-line-before-class
156
+ "D204", # one-blank-line-after-class
157
+ "D213", # multi-line-summary-second-line
158
+ "D407", # dashed-underline-after-section
159
+ "D408", # section-underline-after-name
160
+ "D409", # section-underline-matches-section-length
161
+ "D206", # indent-with-spaces
162
+ "E501", # line-too-long
163
+ "PYI064", # redundant-final-literal
164
+ "S101", # assert
165
+ "S301", # suspicious-pickle-usage
166
+ "S311", # suspicious-non-cryptographic-random-usage
167
+ "SLF001", # private-member-access
168
+ "W191", # tab-indentation
169
+ ]
170
+ [tool.ruff.lint.per-file-ignores]
171
+ "**/{tests}/*" = [
172
+ "D103", # undocumented-public-function
173
+ ]
174
+ "**/{tests,docs,examples,scripts}/*" = [
175
+ "D103", # undocumented-public-function
176
+ "T201", # print
193
177
  ]
194
178
 
195
179
  [tool.ruff.lint.pydocstyle] # https://docs.astral.sh/ruff/settings/#lintpydocstyle
@@ -10,6 +10,8 @@ from pathlib import Path
10
10
 
11
11
  from setuptools import setup
12
12
 
13
+ # ruff: noqa: T201
14
+
13
15
  SDL_VERSION_NEEDED = (2, 0, 5)
14
16
 
15
17
  SETUP_DIR = Path(__file__).parent # setup.py current directory
@@ -17,7 +19,7 @@ SETUP_DIR = Path(__file__).parent # setup.py current directory
17
19
 
18
20
  def get_package_data() -> list[str]:
19
21
  """Get data files which will be included in the main tcod/ directory."""
20
- BIT_SIZE, _ = platform.architecture()
22
+ bit_size, _ = platform.architecture()
21
23
  files = [
22
24
  "py.typed",
23
25
  "lib/LIBTCOD-CREDITS.txt",
@@ -25,7 +27,7 @@ def get_package_data() -> list[str]:
25
27
  "lib/README-SDL.txt",
26
28
  ]
27
29
  if "win32" in sys.platform:
28
- if BIT_SIZE == "32bit":
30
+ if bit_size == "32bit":
29
31
  files += ["x86/SDL2.dll"]
30
32
  else:
31
33
  files += ["x64/SDL2.dll"]
@@ -13,7 +13,7 @@ from pkgutil import extend_path
13
13
 
14
14
  __path__ = extend_path(__path__, __name__)
15
15
 
16
- from tcod import bsp, color, console, context, event, image, los, map, noise, path, random, tileset
16
+ from tcod import bsp, color, console, context, event, image, los, map, noise, path, random, tileset # noqa: A004
17
17
  from tcod.cffi import __sdl_version__, ffi, lib
18
18
  from tcod.tcod import __getattr__ # noqa: F401
19
19
  from tcod.version import __version__
@@ -5,18 +5,16 @@ from __future__ import annotations
5
5
  import locale
6
6
  import sys
7
7
  import warnings
8
- from pathlib import Path
9
- from types import TracebackType
10
8
  from typing import TYPE_CHECKING, Any, AnyStr, Callable, NoReturn, SupportsInt, TypeVar
11
9
 
12
- import numpy as np
13
- from numpy.typing import ArrayLike, NDArray
14
10
  from typing_extensions import Literal, LiteralString, deprecated
15
11
 
16
12
  from tcod.cffi import ffi, lib
17
13
 
18
14
  if TYPE_CHECKING:
19
- import tcod.image
15
+ from pathlib import Path
16
+ from types import TracebackType
17
+
20
18
 
21
19
  FuncType = Callable[..., Any]
22
20
  F = TypeVar("F", bound=FuncType)
@@ -24,7 +22,11 @@ T = TypeVar("T")
24
22
 
25
23
 
26
24
  def _deprecate_passthrough(
27
- message: str, /, *, category: type[Warning] = DeprecationWarning, stacklevel: int = 0
25
+ message: str, # noqa: ARG001
26
+ /,
27
+ *,
28
+ category: type[Warning] = DeprecationWarning, # noqa: ARG001
29
+ stacklevel: int = 0, # noqa: ARG001
28
30
  ) -> Callable[[F], F]:
29
31
  """Return a decorator which skips wrapping a warning onto functions. This is used for non-debug runs."""
30
32
 
@@ -49,7 +51,7 @@ def pending_deprecate(
49
51
 
50
52
  def verify_order(order: Literal["C", "F"]) -> Literal["C", "F"]:
51
53
  """Verify and return a Numpy order string."""
52
- order = order.upper() # type: ignore
54
+ order = order.upper() # type: ignore[assignment]
53
55
  if order not in ("C", "F"):
54
56
  msg = f"order must be 'C' or 'F', not {order!r}"
55
57
  raise TypeError(msg)
@@ -89,7 +91,7 @@ def _check_warn(error: int, stacklevel: int = 2) -> int:
89
91
  def _unpack_char_p(char_p: Any) -> str: # noqa: ANN401
90
92
  if char_p == ffi.NULL:
91
93
  return ""
92
- return ffi.string(char_p).decode() # type: ignore
94
+ return str(ffi.string(char_p), encoding="utf-8")
93
95
 
94
96
 
95
97
  def _int(int_or_str: SupportsInt | str | bytes) -> int:
@@ -169,7 +171,7 @@ class _PropagateException:
169
171
  return self.propagate
170
172
 
171
173
  def __exit__(
172
- self, type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
174
+ self, _type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
173
175
  ) -> None:
174
176
  """If we're holding on to an exception, raise it now.
175
177
 
@@ -230,42 +232,3 @@ def _console(console: Any) -> Any: # noqa: ANN401
230
232
  stacklevel=3,
231
233
  )
232
234
  return ffi.NULL
233
-
234
-
235
- class TempImage:
236
- """An Image-like container for NumPy arrays."""
237
-
238
- def __init__(self, array: ArrayLike) -> None:
239
- """Initialize an image from the given array. May copy or reference the array."""
240
- self._array: NDArray[np.uint8] = np.ascontiguousarray(array, dtype=np.uint8)
241
- height, width, depth = self._array.shape
242
- if depth != 3: # noqa: PLR2004
243
- msg = f"Array must have RGB channels. Shape is: {self._array.shape!r}"
244
- raise TypeError(msg)
245
- self._buffer = ffi.from_buffer("TCOD_color_t[]", self._array)
246
- self._mipmaps = ffi.new(
247
- "struct TCOD_mipmap_*",
248
- {
249
- "width": width,
250
- "height": height,
251
- "fwidth": width,
252
- "fheight": height,
253
- "buf": self._buffer,
254
- "dirty": True,
255
- },
256
- )
257
- self.image_c = ffi.new(
258
- "TCOD_Image*",
259
- {
260
- "nb_mipmaps": 1,
261
- "mipmaps": self._mipmaps,
262
- "has_key_color": False,
263
- },
264
- )
265
-
266
-
267
- def _as_image(image: ArrayLike | tcod.image.Image) -> TempImage | tcod.image.Image:
268
- """Convert this input into an Image-like object."""
269
- if hasattr(image, "image_c"):
270
- return image
271
- return TempImage(image)
@@ -27,13 +27,15 @@ Example::
27
27
 
28
28
  from __future__ import annotations
29
29
 
30
- from typing import Any, Iterator
30
+ from typing import TYPE_CHECKING, Any, Iterator
31
31
 
32
32
  from typing_extensions import deprecated
33
33
 
34
- import tcod.random
35
34
  from tcod.cffi import ffi, lib
36
35
 
36
+ if TYPE_CHECKING:
37
+ import tcod.random
38
+
37
39
 
38
40
  class BSP:
39
41
  """A binary space partitioning tree which can be used for simple dungeon generation.
@@ -102,20 +104,9 @@ class BSP:
102
104
  """Provide a useful readout when printed."""
103
105
  status = "leaf"
104
106
  if self.children:
105
- status = "split at position=%i,horizontal=%r" % (
106
- self.position,
107
- self.horizontal,
108
- )
109
-
110
- return "<%s(x=%i,y=%i,width=%i,height=%i) level=%i %s>" % (
111
- self.__class__.__name__,
112
- self.x,
113
- self.y,
114
- self.width,
115
- self.height,
116
- self.level,
117
- status,
118
- )
107
+ status = f"split at position={self.position},horizontal={self.horizontal!r}"
108
+
109
+ return f"<{self.__class__.__name__}(x={self.x},y={self.y},width={self.width},height={self.height}) level={self.level} {status}>"
119
110
 
120
111
  def _unpack_bsp_tree(self, cdata: Any) -> None: # noqa: ANN401
121
112
  self.x = cdata.x
@@ -236,13 +227,13 @@ class BSP:
236
227
  .. versionadded:: 8.3
237
228
  """
238
229
  levels: list[list[BSP]] = []
239
- next = [self]
240
- while next:
241
- levels.append(next)
242
- level = next
243
- next = []
230
+ next_: list[BSP] = [self]
231
+ while next_:
232
+ levels.append(next_)
233
+ level = next_
234
+ next_ = []
244
235
  for node in level:
245
- next.extend(node.children)
236
+ next_.extend(node.children)
246
237
  while levels:
247
238
  yield from levels.pop()
248
239
 
@@ -64,8 +64,8 @@ from tcod._libtcod import ffi, lib # noqa: E402
64
64
  __sdl_version__ = get_sdl_version()
65
65
 
66
66
 
67
- @ffi.def_extern() # type: ignore
68
- def _libtcod_log_watcher(message: Any, userdata: None) -> None: # noqa: ANN401
67
+ @ffi.def_extern() # type: ignore[misc]
68
+ def _libtcod_log_watcher(message: Any, _userdata: None) -> None: # noqa: ANN401
69
69
  text = str(ffi.string(message.message), encoding="utf-8")
70
70
  source = str(ffi.string(message.source), encoding="utf-8")
71
71
  level = int(message.level)