tcod 19.4.0__tar.gz → 19.5.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-19.4.0 → tcod-19.5.0}/CHANGELOG.md +19 -0
  2. {tcod-19.4.0 → tcod-19.5.0}/PKG-INFO +1 -1
  3. {tcod-19.4.0 → tcod-19.5.0}/build_libtcod.py +1 -0
  4. {tcod-19.4.0 → tcod-19.5.0}/libtcod/CHANGELOG.md +17 -0
  5. {tcod-19.4.0 → tcod-19.5.0}/libtcod/CMakeLists.txt +4 -23
  6. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/console_etc.h +2 -0
  7. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/console_types.h +6 -4
  8. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/libtcod_int.h +1 -59
  9. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/mouse.h +2 -0
  10. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/mouse_types.h +1 -0
  11. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/renderer_sdl2.c +18 -7
  12. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/renderer_sdl2.h +18 -16
  13. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/renderer_xterm.c +13 -13
  14. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/sdl2/event.h +15 -6
  15. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/sys.h +4 -1
  16. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/sys_sdl_img_png.c +1 -1
  17. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/txtfield.h +4 -0
  18. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/version.h +2 -2
  19. {tcod-19.4.0 → tcod-19.5.0}/tcod/_libtcod.pyi +1 -137
  20. {tcod-19.4.0 → tcod-19.5.0}/tcod/event.py +7 -7
  21. {tcod-19.4.0 → tcod-19.5.0}/tcod/path.c +1 -1
  22. {tcod-19.4.0 → tcod-19.5.0}/tcod/path.py +37 -10
  23. {tcod-19.4.0 → tcod-19.5.0}/tcod/version.py +16 -3
  24. {tcod-19.4.0 → tcod-19.5.0}/tcod.egg-info/PKG-INFO +1 -1
  25. {tcod-19.4.0 → tcod-19.5.0}/CONTRIBUTING.md +0 -0
  26. {tcod-19.4.0 → tcod-19.5.0}/LICENSE.txt +0 -0
  27. {tcod-19.4.0 → tcod-19.5.0}/MANIFEST.in +0 -0
  28. {tcod-19.4.0 → tcod-19.5.0}/README.rst +0 -0
  29. {tcod-19.4.0 → tcod-19.5.0}/build_sdl.py +0 -0
  30. {tcod-19.4.0 → tcod-19.5.0}/libtcod/CONTRIBUTING.md +0 -0
  31. {tcod-19.4.0 → tcod-19.5.0}/libtcod/LIBTCOD-CREDITS.txt +0 -0
  32. {tcod-19.4.0 → tcod-19.5.0}/libtcod/LICENSE.txt +0 -0
  33. {tcod-19.4.0 → tcod-19.5.0}/libtcod/README.md +0 -0
  34. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/bresenham.h +0 -0
  35. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/bresenham_c.c +0 -0
  36. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/bsp.h +0 -0
  37. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/bsp_c.c +0 -0
  38. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/color.c +0 -0
  39. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/color.h +0 -0
  40. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/config.h +0 -0
  41. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/console.c +0 -0
  42. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/console.h +0 -0
  43. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/console_drawing.c +0 -0
  44. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/console_drawing.h +0 -0
  45. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/console_etc.c +0 -0
  46. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/console_init.c +0 -0
  47. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/console_init.h +0 -0
  48. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/console_printing.c +0 -0
  49. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/console_printing.h +0 -0
  50. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/console_rexpaint.c +0 -0
  51. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/console_rexpaint.h +0 -0
  52. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/context.c +0 -0
  53. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/context.h +0 -0
  54. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/context_init.c +0 -0
  55. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/context_init.h +0 -0
  56. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/context_viewport.c +0 -0
  57. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/context_viewport.h +0 -0
  58. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/error.c +0 -0
  59. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/error.h +0 -0
  60. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/fov.h +0 -0
  61. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/fov_c.c +0 -0
  62. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/fov_circular_raycasting.c +0 -0
  63. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/fov_diamond_raycasting.c +0 -0
  64. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/fov_permissive2.c +0 -0
  65. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/fov_recursive_shadowcasting.c +0 -0
  66. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/fov_restrictive.c +0 -0
  67. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/fov_symmetric_shadowcast.c +0 -0
  68. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/fov_types.h +0 -0
  69. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/globals.c +0 -0
  70. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/globals.h +0 -0
  71. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/heapq.c +0 -0
  72. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/heapq.h +0 -0
  73. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/heightmap.h +0 -0
  74. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/heightmap_c.c +0 -0
  75. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/image.h +0 -0
  76. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/image_c.c +0 -0
  77. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/lex.h +0 -0
  78. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/lex_c.c +0 -0
  79. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/libtcod.h +0 -0
  80. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/list.h +0 -0
  81. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/list_c.c +0 -0
  82. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/logging.c +0 -0
  83. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/logging.h +0 -0
  84. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/mersenne.h +0 -0
  85. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/mersenne_c.c +0 -0
  86. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/mersenne_types.h +0 -0
  87. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/namegen.h +0 -0
  88. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/namegen_c.c +0 -0
  89. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/noise.h +0 -0
  90. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/noise_c.c +0 -0
  91. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/noise_defaults.h +0 -0
  92. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/parser.h +0 -0
  93. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/parser_c.c +0 -0
  94. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/path.h +0 -0
  95. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/path_c.c +0 -0
  96. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/pathfinder.c +0 -0
  97. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/pathfinder.h +0 -0
  98. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/pathfinder_frontier.c +0 -0
  99. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/pathfinder_frontier.h +0 -0
  100. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/portability.h +0 -0
  101. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/random.c +0 -0
  102. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/random.h +0 -0
  103. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/renderer_xterm.h +0 -0
  104. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/sdl2/console_grid.glslf +0 -0
  105. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/sdl2/console_grid.glslv +0 -0
  106. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/sys_c.c +0 -0
  107. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/sys_sdl_c.c +0 -0
  108. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/sys_sdl_img_bmp.c +0 -0
  109. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/tileset.c +0 -0
  110. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/tileset.h +0 -0
  111. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/tileset_bdf.c +0 -0
  112. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/tileset_bdf.h +0 -0
  113. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/tileset_fallback.c +0 -0
  114. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/tileset_fallback.h +0 -0
  115. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/tileset_render.c +0 -0
  116. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/tileset_render.h +0 -0
  117. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/tileset_truetype.c +0 -0
  118. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/tileset_truetype.h +0 -0
  119. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/timer.h +0 -0
  120. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/tree.h +0 -0
  121. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/tree_c.c +0 -0
  122. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/txtfield_c.c +0 -0
  123. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/utility.h +0 -0
  124. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/wrappers.c +0 -0
  125. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/wrappers.h +0 -0
  126. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/zip.h +0 -0
  127. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod/zip_c.c +0 -0
  128. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod.h +0 -0
  129. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/libtcod_c.c +0 -0
  130. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/khrplatform.h +0 -0
  131. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/lodepng.c +0 -0
  132. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/lodepng.h +0 -0
  133. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/stb.c +0 -0
  134. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/stb_ds.h +0 -0
  135. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/stb_truetype.h +0 -0
  136. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/utf8proc/utf8proc.c +0 -0
  137. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/utf8proc/utf8proc.h +0 -0
  138. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/utf8proc/utf8proc_data.c +0 -0
  139. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/zlib/adler32.c +0 -0
  140. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/zlib/compress.c +0 -0
  141. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/zlib/crc32.c +0 -0
  142. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/zlib/crc32.h +0 -0
  143. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/zlib/deflate.c +0 -0
  144. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/zlib/deflate.h +0 -0
  145. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/zlib/gzclose.c +0 -0
  146. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/zlib/gzguts.h +0 -0
  147. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/zlib/gzlib.c +0 -0
  148. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/zlib/gzread.c +0 -0
  149. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/zlib/gzwrite.c +0 -0
  150. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/zlib/infback.c +0 -0
  151. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/zlib/inffast.c +0 -0
  152. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/zlib/inffast.h +0 -0
  153. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/zlib/inffixed.h +0 -0
  154. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/zlib/inflate.c +0 -0
  155. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/zlib/inflate.h +0 -0
  156. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/zlib/inftrees.c +0 -0
  157. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/zlib/inftrees.h +0 -0
  158. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/zlib/trees.c +0 -0
  159. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/zlib/trees.h +0 -0
  160. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/zlib/uncompr.c +0 -0
  161. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/zlib/zconf.h +0 -0
  162. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/zlib/zlib.h +0 -0
  163. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/zlib/zutil.c +0 -0
  164. {tcod-19.4.0 → tcod-19.5.0}/libtcod/src/vendor/zlib/zutil.h +0 -0
  165. {tcod-19.4.0 → tcod-19.5.0}/libtcodpy.py +0 -0
  166. {tcod-19.4.0 → tcod-19.5.0}/pyproject.toml +0 -0
  167. {tcod-19.4.0 → tcod-19.5.0}/requirements.txt +0 -0
  168. {tcod-19.4.0 → tcod-19.5.0}/setup.cfg +0 -0
  169. {tcod-19.4.0 → tcod-19.5.0}/setup.py +0 -0
  170. {tcod-19.4.0 → tcod-19.5.0}/tcod/__init__.py +0 -0
  171. {tcod-19.4.0 → tcod-19.5.0}/tcod/__pyinstaller/__init__.py +0 -0
  172. {tcod-19.4.0 → tcod-19.5.0}/tcod/__pyinstaller/hook-tcod.py +0 -0
  173. {tcod-19.4.0 → tcod-19.5.0}/tcod/_internal.py +0 -0
  174. {tcod-19.4.0 → tcod-19.5.0}/tcod/bsp.py +0 -0
  175. {tcod-19.4.0 → tcod-19.5.0}/tcod/cdef.h +0 -0
  176. {tcod-19.4.0 → tcod-19.5.0}/tcod/cffi.h +0 -0
  177. {tcod-19.4.0 → tcod-19.5.0}/tcod/cffi.py +0 -0
  178. {tcod-19.4.0 → tcod-19.5.0}/tcod/color.py +0 -0
  179. {tcod-19.4.0 → tcod-19.5.0}/tcod/console.py +0 -0
  180. {tcod-19.4.0 → tcod-19.5.0}/tcod/constants.py +0 -0
  181. {tcod-19.4.0 → tcod-19.5.0}/tcod/context.py +0 -0
  182. {tcod-19.4.0 → tcod-19.5.0}/tcod/event_constants.py +0 -0
  183. {tcod-19.4.0 → tcod-19.5.0}/tcod/image.py +0 -0
  184. {tcod-19.4.0 → tcod-19.5.0}/tcod/libtcodpy.py +0 -0
  185. {tcod-19.4.0 → tcod-19.5.0}/tcod/los.py +0 -0
  186. {tcod-19.4.0 → tcod-19.5.0}/tcod/map.py +0 -0
  187. {tcod-19.4.0 → tcod-19.5.0}/tcod/noise.c +0 -0
  188. {tcod-19.4.0 → tcod-19.5.0}/tcod/noise.h +0 -0
  189. {tcod-19.4.0 → tcod-19.5.0}/tcod/noise.py +0 -0
  190. {tcod-19.4.0 → tcod-19.5.0}/tcod/path.h +0 -0
  191. {tcod-19.4.0 → tcod-19.5.0}/tcod/py.typed +0 -0
  192. {tcod-19.4.0 → tcod-19.5.0}/tcod/random.h +0 -0
  193. {tcod-19.4.0 → tcod-19.5.0}/tcod/random.py +0 -0
  194. {tcod-19.4.0 → tcod-19.5.0}/tcod/render.py +0 -0
  195. {tcod-19.4.0 → tcod-19.5.0}/tcod/sdl/__init__.py +0 -0
  196. {tcod-19.4.0 → tcod-19.5.0}/tcod/sdl/_internal.py +0 -0
  197. {tcod-19.4.0 → tcod-19.5.0}/tcod/sdl/audio.py +0 -0
  198. {tcod-19.4.0 → tcod-19.5.0}/tcod/sdl/constants.py +0 -0
  199. {tcod-19.4.0 → tcod-19.5.0}/tcod/sdl/joystick.py +0 -0
  200. {tcod-19.4.0 → tcod-19.5.0}/tcod/sdl/mouse.py +0 -0
  201. {tcod-19.4.0 → tcod-19.5.0}/tcod/sdl/render.py +0 -0
  202. {tcod-19.4.0 → tcod-19.5.0}/tcod/sdl/sys.py +0 -0
  203. {tcod-19.4.0 → tcod-19.5.0}/tcod/sdl/video.py +0 -0
  204. {tcod-19.4.0 → tcod-19.5.0}/tcod/tcod.c +0 -0
  205. {tcod-19.4.0 → tcod-19.5.0}/tcod/tcod.h +0 -0
  206. {tcod-19.4.0 → tcod-19.5.0}/tcod/tcod.py +0 -0
  207. {tcod-19.4.0 → tcod-19.5.0}/tcod/tileset.py +0 -0
  208. {tcod-19.4.0 → tcod-19.5.0}/tcod.egg-info/SOURCES.txt +0 -0
  209. {tcod-19.4.0 → tcod-19.5.0}/tcod.egg-info/dependency_links.txt +0 -0
  210. {tcod-19.4.0 → tcod-19.5.0}/tcod.egg-info/entry_points.txt +0 -0
  211. {tcod-19.4.0 → tcod-19.5.0}/tcod.egg-info/requires.txt +0 -0
  212. {tcod-19.4.0 → tcod-19.5.0}/tcod.egg-info/top_level.txt +0 -0
  213. {tcod-19.4.0 → tcod-19.5.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
+ ## [19.5.0] - 2025-09-13
10
+
11
+ ### Changed
12
+
13
+ - Update to libtcod 2.2.1.
14
+ - Scaling defaults to nearest, set `os.environ["SDL_RENDER_SCALE_QUALITY"] = "linear"` if linear scaling was preferred.
15
+
16
+ ### Fixed
17
+
18
+ - `SDL_RENDER_SCALE_QUALITY` is now respected again since the change to SDL3.
19
+ - Fixed crash on controller events.
20
+
21
+ ## [19.4.1] - 2025-08-27
22
+
23
+ ### Fixed
24
+
25
+ - Fixed dangling pointer in `Pathfinder.clear` method.
26
+ - Fixed hang in `Pathfinder.rebuild_frontier` method.
27
+
9
28
  ## [19.4.0] - 2025-08-06
10
29
 
11
30
  ### Changed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tcod
3
- Version: 19.4.0
3
+ Version: 19.5.0
4
4
  Summary: The official Python port of libtcod.
5
5
  Author-email: Kyle Benesch <4b796c65+tcod@gmail.com>
6
6
  License-Expression: BSD-2-Clause
@@ -43,6 +43,7 @@ RE_TAGS = re.compile(
43
43
  r"TCODLIB_C?API|TCOD_PUBLIC|TCOD_NODISCARD|TCOD_DEPRECATED_NOMESSAGE|TCOD_DEPRECATED_ENUM"
44
44
  r"|(TCOD_DEPRECATED\(\".*?\"\))"
45
45
  r"|(TCOD_DEPRECATED|TCODLIB_FORMAT)\([^)]*\)|__restrict"
46
+ r"|TCODLIB_(BEGIN|END)_IGNORE_DEPRECATIONS"
46
47
  )
47
48
  RE_VAFUNC = re.compile(r"^[^;]*\([^;]*va_list.*\);", re.MULTILINE)
48
49
  RE_INLINE = re.compile(r"(^.*?inline.*?\(.*?\))\s*\{.*?\}$", re.DOTALL | re.MULTILINE)
@@ -9,6 +9,23 @@ Versions since `2.0.0` only track API breaks and no longer guarantee ABI compati
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [2.2.1] - 2025-09-05
13
+ ### Fixed
14
+ - Fixed compile errors on Android platforms.
15
+
16
+ ## [2.2.0] - 2025-09-05
17
+ ### Changed
18
+ - `TCOD_sdl2_render_texture_setup` now preserves texture scale mode on the target texture.
19
+
20
+ ### Deprecated
21
+ - Outdated libtcod event types have been deprecated to help track their usage.
22
+ - Event functions intended to help migrate away from libtcod events have been deprecated to indicate that they're not a permanent solution.
23
+
24
+ ### Fixed
25
+ - `TCODHeightMap` copy constructor where width and height are different would cause an infinite loop.
26
+ - Fixed variable names in `renderer_xterm.c` that caused a compilation fail with GLIBC 2.42.
27
+ - `SDL_RENDER_SCALE_QUALITY` was being ignored since the change to SDL3 and is now respected again for initial scale mode.
28
+
12
29
  ## [2.1.1] - 2025-04-02
13
30
  ### Fixed
14
31
  - Fixed headers which were not self-contained.
@@ -1,4 +1,4 @@
1
- cmake_minimum_required (VERSION 3.23...4.0)
1
+ cmake_minimum_required(VERSION 3.23...4.0)
2
2
 
3
3
  if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
4
4
  set(CMAKE_TOOLCHAIN_FILE
@@ -23,28 +23,9 @@ if(CONAN_FILE)
23
23
  conan_basic_setup(TARGETS)
24
24
  endif()
25
25
 
26
- if(NOT CMAKE_INSTALL_BINDIR)
27
- set(CMAKE_INSTALL_BINDIR "bin" CACHE STRING "")
28
- endif()
29
- if(NOT CMAKE_INSTALL_LIBDIR)
30
- set(CMAKE_INSTALL_LIBDIR "lib" CACHE STRING "")
31
- endif()
32
- if(NOT CMAKE_INSTALL_DATAROOTDIR)
33
- set(CMAKE_INSTALL_DATAROOTDIR "share" CACHE STRING "")
34
- endif()
35
- if(NOT CMAKE_INSTALL_INCLUDEDIR)
36
- set(CMAKE_INSTALL_INCLUDEDIR "include" CACHE STRING "")
37
- endif()
38
-
39
- if(NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
40
- set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
41
- endif()
42
- if(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)
43
- set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
44
- endif()
45
- if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
46
- set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
47
- endif()
26
+ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib" CACHE STRING "")
27
+ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin" CACHE STRING "")
28
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin" CACHE STRING "")
48
29
 
49
30
  set(LIBTCOD_SAMPLES OFF CACHE BOOL "Build sources from the samples directory.")
50
31
  set(LIBTCOD_TESTS OFF CACHE BOOL "Build unit tests.")
@@ -108,6 +108,7 @@ TCODLIB_API bool TCOD_console_save_asc(TCOD_console_t con, const char* filename)
108
108
  TCODLIB_API bool TCOD_console_save_apf(TCOD_console_t con, const char* filename);
109
109
 
110
110
  #ifndef NO_SDL
111
+ TCODLIB_BEGIN_IGNORE_DEPRECATIONS
111
112
  /**
112
113
  Return immediately with a recently pressed key.
113
114
 
@@ -135,6 +136,7 @@ TCOD_DEPRECATED("This function does not support contexts.")
135
136
  TCODLIB_API void TCOD_console_credits_reset(void);
136
137
  TCOD_DEPRECATED("This function does not support contexts. Consider using `TCOD_console_credits_render_ex`.")
137
138
  TCODLIB_API bool TCOD_console_credits_render(int x, int y, bool alpha);
139
+ TCODLIB_END_IGNORE_DEPRECATIONS
138
140
  /*****************************************************************************
139
141
  @brief Render a libtcod credit animation to a console.
140
142
 
@@ -201,6 +201,7 @@ typedef enum TCOD_keycode_t {
201
201
  In its current state it exists only for backwards compatibility.
202
202
  These issues should be resolved by using SDL directly for keyboard events.
203
203
  */
204
+ TCOD_DEPRECATED("The libtcod event API has been deprecated, switch to using SDL event types exclusively")
204
205
  typedef struct TCOD_key_t {
205
206
  /***************************************************************************
206
207
  @brief The TCOD_keycode_t enum of the current key.
@@ -513,11 +514,12 @@ typedef enum TCOD_renderer_t {
513
514
  */
514
515
  TCOD_RENDERER_SDL,
515
516
  /***************************************************************************
516
- A new SDL2 renderer. Allows the window to be resized.
517
+ Libtcod's primary SDL renderer. Uses graphics hardware.
517
518
 
518
- You may set `SDL_HINT_RENDER_SCALE_QUALITY` to determine the tileset
519
- upscaling filter. Either nearest or linear. The hint will only take
520
- effect if it's set before this renderer is created.
519
+ Despite the name this renderer uses SDL3.
520
+
521
+ You may set `SDL_HINT_RENDER_SCALE_QUALITY` to determine the tileset upscaling filter of either nearest or linear.
522
+ This hint will only take effect if it's set before this renderer is created.
521
523
 
522
524
  \rst
523
525
  .. versionadded:: 1.8
@@ -117,24 +117,6 @@ typedef struct TCOD_internal_context_t {
117
117
 
118
118
  extern TCOD_internal_context_t TCOD_ctx;
119
119
 
120
- #if defined(__ANDROID__) && !defined(NDEBUG)
121
- #include <android/log.h>
122
- #ifdef printf
123
- #undef printf
124
- #endif
125
- #ifdef vprintf
126
- #undef vprintf
127
- #endif
128
- #define printf(args...) __android_log_print(ANDROID_LOG_INFO, "libtcod", ##args)
129
- #define vprintf(args...) __android_log_vprint(ANDROID_LOG_INFO, "libtcod", ##args)
130
-
131
- #ifdef assert
132
- #undef assert
133
- #endif
134
- #define assert(cond) \
135
- if (!(cond)) __android_log_assert(#cond, "libtcod", "assertion failed: %s", #cond)
136
- #endif
137
-
138
120
  #ifdef NDEBUG
139
121
  #define TCOD_IF(x) if (x)
140
122
  #define TCOD_IFNOT(x) if (!(x))
@@ -219,47 +201,7 @@ bool TCOD_sys_check_magic_number(const char* filename, size_t size, uint8_t* dat
219
201
  /* TCOD_list nonpublic methods */
220
202
  void TCOD_list_set_size(TCOD_list_t l, int size);
221
203
 
222
- /*
223
- SDL12/SDL2 abstraction layer
224
- */
225
- typedef struct TCOD_SDL_driver_t {
226
- float scale_xc;
227
- float scale_yc;
228
-
229
- /* get a fullscreen mode suitable for the console */
230
- void (*get_closest_mode)(int* w, int* h);
231
- /* render the console on a surface/texture */
232
- void (*render)(const struct TCOD_SDL_driver_t* sdl, void* vbitmap, struct TCOD_Console* console);
233
- /* create a new surface */
234
- struct SDL_Surface* (*create_surface)(int width, int height, bool with_alpha);
235
- /* create the game window */
236
- void (*create_window)(int w, int h, bool fullscreen);
237
- /* destroy the game window */
238
- void (*destroy_window)(void);
239
- /* switch fullscreen on/off */
240
- void (*set_fullscreen)(bool fullscreen);
241
- /* change the game window title */
242
- void (*set_window_title)(const char* title);
243
- /* save game screenshot */
244
- void (*save_screenshot)(const char* filename);
245
- /* get desktop resolution */
246
- void (*get_current_resolution)(int* w, int* h);
247
- /* change the mouse cursor position */
248
- void (*set_mouse_position)(int x, int y);
249
- /* clipboard */
250
- const char* (*get_clipboard_text)(void);
251
- bool (*set_clipboard_text)(const char* text);
252
- /* android compatible file access functions */
253
- bool (*file_read)(const char* filename, unsigned char** buf, size_t* size);
254
- bool (*file_exists)(const char* filename);
255
- bool (*file_write)(const char* filename, unsigned char* buf, uint32_t size);
256
- /* clean stuff */
257
- void (*shutdown)(void);
258
- /* get root cache */
259
- struct TCOD_Console* (*get_root_console_cache)(void);
260
- } TCOD_SDL_driver_t;
261
-
262
- typedef struct {
204
+ typedef struct scale_data_t {
263
205
  float force_recalc;
264
206
  float last_scale_xc, last_scale_yc;
265
207
  float last_scale_factor;
@@ -42,8 +42,10 @@ extern "C" {
42
42
  TCOD_DEPRECATED("Use SDL_ShowCursor to handle the mouse cursor.")
43
43
  TCODLIB_API void TCOD_mouse_show_cursor(bool visible);
44
44
 
45
+ TCODLIB_BEGIN_IGNORE_DEPRECATIONS
45
46
  TCOD_DEPRECATED("Use SDL_GetMouseState to check the mouse state.")
46
47
  TCODLIB_API TCOD_mouse_t TCOD_mouse_get_status(void);
48
+ TCODLIB_END_IGNORE_DEPRECATIONS
47
49
 
48
50
  TCOD_DEPRECATED("Use SDL_ShowCursor to check the mouse cursor.")
49
51
  TCODLIB_API bool TCOD_mouse_is_cursor_visible(void);
@@ -46,6 +46,7 @@
46
46
  In its current state it exists only for backwards compatibility.
47
47
  These issues should be resolved by using SDL directly for mouse and keyboard events.
48
48
  */
49
+ TCOD_DEPRECATED("The libtcod event API has been deprecated, switch to using SDL event types exclusively")
49
50
  typedef struct TCOD_mouse_t {
50
51
  /***************************************************************************
51
52
  @brief The mouse absolute pixel position, according to SDL.
@@ -515,6 +515,14 @@ static TCOD_Error TCOD_sdl2_render(
515
515
  #endif // SDL_VERSION_ATLEAST
516
516
  return TCOD_E_OK;
517
517
  }
518
+ /// @brief Return a scale mode based on SDL2's `SDL_RENDER_SCALE_QUALITY` hint.
519
+ static SDL_ScaleMode get_sdl2_scale_mode_hint() {
520
+ static const SDL_ScaleMode DEFAULT_SCALE_MODE = SDL_SCALEMODE_NEAREST;
521
+ const char* scale_mode_hint = SDL_GetHint("SDL_RENDER_SCALE_QUALITY");
522
+ if (!scale_mode_hint) return DEFAULT_SCALE_MODE;
523
+ if (strcmp(scale_mode_hint, "0") == 0 || strcmp(scale_mode_hint, "nearest") == 0) return SDL_SCALEMODE_NEAREST;
524
+ return SDL_SCALEMODE_LINEAR;
525
+ }
518
526
  TCOD_Error TCOD_sdl2_render_texture_setup(
519
527
  const struct TCOD_TilesetAtlasSDL2* __restrict atlas,
520
528
  const struct TCOD_Console* __restrict console,
@@ -532,7 +540,9 @@ TCOD_Error TCOD_sdl2_render_texture_setup(
532
540
  TCOD_set_errorv("target must not be NULL.");
533
541
  return TCOD_E_INVALID_ARGUMENT;
534
542
  }
543
+ SDL_ScaleMode scale_mode = -1; // Replace -1 with SDL_SCALEMODE_INVALID after SDL 3.4 is released
535
544
  if (*target) {
545
+ SDL_GetTextureScaleMode(*target, &scale_mode); // Preserve scale mode on replaced target texture
536
546
  // Checks if *target texture is still valid for the current parameters, deletes *target if not.
537
547
  float tex_width;
538
548
  float tex_height;
@@ -563,6 +573,8 @@ TCOD_Error TCOD_sdl2_render_texture_setup(
563
573
  if (!*target) {
564
574
  return TCOD_set_errorv("Failed to create a new target texture.");
565
575
  }
576
+ if (scale_mode == -1) scale_mode = get_sdl2_scale_mode_hint();
577
+ if (scale_mode >= 0) SDL_SetTextureScaleMode(*target, scale_mode);
566
578
  }
567
579
  TCOD_Error err = TCOD_E_OK;
568
580
  if (cache) {
@@ -585,14 +597,13 @@ TCOD_Error TCOD_sdl2_render_texture(
585
597
  return err;
586
598
  }
587
599
  // ----------------------------------------------------------------------------
588
- // SDL2 Rendering
600
+ // SDL Rendering
589
601
  /**
590
- Handle events from SDL2.
602
+ Handle events from SDL.
591
603
 
592
- Target textures need to be reset on an SDL_RENDER_TARGETS_RESET event.
604
+ Target textures need to be reset on an SDL_EVENT_RENDER_TARGETS_RESET event.
593
605
 
594
- This is sometimes called while the renderer is holding a reference to the
595
- cache console.
606
+ This is sometimes called while the renderer is holding a reference to the cache console.
596
607
  */
597
608
  static bool sdl2_handle_event(void* userdata, SDL_Event* event) {
598
609
  struct TCOD_RendererSDL2* context = userdata;
@@ -822,13 +833,13 @@ static TCOD_Error sdl2_screen_capture(
822
833
  return err;
823
834
  }
824
835
  /**
825
- * Return a pointer to the SDL2 window.
836
+ * Return a pointer to the SDL window.
826
837
  */
827
838
  static struct SDL_Window* sdl2_get_window(struct TCOD_Context* __restrict self) {
828
839
  return ((struct TCOD_RendererSDL2*)self->contextdata_)->window;
829
840
  }
830
841
  /**
831
- * Return a pointer to the SDL2 renderer.
842
+ * Return a pointer to the SDL renderer.
832
843
  */
833
844
  static struct SDL_Renderer* sdl2_get_renderer(struct TCOD_Context* __restrict self) {
834
845
  return ((struct TCOD_RendererSDL2*)self->contextdata_)->renderer;
@@ -48,7 +48,9 @@ struct SDL_Window;
48
48
  struct SDL_Renderer;
49
49
  struct SDL_Texture;
50
50
  /**
51
- An SDL2 tileset atlas. This prepares a tileset for use with SDL2.
51
+ An SDL tileset atlas. This prepares a tileset for use with SDL.
52
+
53
+ This works for SDL3 despite the name.
52
54
  \rst
53
55
  .. versionadded:: 1.16
54
56
  \endrst
@@ -66,12 +68,12 @@ typedef struct TCOD_TilesetAtlasSDL2 {
66
68
  int texture_columns;
67
69
  } TCOD_TilesetAtlasSDL2;
68
70
  /**
69
- The renderer data for an SDL2 rendering context.
71
+ The renderer data for an SDL rendering context.
70
72
  Internal use only.
71
73
  */
72
74
  struct TCOD_RendererSDL2 {
73
- struct SDL_Window* window; // Owning power to an SDL2 window.
74
- struct SDL_Renderer* renderer; // Owning pointer to an SDL2 renderer.
75
+ struct SDL_Window* window; // Owning power to an SDL window.
76
+ struct SDL_Renderer* renderer; // Owning pointer to an SDL renderer.
75
77
  struct TCOD_TilesetAtlasSDL2* __restrict atlas; // Owning atlas pointer.
76
78
  struct TCOD_Console* __restrict cache_console; // Tracks the data from the last console presented.
77
79
  struct SDL_Texture* __restrict cache_texture; // Cached console rendering output.
@@ -83,7 +85,9 @@ struct TCOD_RendererSDL2 {
83
85
  extern "C" {
84
86
  #endif // __cplusplus
85
87
  /***************************************************************************
86
- @brief Return a libtcod rendering context using an SDL2 renderer.
88
+ @brief Return a libtcod rendering context using an SDL renderer.
89
+
90
+ Despite the name this returns a context for SDL3.
87
91
 
88
92
  @param x Window X position, if unsure then use `SDL_WINDOWPOS_UNDEFINED`
89
93
  @param y Window Y position, if unsure then use `SDL_WINDOWPOS_UNDEFINED`
@@ -108,25 +112,23 @@ TCOD_PUBLIC TCOD_NODISCARD struct TCOD_Context* TCOD_renderer_init_sdl2(
108
112
  TCOD_PUBLIC TCOD_NODISCARD TCOD_Context* TCOD_renderer_init_sdl3(
109
113
  SDL_PropertiesID window_props, SDL_PropertiesID renderer_props, struct TCOD_Tileset* tileset);
110
114
  /**
111
- Return a new SDL2 atlas created from a tileset for an SDL2 renderer.
115
+ Return a new SDL atlas created from a tileset for an SDL3 renderer.
112
116
 
113
117
  You may delete the tileset if you no longer have use for it.
114
118
 
115
- Will return NULL on an error, you can check the error with
116
- `TCOD_get_error`.
119
+ Will return NULL on an error, you can check the error with `TCOD_get_error`.
117
120
  */
118
121
  TCOD_PUBLIC TCOD_NODISCARD struct TCOD_TilesetAtlasSDL2* TCOD_sdl2_atlas_new(
119
122
  struct SDL_Renderer* renderer, struct TCOD_Tileset* tileset);
120
123
  /**
121
- Delete an SDL2 tileset atlas.
124
+ Delete an SDL tileset atlas.
122
125
  */
123
126
  TCOD_PUBLIC void TCOD_sdl2_atlas_delete(struct TCOD_TilesetAtlasSDL2* atlas);
124
127
  /**
125
128
  Setup a cache and target texture for rendering.
126
129
 
127
- `atlas` is an SDL2 atlas created with `TCOD_sdl2_atlas_new`.
128
- The renderer used to make this `atlas` must support
129
- `SDL_RENDERER_TARGETTEXTURE`.
130
+ `atlas` is an SDL atlas created with `TCOD_sdl2_atlas_new`.
131
+ The renderer used to make this `atlas` must support `SDL_RENDERER_TARGETTEXTURE`.
130
132
 
131
133
  `console` is a non-NULL pointer to the libtcod console you want to render.
132
134
 
@@ -140,7 +142,7 @@ TCOD_PUBLIC void TCOD_sdl2_atlas_delete(struct TCOD_TilesetAtlasSDL2* atlas);
140
142
  is successful then the texture at `*target` will be non-NULL and will be
141
143
  exactly fitted to the size of `console` and the tile size of `atlas`.
142
144
 
143
- If SDL2 ever provides a `SDL_RENDER_TARGETS_RESET` event then the console
145
+ If SDL ever provides a `SDL_EVENT_RENDER_TARGETS_RESET` event then the console
144
146
  at `*cache` must be deleted and set to NULL, or else the next render will
145
147
  only partially update the texture at `*target`.
146
148
 
@@ -162,7 +164,7 @@ TCOD_PUBLIC TCOD_Error TCOD_sdl2_render_texture_setup(
162
164
  You can use `TCOD_sdl2_render_texture_setup` to automatically prepare these
163
165
  objects for use with this function.
164
166
 
165
- `atlas` is an SDL2 atlas created with `TCOD_sdl2_atlas_new`.
167
+ `atlas` is an SDL atlas created with `TCOD_sdl2_atlas_new`.
166
168
  The renderer used to make this `atlas` must support
167
169
  `SDL_RENDERER_TARGETTEXTURE`, unless `target` is NULL.
168
170
 
@@ -170,14 +172,14 @@ TCOD_PUBLIC TCOD_Error TCOD_sdl2_render_texture_setup(
170
172
 
171
173
  `cache` can be NULL, or point to a console the same size as `console`.
172
174
 
173
- `target` can be NULL, or be pointer an SDL2 texture used as the output.
175
+ `target` can be NULL, or be pointer an SDL texture used as the output.
174
176
  If `target` is not NULL then it should be the size of the console times the
175
177
  size of the individual tiles to fit the entire output.
176
178
 
177
179
  If `target` is NULL then the current render target is used instead, the
178
180
  drawn area will not be scaled to fit the render target.
179
181
 
180
- If SDL2 ever provides a `SDL_RENDER_TARGETS_RESET` event then the console
182
+ If SDL3 ever provides a `SDL_EVENT_RENDER_TARGETS_RESET` event then the console
181
183
  at `cache` must be cleared, or else the next render will only partially
182
184
  update the texture of `target`.
183
185
 
@@ -93,10 +93,10 @@ struct TCOD_RendererXterm {
93
93
  };
94
94
 
95
95
  static char* ucs4_to_utf8(int ucs4, char out[5]) {
96
- static const unsigned char B10000000 = 128;
97
- static const unsigned char B11000000 = 192;
98
- static const unsigned char B11100000 = 224;
99
- static const unsigned char B11110000 = 240;
96
+ static const unsigned char BYTE_10000000 = 128;
97
+ static const unsigned char BYTE_11000000 = 192;
98
+ static const unsigned char BYTE_11100000 = 224;
99
+ static const unsigned char BYTE_11110000 = 240;
100
100
  static const int B000_000000_000000_111111 = 63;
101
101
  static const int B000_000000_011111_000000 = 1984;
102
102
  static const int B000_000000_111111_000000 = 4032;
@@ -109,21 +109,21 @@ static char* ucs4_to_utf8(int ucs4, char out[5]) {
109
109
  out[1] = '\0';
110
110
  return out;
111
111
  } else if (ucs4 <= 0x07FF) {
112
- out[0] = B11000000 | (unsigned char)((ucs4 & B000_000000_011111_000000) >> 6);
113
- out[1] = B10000000 | (unsigned char)((ucs4 & B000_000000_000000_111111) >> 0);
112
+ out[0] = BYTE_11000000 | (unsigned char)((ucs4 & B000_000000_011111_000000) >> 6);
113
+ out[1] = BYTE_10000000 | (unsigned char)((ucs4 & B000_000000_000000_111111) >> 0);
114
114
  out[2] = '\0';
115
115
  return out;
116
116
  } else if (ucs4 <= 0xFFFF) {
117
- out[0] = B11100000 | (unsigned char)((ucs4 & B000_001111_000000_000000) >> 12);
118
- out[1] = B10000000 | (unsigned char)((ucs4 & B000_000000_111111_000000) >> 6);
119
- out[2] = B10000000 | (unsigned char)((ucs4 & B000_000000_000000_111111) >> 0);
117
+ out[0] = BYTE_11100000 | (unsigned char)((ucs4 & B000_001111_000000_000000) >> 12);
118
+ out[1] = BYTE_10000000 | (unsigned char)((ucs4 & B000_000000_111111_000000) >> 6);
119
+ out[2] = BYTE_10000000 | (unsigned char)((ucs4 & B000_000000_000000_111111) >> 0);
120
120
  out[3] = '\0';
121
121
  return out;
122
122
  } else if (ucs4 <= 0x10FFFF) {
123
- out[0] = B11110000 | (unsigned char)((ucs4 & B111_000000_000000_000000) >> 18);
124
- out[1] = B10000000 | (unsigned char)((ucs4 & B000_111111_000000_000000) >> 12);
125
- out[2] = B10000000 | (unsigned char)((ucs4 & B000_000000_111111_000000) >> 6);
126
- out[3] = B10000000 | (unsigned char)((ucs4 & B000_000000_000000_111111) >> 0);
123
+ out[0] = BYTE_11110000 | (unsigned char)((ucs4 & B111_000000_000000_000000) >> 18);
124
+ out[1] = BYTE_10000000 | (unsigned char)((ucs4 & B000_111111_000000_000000) >> 12);
125
+ out[2] = BYTE_10000000 | (unsigned char)((ucs4 & B000_000000_111111_000000) >> 6);
126
+ out[3] = BYTE_10000000 | (unsigned char)((ucs4 & B000_000000_000000_111111) >> 0);
127
127
  out[4] = '\0';
128
128
  return out;
129
129
  }
@@ -38,6 +38,8 @@
38
38
  #include "../sys.h"
39
39
 
40
40
  union SDL_Event;
41
+
42
+ TCODLIB_BEGIN_IGNORE_DEPRECATIONS
41
43
  #ifdef __cplusplus
42
44
  namespace tcod {
43
45
  namespace sdl2 {
@@ -49,8 +51,8 @@ namespace sdl2 {
49
51
  * .. versionadded:: 1.11
50
52
  * \endrst
51
53
  */
52
- TCODLIB_API
53
- TCOD_event_t process_event(const union SDL_Event& in, TCOD_key_t& out) noexcept;
54
+ [[deprecated("This function should only be used to migrate away from libtcod events.")]] TCODLIB_API TCOD_event_t
55
+ process_event(const union SDL_Event& in, TCOD_key_t& out) noexcept;
54
56
  /**
55
57
  * Parse an SDL_Event into a mouse event and return the relevant TCOD_event_t.
56
58
  *
@@ -59,10 +61,11 @@ TCOD_event_t process_event(const union SDL_Event& in, TCOD_key_t& out) noexcept;
59
61
  * .. versionadded:: 1.11
60
62
  * \endrst
61
63
  */
62
- TCODLIB_API
63
- TCOD_event_t process_event(const union SDL_Event& in, TCOD_mouse_t& out) noexcept;
64
+ [[deprecated("This function should only be used to migrate away from libtcod events.")]] TCODLIB_API TCOD_event_t
65
+ process_event(const union SDL_Event& in, TCOD_mouse_t& out) noexcept;
64
66
  } // namespace sdl2
65
67
  } // namespace tcod
68
+ extern "C" {
66
69
  #endif // __cplusplus
67
70
  /**
68
71
  * Parse an SDL_Event into a key event and return the relevant TCOD_event_t.
@@ -72,7 +75,8 @@ TCOD_event_t process_event(const union SDL_Event& in, TCOD_mouse_t& out) noexcep
72
75
  * .. versionadded:: 1.11
73
76
  * \endrst
74
77
  */
75
- TCODLIB_CAPI
78
+ TCOD_DEPRECATED("This function should only be used to migrate away from libtcod events.")
79
+ TCODLIB_API
76
80
  TCOD_event_t TCOD_sys_process_key_event(const union SDL_Event* in, TCOD_key_t* out);
77
81
  /**
78
82
  * Parse an SDL_Event into a mouse event and return the relevant TCOD_event_t.
@@ -82,6 +86,11 @@ TCOD_event_t TCOD_sys_process_key_event(const union SDL_Event* in, TCOD_key_t* o
82
86
  * .. versionadded:: 1.11
83
87
  * \endrst
84
88
  */
85
- TCODLIB_CAPI
89
+ TCOD_DEPRECATED("This function should only be used to migrate away from libtcod events.")
90
+ TCODLIB_API
86
91
  TCOD_event_t TCOD_sys_process_mouse_event(const union SDL_Event* in, TCOD_mouse_t* out);
92
+ TCODLIB_END_IGNORE_DEPRECATIONS
93
+ #ifdef __cplusplus
94
+ } // extern "C"
95
+ #endif // __cplusplus
87
96
  #endif // LIBTCOD_SDL2_EVENT_H_
@@ -38,7 +38,8 @@
38
38
  #include "mouse_types.h"
39
39
  #include "portability.h"
40
40
 
41
- typedef enum {
41
+ TCOD_DEPRECATED("The libtcod event API has been deprecated, switch to using SDL event types exclusively")
42
+ typedef enum TCOD_event_t {
42
43
  TCOD_EVENT_NONE = 0,
43
44
  TCOD_EVENT_KEY_PRESS = 1,
44
45
  TCOD_EVENT_KEY_RELEASE = 2,
@@ -236,10 +237,12 @@ TCODLIB_API void TCOD_sys_update_char(int asciiCode, int font_x, int font_y, con
236
237
  TCODLIB_API struct SDL_Window* TCOD_sys_get_SDL_window(void);
237
238
  TCODLIB_API struct SDL_Renderer* TCOD_sys_get_SDL_renderer(void);
238
239
 
240
+ TCODLIB_BEGIN_IGNORE_DEPRECATIONS
239
241
  TCOD_DEPRECATED("This API is deprecated, use SDL_WaitEvent instead.")
240
242
  TCODLIB_API TCOD_event_t TCOD_sys_wait_for_event(int eventMask, TCOD_key_t* key, TCOD_mouse_t* mouse, bool flush);
241
243
  TCOD_DEPRECATED("This API is deprecated, use SDL_PollEvent instead.")
242
244
  TCODLIB_API TCOD_event_t TCOD_sys_check_for_event(int eventMask, TCOD_key_t* key, TCOD_mouse_t* mouse);
245
+ TCODLIB_END_IGNORE_DEPRECATIONS
243
246
 
244
247
  /* clipboard */
245
248
  TCOD_DEPRECATED("Use the SDL API to handle the clipboard.")
@@ -32,7 +32,7 @@
32
32
  #include "sys.h"
33
33
  #ifndef NO_SDL
34
34
  #ifndef TCOD_NO_PNG
35
- #if !defined(__HAIKU__) && !defined(__ANDROID__)
35
+ #if !defined(__HAIKU__)
36
36
  #include <stdio.h>
37
37
  #include <stdlib.h>
38
38
  #endif
@@ -49,7 +49,11 @@ TCODLIB_API void TCOD_text_set_pos(TCOD_text_t txt, int x, int y);
49
49
  TCODLIB_API void TCOD_text_set_properties(
50
50
  TCOD_text_t txt, int cursor_char, int blink_interval, const char* prompt, int tab_size);
51
51
  TCODLIB_API void TCOD_text_set_colors(TCOD_text_t txt, TCOD_color_t fore, TCOD_color_t back, float back_transparency);
52
+
53
+ TCODLIB_BEGIN_IGNORE_DEPRECATIONS
52
54
  TCODLIB_API bool TCOD_text_update(TCOD_text_t txt, TCOD_key_t key);
55
+ TCODLIB_END_IGNORE_DEPRECATIONS
56
+
53
57
  TCODLIB_API void TCOD_text_render(TCOD_text_t txt, TCOD_console_t con);
54
58
  TCODLIB_API const char* TCOD_text_get(TCOD_text_t txt);
55
59
  TCODLIB_API void TCOD_text_reset(TCOD_text_t txt);
@@ -34,10 +34,10 @@
34
34
  #define LIBTCOD_VERSION_H
35
35
 
36
36
  #define TCOD_MAJOR_VERSION 2
37
- #define TCOD_MINOR_VERSION 1
37
+ #define TCOD_MINOR_VERSION 2
38
38
  #define TCOD_PATCHLEVEL 1
39
39
 
40
- #define TCOD_STRVERSION "2.1.1"
40
+ #define TCOD_STRVERSION "2.2.1"
41
41
 
42
42
  /**
43
43
  Converts version numbers into a numeric value.