tcod 21.2.1__tar.gz → 21.2.3__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 (293) hide show
  1. {tcod-21.2.1 → tcod-21.2.3}/CHANGELOG.md +22 -0
  2. {tcod-21.2.1 → tcod-21.2.3}/PKG-INFO +1 -1
  3. {tcod-21.2.1 → tcod-21.2.3}/build_libtcod.py +5 -4
  4. {tcod-21.2.1 → tcod-21.2.3}/build_sdl.py +33 -16
  5. {tcod-21.2.1 → tcod-21.2.3}/libtcod/CHANGELOG.md +39 -3
  6. tcod-21.2.3/libtcod/CMakeLists.txt +306 -0
  7. {tcod-21.2.1 → tcod-21.2.3}/libtcod/README.md +2 -1
  8. tcod-21.2.1/libtcod/src/libtcod/bresenham_c.c → tcod-21.2.3/libtcod/src/libtcod/bresenham.h +85 -105
  9. tcod-21.2.3/libtcod/src/libtcod/bresenham_c.c +103 -0
  10. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/color.c +3 -154
  11. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/color.h +144 -14
  12. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/console.h +2 -6
  13. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/console_drawing.h +3 -9
  14. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/console_etc.c +18 -23
  15. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/console_etc.h +7 -11
  16. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/console_init.c +3 -2
  17. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/console_init.h +3 -9
  18. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/console_printing.h +9 -27
  19. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/console_rexpaint.h +4 -12
  20. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/context.h +14 -42
  21. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/context_init.h +3 -9
  22. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/context_viewport.h +3 -9
  23. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/error.c +2 -1
  24. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/error.h +2 -6
  25. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/fov_permissive2.c +4 -3
  26. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/fov_restrictive.c +1 -1
  27. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/fov_symmetric_shadowcast.c +2 -3
  28. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/globals.h +2 -6
  29. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/heapq.c +10 -53
  30. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/heapq.h +34 -0
  31. tcod-21.2.3/libtcod/src/libtcod/heightmap.h +241 -0
  32. tcod-21.2.3/libtcod/src/libtcod/heightmap_c.c +625 -0
  33. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/image_c.c +4 -4
  34. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/lex_c.c +3 -2
  35. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/logging.h +3 -9
  36. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/mersenne_c.c +3 -3
  37. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/namegen_c.c +4 -4
  38. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/noise.h +3 -9
  39. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/parser_c.c +4 -3
  40. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/path_c.c +113 -104
  41. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/portability.h +1 -3
  42. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/renderer_sdl2.c +3 -3
  43. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/renderer_sdl2.h +3 -9
  44. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/sys_sdl_c.c +4 -3
  45. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/tileset.c +30 -10
  46. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/tileset.h +8 -24
  47. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/tileset_bdf.h +2 -6
  48. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/tileset_fallback.c +4 -1
  49. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/tileset_render.h +1 -3
  50. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/utility.h +14 -0
  51. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/version.h +5 -9
  52. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/zip.h +10 -14
  53. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/zip_c.c +132 -153
  54. tcod-21.2.3/libtcod/src/vendor/lodepng.c +7257 -0
  55. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/vendor/lodepng.h +609 -191
  56. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/vendor/stb_truetype.h +504 -319
  57. tcod-21.2.3/libtcod/src/vendor/utf8proc/bench/bench.c +56 -0
  58. tcod-21.2.3/libtcod/src/vendor/utf8proc/bench/icu.c +61 -0
  59. tcod-21.2.3/libtcod/src/vendor/utf8proc/bench/unistring.c +60 -0
  60. tcod-21.2.3/libtcod/src/vendor/utf8proc/bench/util.c +38 -0
  61. tcod-21.2.3/libtcod/src/vendor/utf8proc/bench/util.h +22 -0
  62. tcod-21.2.3/libtcod/src/vendor/utf8proc/test/app/app.c +9 -0
  63. tcod-21.2.3/libtcod/src/vendor/utf8proc/test/case.c +76 -0
  64. tcod-21.2.3/libtcod/src/vendor/utf8proc/test/charwidth.c +91 -0
  65. tcod-21.2.3/libtcod/src/vendor/utf8proc/test/custom.c +50 -0
  66. tcod-21.2.3/libtcod/src/vendor/utf8proc/test/fuzz_main.c +54 -0
  67. tcod-21.2.3/libtcod/src/vendor/utf8proc/test/fuzzer.c +100 -0
  68. tcod-21.2.3/libtcod/src/vendor/utf8proc/test/graphemetest.c +160 -0
  69. tcod-21.2.3/libtcod/src/vendor/utf8proc/test/iscase.c +63 -0
  70. tcod-21.2.3/libtcod/src/vendor/utf8proc/test/iterate.c +168 -0
  71. tcod-21.2.3/libtcod/src/vendor/utf8proc/test/maxdecomposition.c +22 -0
  72. tcod-21.2.3/libtcod/src/vendor/utf8proc/test/misc.c +102 -0
  73. tcod-21.2.3/libtcod/src/vendor/utf8proc/test/normtest.c +64 -0
  74. tcod-21.2.3/libtcod/src/vendor/utf8proc/test/printproperty.c +68 -0
  75. tcod-21.2.3/libtcod/src/vendor/utf8proc/test/tests.c +100 -0
  76. tcod-21.2.3/libtcod/src/vendor/utf8proc/test/tests.h +32 -0
  77. tcod-21.2.3/libtcod/src/vendor/utf8proc/test/valid.c +41 -0
  78. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/vendor/utf8proc/utf8proc.c +236 -140
  79. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/vendor/utf8proc/utf8proc.h +186 -71
  80. tcod-21.2.3/libtcod/src/vendor/utf8proc/utf8proc_data.c +17480 -0
  81. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/vendor/zlib/adler32.c +5 -27
  82. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/vendor/zlib/compress.c +37 -24
  83. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/blast/blast-test.c +42 -0
  84. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/blast/blast.c +422 -0
  85. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/blast/blast.h +84 -0
  86. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/crc32vx/crc32_vx.c +254 -0
  87. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/crc32vx/crc32_vx_hooks.h +9 -0
  88. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/infback9/infback9.c +603 -0
  89. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/infback9/infback9.h +37 -0
  90. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/infback9/inffix9.h +107 -0
  91. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/infback9/inflate9.h +47 -0
  92. tcod-21.2.1/libtcod/src/vendor/zlib/inftrees.c → tcod-21.2.3/libtcod/src/vendor/zlib/contrib/infback9/inftree9.c +75 -62
  93. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/infback9/inftree9.h +61 -0
  94. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/iostream/zfstream.h +128 -0
  95. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/iostream2/zstream.h +306 -0
  96. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/iostream3/zfstream.h +466 -0
  97. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/minizip/crypt.h +126 -0
  98. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/minizip/ints.h +57 -0
  99. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/minizip/ioapi.c +231 -0
  100. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/minizip/ioapi.h +183 -0
  101. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/minizip/iowin32.c +447 -0
  102. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/minizip/iowin32.h +27 -0
  103. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/minizip/miniunz.c +701 -0
  104. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/minizip/minizip.c +511 -0
  105. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/minizip/mztools.c +294 -0
  106. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/minizip/mztools.h +37 -0
  107. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/minizip/skipset.h +381 -0
  108. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/minizip/unzip.c +1982 -0
  109. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/minizip/unzip.h +443 -0
  110. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/minizip/zip.c +2260 -0
  111. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/minizip/zip.h +376 -0
  112. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/puff/bin-writer.c +26 -0
  113. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/puff/puff.c +840 -0
  114. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/puff/puff.h +35 -0
  115. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/puff/pufftest.c +168 -0
  116. tcod-21.2.3/libtcod/src/vendor/zlib/contrib/testzlib/testzlib.c +275 -0
  117. tcod-21.2.3/libtcod/src/vendor/zlib/crc32.c +983 -0
  118. tcod-21.2.3/libtcod/src/vendor/zlib/crc32.h +9446 -0
  119. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/vendor/zlib/deflate.c +584 -526
  120. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/vendor/zlib/deflate.h +57 -23
  121. tcod-21.2.3/libtcod/src/vendor/zlib/examples/enough.c +597 -0
  122. tcod-21.2.3/libtcod/src/vendor/zlib/examples/fitblk.c +233 -0
  123. tcod-21.2.3/libtcod/src/vendor/zlib/examples/gun.c +702 -0
  124. tcod-21.2.3/libtcod/src/vendor/zlib/examples/gzappend.c +504 -0
  125. tcod-21.2.3/libtcod/src/vendor/zlib/examples/gzjoin.c +449 -0
  126. tcod-21.2.3/libtcod/src/vendor/zlib/examples/gzlog.c +1061 -0
  127. tcod-21.2.3/libtcod/src/vendor/zlib/examples/gzlog.h +91 -0
  128. tcod-21.2.3/libtcod/src/vendor/zlib/examples/gznorm.c +474 -0
  129. tcod-21.2.3/libtcod/src/vendor/zlib/examples/zpipe.c +206 -0
  130. tcod-21.2.3/libtcod/src/vendor/zlib/examples/zran.c +546 -0
  131. tcod-21.2.3/libtcod/src/vendor/zlib/examples/zran.h +53 -0
  132. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/vendor/zlib/gzclose.c +1 -3
  133. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/vendor/zlib/gzguts.h +69 -48
  134. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/vendor/zlib/gzlib.c +119 -147
  135. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/vendor/zlib/gzread.c +278 -205
  136. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/vendor/zlib/gzwrite.c +236 -166
  137. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/vendor/zlib/infback.c +37 -98
  138. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/vendor/zlib/inffast.c +22 -24
  139. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/vendor/zlib/inffast.h +1 -1
  140. tcod-21.2.3/libtcod/src/vendor/zlib/inffixed.h +94 -0
  141. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/vendor/zlib/inflate.c +149 -267
  142. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/vendor/zlib/inflate.h +7 -4
  143. tcod-21.2.3/libtcod/src/vendor/zlib/inftrees.c +424 -0
  144. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/vendor/zlib/inftrees.h +17 -9
  145. tcod-21.2.3/libtcod/src/vendor/zlib/test/example.c +552 -0
  146. tcod-21.2.3/libtcod/src/vendor/zlib/test/infcover.c +675 -0
  147. tcod-21.2.3/libtcod/src/vendor/zlib/test/minigzip.c +595 -0
  148. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/vendor/zlib/trees.c +304 -388
  149. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/vendor/zlib/trees.h +1 -0
  150. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/vendor/zlib/uncompr.c +41 -33
  151. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/vendor/zlib/zconf.h +50 -24
  152. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/vendor/zlib/zlib.h +526 -370
  153. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/vendor/zlib/zutil.c +71 -80
  154. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/vendor/zlib/zutil.h +105 -45
  155. {tcod-21.2.1 → tcod-21.2.3}/pyproject.toml +3 -1
  156. {tcod-21.2.1 → tcod-21.2.3}/tcod/__init__.py +0 -1
  157. {tcod-21.2.1 → tcod-21.2.3}/tcod/_libtcod.pyi +290 -76
  158. {tcod-21.2.1 → tcod-21.2.3}/tcod/event.py +5 -1
  159. {tcod-21.2.1 → tcod-21.2.3}/tcod/event_constants.py +2 -0
  160. {tcod-21.2.1 → tcod-21.2.3}/tcod/image.py +1 -0
  161. {tcod-21.2.1 → tcod-21.2.3}/tcod/noise.py +12 -3
  162. {tcod-21.2.1 → tcod-21.2.3}/tcod/path.py +29 -14
  163. {tcod-21.2.1 → tcod-21.2.3}/tcod/sdl/audio.py +2 -2
  164. {tcod-21.2.1 → tcod-21.2.3}/tcod/sdl/constants.py +86 -1
  165. {tcod-21.2.1 → tcod-21.2.3}/tcod/tcod.py +0 -1
  166. {tcod-21.2.1 → tcod-21.2.3}/tcod/version.py +3 -3
  167. {tcod-21.2.1 → tcod-21.2.3}/tcod.egg-info/PKG-INFO +1 -1
  168. {tcod-21.2.1 → tcod-21.2.3}/tcod.egg-info/SOURCES.txt +71 -2
  169. tcod-21.2.3/tcod.egg-info/scm_file_list.json +15435 -0
  170. tcod-21.2.3/tcod.egg-info/scm_version.json +8 -0
  171. tcod-21.2.1/libtcod/CMakeLists.txt +0 -118
  172. tcod-21.2.1/libtcod/src/libtcod/bresenham.h +0 -93
  173. tcod-21.2.1/libtcod/src/libtcod/heightmap.h +0 -118
  174. tcod-21.2.1/libtcod/src/libtcod/heightmap_c.c +0 -666
  175. tcod-21.2.1/libtcod/src/vendor/khrplatform.h +0 -282
  176. tcod-21.2.1/libtcod/src/vendor/lodepng.c +0 -6300
  177. tcod-21.2.1/libtcod/src/vendor/stb_ds.h +0 -1895
  178. tcod-21.2.1/libtcod/src/vendor/utf8proc/utf8proc_data.c +0 -14385
  179. tcod-21.2.1/libtcod/src/vendor/zlib/crc32.c +0 -442
  180. tcod-21.2.1/libtcod/src/vendor/zlib/crc32.h +0 -441
  181. tcod-21.2.1/libtcod/src/vendor/zlib/inffixed.h +0 -94
  182. {tcod-21.2.1 → tcod-21.2.3}/CONTRIBUTING.md +0 -0
  183. {tcod-21.2.1 → tcod-21.2.3}/LICENSE.txt +0 -0
  184. {tcod-21.2.1 → tcod-21.2.3}/MANIFEST.in +0 -0
  185. {tcod-21.2.1 → tcod-21.2.3}/README.rst +0 -0
  186. {tcod-21.2.1 → tcod-21.2.3}/libtcod/CONTRIBUTING.md +0 -0
  187. {tcod-21.2.1 → tcod-21.2.3}/libtcod/LIBTCOD-CREDITS.txt +0 -0
  188. {tcod-21.2.1 → tcod-21.2.3}/libtcod/LICENSE.txt +0 -0
  189. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/bsp.h +0 -0
  190. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/bsp_c.c +0 -0
  191. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/config.h +0 -0
  192. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/console.c +0 -0
  193. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/console_drawing.c +0 -0
  194. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/console_printing.c +0 -0
  195. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/console_rexpaint.c +0 -0
  196. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/console_types.h +0 -0
  197. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/context.c +0 -0
  198. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/context_init.c +0 -0
  199. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/context_viewport.c +0 -0
  200. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/fov.h +0 -0
  201. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/fov_c.c +0 -0
  202. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/fov_circular_raycasting.c +0 -0
  203. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/fov_diamond_raycasting.c +0 -0
  204. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/fov_recursive_shadowcasting.c +0 -0
  205. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/fov_types.h +0 -0
  206. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/globals.c +0 -0
  207. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/image.h +0 -0
  208. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/lex.h +0 -0
  209. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/libtcod.h +0 -0
  210. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/libtcod_int.h +0 -0
  211. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/list.h +0 -0
  212. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/list_c.c +0 -0
  213. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/logging.c +0 -0
  214. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/mersenne.h +0 -0
  215. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/mersenne_types.h +0 -0
  216. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/mouse.h +0 -0
  217. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/mouse_types.h +0 -0
  218. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/namegen.h +0 -0
  219. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/noise_c.c +0 -0
  220. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/noise_defaults.h +0 -0
  221. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/parser.h +0 -0
  222. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/path.h +0 -0
  223. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/pathfinder.c +0 -0
  224. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/pathfinder.h +0 -0
  225. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/pathfinder_frontier.c +0 -0
  226. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/pathfinder_frontier.h +0 -0
  227. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/random.c +0 -0
  228. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/random.h +0 -0
  229. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/renderer_xterm.c +0 -0
  230. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/renderer_xterm.h +0 -0
  231. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/sdl2/console_grid.glslf +0 -0
  232. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/sdl2/console_grid.glslv +0 -0
  233. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/sdl2/event.h +0 -0
  234. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/sys.h +0 -0
  235. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/sys_c.c +0 -0
  236. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/sys_sdl_img_bmp.c +0 -0
  237. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/sys_sdl_img_png.c +0 -0
  238. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/tileset_bdf.c +0 -0
  239. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/tileset_fallback.h +0 -0
  240. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/tileset_render.c +0 -0
  241. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/tileset_truetype.c +0 -0
  242. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/tileset_truetype.h +0 -0
  243. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/timer.h +0 -0
  244. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/tree.h +0 -0
  245. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/tree_c.c +0 -0
  246. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/txtfield.h +0 -0
  247. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/txtfield_c.c +0 -0
  248. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/wrappers.c +0 -0
  249. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod/wrappers.h +0 -0
  250. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod.h +0 -0
  251. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/libtcod_c.c +0 -0
  252. {tcod-21.2.1 → tcod-21.2.3}/libtcod/src/vendor/stb.c +0 -0
  253. {tcod-21.2.1 → tcod-21.2.3}/libtcodpy.py +0 -0
  254. {tcod-21.2.1 → tcod-21.2.3}/requirements.txt +0 -0
  255. {tcod-21.2.1 → tcod-21.2.3}/setup.cfg +0 -0
  256. {tcod-21.2.1 → tcod-21.2.3}/setup.py +0 -0
  257. {tcod-21.2.1 → tcod-21.2.3}/tcod/__pyinstaller/__init__.py +0 -0
  258. {tcod-21.2.1 → tcod-21.2.3}/tcod/__pyinstaller/hook-tcod.py +0 -0
  259. {tcod-21.2.1 → tcod-21.2.3}/tcod/_internal.py +0 -0
  260. {tcod-21.2.1 → tcod-21.2.3}/tcod/bsp.py +0 -0
  261. {tcod-21.2.1 → tcod-21.2.3}/tcod/cdef.h +0 -0
  262. {tcod-21.2.1 → tcod-21.2.3}/tcod/cffi.h +0 -0
  263. {tcod-21.2.1 → tcod-21.2.3}/tcod/cffi.py +0 -0
  264. {tcod-21.2.1 → tcod-21.2.3}/tcod/color.py +0 -0
  265. {tcod-21.2.1 → tcod-21.2.3}/tcod/console.py +0 -0
  266. {tcod-21.2.1 → tcod-21.2.3}/tcod/constants.py +0 -0
  267. {tcod-21.2.1 → tcod-21.2.3}/tcod/context.py +0 -0
  268. {tcod-21.2.1 → tcod-21.2.3}/tcod/libtcodpy.py +0 -0
  269. {tcod-21.2.1 → tcod-21.2.3}/tcod/los.py +0 -0
  270. {tcod-21.2.1 → tcod-21.2.3}/tcod/map.py +0 -0
  271. {tcod-21.2.1 → tcod-21.2.3}/tcod/noise.c +0 -0
  272. {tcod-21.2.1 → tcod-21.2.3}/tcod/noise.h +0 -0
  273. {tcod-21.2.1 → tcod-21.2.3}/tcod/path.c +0 -0
  274. {tcod-21.2.1 → tcod-21.2.3}/tcod/path.h +0 -0
  275. {tcod-21.2.1 → tcod-21.2.3}/tcod/py.typed +0 -0
  276. {tcod-21.2.1 → tcod-21.2.3}/tcod/random.h +0 -0
  277. {tcod-21.2.1 → tcod-21.2.3}/tcod/random.py +0 -0
  278. {tcod-21.2.1 → tcod-21.2.3}/tcod/render.py +0 -0
  279. {tcod-21.2.1 → tcod-21.2.3}/tcod/sdl/__init__.py +0 -0
  280. {tcod-21.2.1 → tcod-21.2.3}/tcod/sdl/_internal.py +0 -0
  281. {tcod-21.2.1 → tcod-21.2.3}/tcod/sdl/joystick.py +0 -0
  282. {tcod-21.2.1 → tcod-21.2.3}/tcod/sdl/mouse.py +0 -0
  283. {tcod-21.2.1 → tcod-21.2.3}/tcod/sdl/render.py +0 -0
  284. {tcod-21.2.1 → tcod-21.2.3}/tcod/sdl/sys.py +0 -0
  285. {tcod-21.2.1 → tcod-21.2.3}/tcod/sdl/video.py +0 -0
  286. {tcod-21.2.1 → tcod-21.2.3}/tcod/tcod.c +0 -0
  287. {tcod-21.2.1 → tcod-21.2.3}/tcod/tcod.h +0 -0
  288. {tcod-21.2.1 → tcod-21.2.3}/tcod/tileset.py +0 -0
  289. {tcod-21.2.1 → tcod-21.2.3}/tcod.egg-info/dependency_links.txt +0 -0
  290. {tcod-21.2.1 → tcod-21.2.3}/tcod.egg-info/entry_points.txt +0 -0
  291. {tcod-21.2.1 → tcod-21.2.3}/tcod.egg-info/requires.txt +0 -0
  292. {tcod-21.2.1 → tcod-21.2.3}/tcod.egg-info/top_level.txt +0 -0
  293. {tcod-21.2.1 → tcod-21.2.3}/tox.ini +0 -0
@@ -6,6 +6,28 @@ This project adheres to [Semantic Versioning](https://semver.org/) since version
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [21.2.3] - 2026-11-09
10
+
11
+ ### Changed
12
+
13
+ - Updated libtcod to 2.3.0
14
+ - Updated bundled SDL to 3.4.20
15
+
16
+ ## [21.2.2] - 2026-10-22
17
+
18
+ ### Changed
19
+
20
+ - Updated bundled SDL to 3.4.18
21
+
22
+ ### Fixed
23
+
24
+ - `tcod.path.SimpleGraph` caps its automatic diagonal heuristic at two cardinal steps when those are cheaper. https://github.com/libtcod/python-tcod/pull/198
25
+ - Many-to-many `tcod.path.path2d` queries retain weighted predecessors when reconstructing their route. https://github.com/libtcod/python-tcod/pull/197
26
+ - Copying or pickling Perlin and Simplex noise no longer advances a shared random generator while preparing an unused wavelet tile. https://github.com/libtcod/python-tcod/pull/195
27
+ - `tcod.image.Image.rotate90` updates the width and height of rectangular images, keeping NumPy array conversions consistent with the rotated pixels. https://github.com/libtcod/python-tcod/pull/194
28
+ - Adding a root to an already resolved `tcod.path.Pathfinder` resets its predecessor only when its value improves the current distance. This prevents cyclic paths while preserving routes to cheaper roots. https://github.com/libtcod/python-tcod/pull/191
29
+ - Lazy pathfinder queries reconsider previously visited goals after adding a root or lowering a root's distance. https://github.com/libtcod/python-tcod/pull/192
30
+
9
31
  ## [21.2.1] - 2026-06-04
10
32
 
11
33
  ### Deployment
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tcod
3
- Version: 21.2.1
3
+ Version: 21.2.3
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
@@ -29,7 +29,7 @@ import build_sdl
29
29
  if TYPE_CHECKING:
30
30
  from collections.abc import Iterable, Iterator
31
31
 
32
- Py_LIMITED_API: None | int = 0x03100000
32
+ Py_LIMITED_API: int | None = 0x03100000
33
33
 
34
34
  HEADER_PARSE_PATHS = ("tcod/", "libtcod/src/libtcod/")
35
35
  HEADER_PARSE_EXCLUDES = ("gl2_ext_.h", "renderer_gl_internal.h", "event.h")
@@ -42,13 +42,13 @@ RE_CPLUSPLUS = re.compile(r"#ifdef __cplusplus.*?#endif.*?$", re.DOTALL | re.MUL
42
42
  RE_PREPROCESSOR = re.compile(r"(?!#define\s+\w+\s+\d+$)#.*?(?<!\\)$", re.DOTALL | re.MULTILINE)
43
43
  RE_INCLUDE = re.compile(r'#include "([^"]*)"')
44
44
  RE_TAGS = re.compile(
45
- r"TCODLIB_C?API|TCOD_PUBLIC|TCOD_NODISCARD|TCOD_DEPRECATED_NOMESSAGE|TCOD_DEPRECATED_ENUM"
45
+ r"TCODLIB_C?API|TCOD_PUBLIC|TCOD_PRIVATE|TCOD_NODISCARD|TCOD_DEPRECATED_NOMESSAGE|TCOD_DEPRECATED_ENUM"
46
46
  r"|(TCOD_DEPRECATED\(\".*?\"\))"
47
47
  r"|(TCOD_DEPRECATED|TCODLIB_FORMAT)\([^)]*\)|__restrict"
48
48
  r"|TCODLIB_(BEGIN|END)_IGNORE_DEPRECATIONS"
49
49
  )
50
50
  RE_VAFUNC = re.compile(r"^[^;]*\([^;]*va_list.*\);", re.MULTILINE)
51
- RE_INLINE = re.compile(r"(^.*?inline.*?\(.*?\))\s*\{.*?\}$", re.DOTALL | re.MULTILINE)
51
+ RE_INLINE = re.compile(r"(^[^\n]*?inline.*?\(.*?\))\s*\{.*?\n\}$", re.DOTALL | re.MULTILINE)
52
52
 
53
53
 
54
54
  class ParsedHeader:
@@ -197,6 +197,7 @@ if sys.platform != "win32":
197
197
  # Fix implicit declaration of multiple functions in zlib.
198
198
  define_macros.append(("HAVE_UNISTD_H", 1))
199
199
 
200
+ define_macros.append(("UTF8PROC_STATIC", None))
200
201
 
201
202
  tdl_build = os.environ.get("TDL_BUILD", "RELEASE").upper()
202
203
 
@@ -232,7 +233,7 @@ for include in includes:
232
233
  # Print the source, for debugging.
233
234
  print(f"Error with: {include.path}")
234
235
  for i, line in enumerate(include.header.split("\n"), 1):
235
- print(f"{i:03i} {line}")
236
+ print(f"{i:03d} {line}")
236
237
  raise
237
238
  ffi.cdef(
238
239
  """
@@ -46,9 +46,9 @@ def python_machine() -> str:
46
46
  # Reject versions of SDL older than this, update the requirements in the readme if you change this.
47
47
  SDL_MIN_VERSION = (3, 2, 0)
48
48
  # The SDL version to parse and export symbols from.
49
- SDL_PARSE_VERSION = os.environ.get("SDL_VERSION", "3.2.16")
49
+ SDL_PARSE_VERSION = os.environ.get("SDL_VERSION", "3.4.20")
50
50
  # The SDL version to include in binary distributions.
51
- SDL_BUNDLE_VERSION = os.environ.get("SDL_VERSION", "3.2.16")
51
+ SDL_BUNDLE_VERSION = os.environ.get("SDL_VERSION", "3.4.20")
52
52
 
53
53
 
54
54
  # Used to remove excessive newlines in debug outputs.
@@ -66,6 +66,9 @@ RE_ASSERT = re.compile(r"^.*SDL_COMPILE_TIME_ASSERT.*$", re.MULTILINE)
66
66
  # Padding values need to be scrubbed.
67
67
  RE_PADDING = re.compile(r"padding\[[^;]*\];")
68
68
 
69
+ # Printf style functions cause issues on Pyodide builds
70
+ RE_PRINTF = re.compile(r"^.*?\([^()]*\*fmt, \.\.\.\).*?;$", re.MULTILINE)
71
+
69
72
  # These structs have an unusual size when packed by SDL on 32-bit platforms.
70
73
  FLEXIBLE_STRUCTS = (
71
74
  "SDL_CommonEvent",
@@ -105,6 +108,7 @@ FLEXIBLE_STRUCTS = (
105
108
  "SDL_SensorEvent",
106
109
  "SDL_QuitEvent",
107
110
  "SDL_UserEvent",
111
+ "SDL_PinchFingerEvent",
108
112
  )
109
113
 
110
114
  # Other defined names which sometimes cause issues when parsed.
@@ -134,6 +138,11 @@ IGNORE_DEFINES = frozenset(
134
138
  "SDL_VIDEO_RENDER_D3D12",
135
139
  "SDL_SENSOR_WINDOWS",
136
140
  "SDL_SENSOR_DUMMY",
141
+ # Added around SDL3.4
142
+ "SDL_ASSERT_FILE",
143
+ "SDL_DLNOTE_UNIQUE_NAME",
144
+ "SDL_ELF_NOTE_DLOPEN_TYPE",
145
+ "SDL_RESTRICT",
137
146
  )
138
147
  )
139
148
 
@@ -142,6 +151,8 @@ def check_sdl_version() -> None:
142
151
  """Check the local SDL3 version on Linux distributions."""
143
152
  if not sys.platform.startswith("linux"):
144
153
  return
154
+ if "PYODIDE" in os.environ:
155
+ return
145
156
  needed_version = f"{SDL_MIN_VERSION[0]}.{SDL_MIN_VERSION[1]}.{SDL_MIN_VERSION[2]}"
146
157
  try:
147
158
  sdl_version_str = subprocess.check_output(
@@ -175,7 +186,7 @@ def get_sdl_file(version: str) -> Path:
175
186
  assert sys.platform == "darwin"
176
187
  sdl_archive = f"SDL3-{version}.dmg"
177
188
  sdl_local_file = Path("dependencies", sdl_archive)
178
- sdl_remote_url = f"https://www.libsdl.org/release/{sdl_archive}"
189
+ sdl_remote_url = f"https://github.com/libsdl-org/SDL/releases/download/release-{version}/{sdl_archive}"
179
190
  if not sdl_local_file.exists():
180
191
  logger.info(f"Downloading {sdl_remote_url}")
181
192
  Path("dependencies/").mkdir(parents=True, exist_ok=True)
@@ -275,12 +286,14 @@ class SDLParser(pcpp.Preprocessor): # type: ignore[misc]
275
286
  return super().on_directive_handle(directive, tokens, if_passthru, preceding_tokens)
276
287
 
277
288
 
278
- def get_emscripten_include_dir() -> Path:
279
- """Find and return the Emscripten include dir."""
280
- # None of the EMSDK environment variables exist! Search PATH for Emscripten as a workaround
289
+ def get_emscripten_dir() -> Path:
290
+ """Find and return the Emscripten directory."""
291
+ if "EMSDK" in os.environ:
292
+ return Path(os.environ["EMSDK"], "upstream/emscripten")
293
+ # Search PATH for Emscripten as a workaround
281
294
  for path in os.environ["PATH"].split(os.pathsep)[::-1]:
282
- if Path(path).match("upstream/emscripten"):
283
- return Path(path, "system/include").resolve(strict=True)
295
+ if Path(path).match("emsdk/upstream/emscripten"):
296
+ return Path(path).resolve(strict=True)
284
297
  raise AssertionError(os.environ["PATH"])
285
298
 
286
299
 
@@ -293,24 +306,25 @@ if (sys.platform == "win32" or sys.platform == "darwin") and "PYODIDE" not in os
293
306
  SDL_BUNDLE_PATH = unpack_sdl(SDL_BUNDLE_VERSION)
294
307
 
295
308
  SDL_INCLUDE: Path
296
- if sys.platform == "win32" and SDL_PARSE_PATH is not None:
309
+ if "PYODIDE" in os.environ:
310
+ embuilder = Path(get_emscripten_dir(), "embuilder")
311
+ subprocess.run([embuilder, "build", "sdl3"], check=True)
312
+ SDL_INCLUDE = Path(get_emscripten_dir(), "cache/sysroot/include").resolve(strict=True)
313
+ elif sys.platform == "win32" and SDL_PARSE_PATH is not None:
297
314
  SDL_INCLUDE = SDL_PARSE_PATH / "include"
298
315
  elif sys.platform == "darwin" and SDL_PARSE_PATH is not None:
299
316
  SDL_INCLUDE = SDL_PARSE_PATH / "Versions/A/Headers"
300
317
  else: # Unix
301
- matches = re.findall(
302
- r"-I(\S+)",
303
- subprocess.check_output(["pkg-config", "sdl3", "--cflags"], universal_newlines=True),
304
- )
305
- if not matches:
306
- matches = ["/usr/include"]
318
+ stdout = subprocess.check_output(["pkg-config", "sdl3", "--cflags"], universal_newlines=True)
319
+ matches = re.findall(r"-I(\S+)", stdout)
320
+ matches.append("/usr/include")
307
321
 
308
322
  for match in matches:
309
323
  if Path(match, "SDL3/SDL.h").is_file():
310
324
  SDL_INCLUDE = Path(match)
311
325
  break
312
326
  else:
313
- raise AssertionError(matches)
327
+ raise AssertionError(stdout)
314
328
  assert SDL_INCLUDE
315
329
 
316
330
  logger.info(f"{SDL_INCLUDE=}")
@@ -367,6 +381,9 @@ def get_cdef() -> tuple[str, dict[str, str]]:
367
381
  )
368
382
  sdl_cdef = parser.get_output()
369
383
 
384
+ if "PYODIDE" in os.environ:
385
+ sdl_cdef = RE_PRINTF.sub("", sdl_cdef)
386
+
370
387
  sdl_cdef = sdl_cdef.replace("_Bool", "bool")
371
388
  sdl_cdef = RE_VAFUNC.sub("", sdl_cdef)
372
389
  sdl_cdef = RE_INLINE.sub("", sdl_cdef)
@@ -9,6 +9,42 @@ Versions since `2.0.0` only track API breaks and no longer guarantee ABI compati
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [2.3.0] - 2026-11-09
13
+ ### Added
14
+ - Added `TCOD_heightmap_kernel_transform_out` for convolution with separate source and destination heightmaps.
15
+ - Added `TCOD_heightmap_is_valid` and `TCOD_heightmap_in_bounds`.
16
+
17
+ ### Changed
18
+ - `TCOD_heightmap_get_minmax` now outputs `FLT_MAX` and `-FLT_MAX` in exceptional cases instead of zero.
19
+ - `TCOD_heightmap_get_value` and `TCOD_heightmap_set_value` are now inline.
20
+
21
+ ### CMake
22
+ - Fixed installed or distributed packages not including headers at the correct prefixes.
23
+
24
+ ### Fixed
25
+ - Image downsampling no longer counts source pixels twice at integer sampling boundaries.
26
+ - Dijkstra routes now follow the computed movement costs, including diagonal costs and directed callbacks.
27
+ - Symmetric shadowcasting rounds negative sector edges correctly, preserving visibility when a dungeon is rotated.
28
+ - Fixed A* returning before a cheaper route to a weighted destination is settled.
29
+ - Fixed A* computing non-ideal routes with non-Euclidean distance costs.
30
+ - Terrain normals no longer become flat at map edges; fractional edge samples use their actual spacing.
31
+ - Midpoint terrain generation now seeds the corners of its working square using the heightmap stride.
32
+ - Bezier terrain carving now includes the starting hill, even when the curve stays in one cell.
33
+ - Heightmap normalization preserves ranges with better precision and no longer ignores very small values.
34
+ - Fixed heightmap slopes cancelling on tilted planes or becoming negative at peaks; diagonal neighbors now use their geometric distance.
35
+ - Tilesheet color-key detection now works with an empty space glyph when the zeroth tile is not empty.
36
+ [#190](https://github.com/libtcod/libtcod/pull/190)
37
+ - Fixed `TCOD_heightmap_kernel_transform` reading modified values during in-place convolution.
38
+ - `TCOD_heightmap_get_minmax` no longer writes to NULL outputs when the input heightmap has zero elements.
39
+ - Fixed memory crashes with using the permissive or restrictive field-of-view algorithms on very small maps.
40
+ [#184](https://github.com/libtcod/libtcod/pull/184)
41
+ - Basic math functions from `libm` were not linked in C.
42
+ - Voronoi terrain generation now includes distant sites for extra large maps.
43
+ - Internally used `popen`, `pclose` were undeclared due to missing feature test macros on Linux
44
+
45
+ ### Removed
46
+ - SCons support has been officially removed.
47
+
12
48
  ## [2.2.2] - 2026-01-06
13
49
  ### CMake
14
50
  - Now fully supports `FetchPackage` for dependency resolution.
@@ -166,8 +202,8 @@ Versions since `2.0.0` only track API breaks and no longer guarantee ABI compati
166
202
 
167
203
  ## [1.22.0] - 2022-08-24
168
204
  ### Added
169
- - Libtcod can now be built without zlib by passing the `-DLIBTCOD_ZLIB=disable` flag to CMake or by setting `CMAKE_DISABLE_FIND_PACKAGE_ZLIB=1`.
170
- - Libtcod can now be built without PNG support by passing the `-DLIBTCOD_LODEPNG=disable` flag to CMake.
205
+ - Libtcod can now be built without zlib by passing the `-D LIBTCOD_ZLIB=disable` flag to CMake or by setting `CMAKE_DISABLE_FIND_PACKAGE_ZLIB=1`.
206
+ - Libtcod can now be built without PNG support by passing the `-D LIBTCOD_LODEPNG=disable` flag to CMake.
171
207
  - Added context screen capture functions to take screenshots into memory instead of a file.
172
208
 
173
209
  ### Changed
@@ -185,7 +221,7 @@ Versions since `2.0.0` only track API breaks and no longer guarantee ABI compati
185
221
  - Added the `tcod::Context` class to better handle contexts in C++.
186
222
  - Added a CMake toggle `LIBTCOD_THREADS` to remove deprecated threading functions.
187
223
  `CMAKE_DISABLE_FIND_PACKAGE_Threads=1` can also be used.
188
- - Libtcod can now be built without SDL by passing the `-DLIBTCOD_SDL2=disable` flag in CMake or by setting
224
+ - Libtcod can now be built without SDL by passing the `-D LIBTCOD_SDL2=disable` flag in CMake or by setting
189
225
  `CMAKE_DISABLE_FIND_PACKAGE_SDL2=1`.
190
226
 
191
227
  ### Changed
@@ -0,0 +1,306 @@
1
+ cmake_minimum_required(VERSION 3.24...4.2)
2
+ include(FetchContent)
3
+ include(GNUInstallDirs)
4
+
5
+ option(LIBTCOD_VCPKG "Enable Vcpkg toolchain by default." OFF)
6
+ option(LIBTCOD_SAMPLES "Build sources from the samples directory." OFF)
7
+ option(LIBTCOD_TESTS "Build unit tests." OFF)
8
+ option(LIBTCOD_INSTALL "Enable install targets." ON)
9
+ option(LIBTCOD_INSTALL_PKGCONFIG "Install pkg-config files." ON)
10
+ option(LIBTCOD_CPACK "Enable CPack for libtcod." OFF)
11
+ option(LIBTCOD_DOCS "Build documentation using Doxygen for installation." OFF)
12
+
13
+ option(LIBTCOD_THREADS "If true then deprecated thread functions are enabled by libtcod." ON)
14
+ option(LIBTCOD_SDL3 "Enable or disable this library dependency." ON)
15
+ option(LIBTCOD_ZLIB "Enable or disable this library dependency." ON)
16
+ set(LIBTCOD_LODEPNG "ON" CACHE STRING "How this library will be linked.")
17
+ set(LIBTCOD_UTF8PROC "ON" CACHE STRING "How this library will be linked.")
18
+ set(LIBTCOD_STB "ON" CACHE STRING "How this library will be linked.")
19
+
20
+ FetchContent_Declare(
21
+ SDL3
22
+ GIT_REPOSITORY https://github.com/libsdl-org/SDL
23
+ GIT_TAG f00dc919ca35b9756316e86c4777392de442f9b2 # release-3.4.20
24
+ GIT_SHALLOW TRUE
25
+ FIND_PACKAGE_ARGS CONFIG
26
+ )
27
+ set(SDL_INSTALL ${LIBTCOD_INSTALL} CACHE BOOL "")
28
+ set(SDL_INSTALL_CPACK OFF CACHE BOOL "")
29
+ set(SDL_INSTALL_DOCS OFF CACHE BOOL "")
30
+
31
+ FetchContent_Declare(
32
+ zlib
33
+ GIT_REPOSITORY https://github.com/madler/zlib
34
+ GIT_TAG 99623ef7097352da7993ba614161fd6a311e046e # v1.4
35
+ GIT_SHALLOW TRUE
36
+ FIND_PACKAGE_ARGS
37
+ )
38
+ set(ZLIB_BUILD_TESTING OFF CACHE BOOL "")
39
+ set(ZLIB_INSTALL ${LIBTCOD_INSTALL} CACHE BOOL "")
40
+
41
+ FetchContent_Declare(
42
+ lodepng-c
43
+ GIT_REPOSITORY https://github.com/lvandeve/lodepng
44
+ GIT_TAG 7b2893e35891c0c85bee5595caafaf3c2044b409
45
+ PATCH_COMMAND git apply ${CMAKE_CURRENT_SOURCE_DIR}/cmake/lodepng-c.patch
46
+ UPDATE_DISCONNECTED TRUE # Only apply the patch once
47
+ FIND_PACKAGE_ARGS CONFIG
48
+ )
49
+
50
+ FetchContent_Declare(
51
+ utf8proc
52
+ GIT_REPOSITORY https://github.com/JuliaStrings/utf8proc
53
+ GIT_TAG 79cdd5ab40c79afa559f689ffc13b76812dee1ac # v2.12.0
54
+ GIT_SHALLOW TRUE
55
+ FIND_PACKAGE_ARGS
56
+ )
57
+ set(UTF8PROC_INSTALL ${LIBTCOD_INSTALL} CACHE BOOL "")
58
+
59
+ FetchContent_Declare(
60
+ Stb
61
+ GIT_REPOSITORY https://github.com/nothings/stb
62
+ GIT_TAG 4e9b368bfc071e97206ea5c6adba68dd0cbf8897
63
+ PATCH_COMMAND git apply ${CMAKE_CURRENT_SOURCE_DIR}/cmake/stb.patch
64
+ UPDATE_DISCONNECTED TRUE # Only apply the patch once
65
+ FIND_PACKAGE_ARGS
66
+ )
67
+
68
+
69
+ if(LIBTCOD_VCPKG)
70
+ set(CMAKE_TOOLCHAIN_FILE
71
+ "${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake"
72
+ CACHE STRING "Vcpkg toolchain file")
73
+ endif()
74
+
75
+ file(STRINGS src/libtcod/version.h LIBTCOD_VERSION_LINE REGEX "TCOD_STRVERSION")
76
+ string(REGEX MATCH "TCOD_STRVERSION \"([^\"]+)\"" LIBTCOD_VERSION_LINE ${LIBTCOD_VERSION_LINE})
77
+ set(LIBTCOD_VERSION_FULL ${CMAKE_MATCH_1})
78
+ string(REGEX MATCH "([0-9]+\.[0-9]+\.[0-9]+)" LIBTCOD_VERSION ${LIBTCOD_VERSION_FULL})
79
+ message(STATUS "Libtcod version: ${LIBTCOD_VERSION}")
80
+
81
+ project(
82
+ libtcod
83
+ VERSION ${LIBTCOD_VERSION}
84
+ LANGUAGES C CXX
85
+ )
86
+
87
+ include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake OPTIONAL RESULT_VARIABLE CONAN_FILE)
88
+ if(CONAN_FILE)
89
+ conan_basic_setup(TARGETS)
90
+ endif()
91
+
92
+ add_library(${PROJECT_NAME})
93
+ add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
94
+
95
+ target_compile_features(${PROJECT_NAME} PUBLIC c_std_99 cxx_std_17)
96
+ set_target_properties(${PROJECT_NAME} PROPERTIES
97
+ C_VISIBILITY_PRESET hidden
98
+ CXX_VISIBILITY_PRESET hidden
99
+ PREFIX "" # Remove the "lib" prefix to prevent a library name like "liblibtcod"
100
+ VISIBILITY_INLINES_HIDDEN OFF
101
+ VERIFY_INTERFACE_HEADER_SETS TRUE
102
+ VERSION ${PROJECT_VERSION}
103
+ SOVERSION ${PROJECT_VERSION_MAJOR}
104
+ )
105
+
106
+ macro(fix_deprecated_link_setting LINK_OPTION) # Replaces find_package/disable with ON/OFF
107
+ if(${LINK_OPTION} STREQUAL "find_package")
108
+ message(DEPRECATION "${LINK_OPTION}=find_package is deprecated, this should be ${LINK_OPTION}=ON")
109
+ set(${LINK_OPTION} "ON")
110
+ elseif(${LINK_OPTION} STREQUAL "disable")
111
+ message(DEPRECATION "${LINK_OPTION}=disable is deprecated, this should be ${LINK_OPTION}=OFF")
112
+ set(${LINK_OPTION} "OFF")
113
+ endif()
114
+ endmacro()
115
+
116
+ fix_deprecated_link_setting(LIBTCOD_SDL3)
117
+ if(LIBTCOD_SDL3)
118
+ list(APPEND VCPKG_MANIFEST_FEATURES "sdl")
119
+ FetchContent_MakeAvailable(SDL3)
120
+ target_link_libraries(${PROJECT_NAME} PUBLIC SDL3::SDL3)
121
+ else()
122
+ target_compile_definitions(${PROJECT_NAME} PUBLIC NO_SDL)
123
+ endif()
124
+
125
+ fix_deprecated_link_setting(LIBTCOD_ZLIB)
126
+ if(LIBTCOD_ZLIB)
127
+ FetchContent_MakeAvailable(ZLIB)
128
+ target_link_libraries(${PROJECT_NAME} PRIVATE ZLIB::ZLIB)
129
+ else()
130
+ target_compile_definitions(${PROJECT_NAME} PUBLIC TCOD_NO_ZLIB)
131
+ endif()
132
+
133
+ set_property(CACHE LIBTCOD_LODEPNG PROPERTY STRINGS "vendored" "ON" "OFF")
134
+ fix_deprecated_link_setting(LIBTCOD_LODEPNG)
135
+ if(LIBTCOD_LODEPNG STREQUAL "vendored")
136
+ message("Will be vendored: LodePNG")
137
+ target_sources(${PROJECT_NAME} PRIVATE "vendor/lodepng.c")
138
+ target_include_directories(${PROJECT_NAME} PRIVATE "vendor/")
139
+ elseif(LIBTCOD_LODEPNG)
140
+ FetchContent_MakeAvailable(lodepng-c)
141
+ target_link_libraries(${PROJECT_NAME} PRIVATE lodepng-c)
142
+ else()
143
+ target_compile_definitions(${PROJECT_NAME} PUBLIC TCOD_NO_PNG)
144
+ endif()
145
+
146
+ set_property(CACHE LIBTCOD_UTF8PROC PROPERTY STRINGS "vendored" "ON" "OFF")
147
+ if(LIBTCOD_UTF8PROC STREQUAL "vcpkg")
148
+ message(DEPRECATION "LIBTCOD_UTF8PROC=vcpkg is deprecated, this should be LIBTCOD_UTF8PROC=ON")
149
+ set(LIBTCOD_UTF8PROC "ON")
150
+ endif()
151
+ fix_deprecated_link_setting(LIBTCOD_UTF8PROC)
152
+ if(LIBTCOD_UTF8PROC STREQUAL "vendored")
153
+ message("Will be vendored: utf8proc")
154
+ target_include_directories(${PROJECT_NAME} PRIVATE "vendor/utf8proc")
155
+ target_sources(${PROJECT_NAME} PRIVATE "vendor/utf8proc/utf8proc.c")
156
+ elseif(LIBTCOD_UTF8PROC)
157
+ FetchContent_MakeAvailable(utf8proc)
158
+ target_link_libraries(${PROJECT_NAME} PRIVATE utf8proc::utf8proc)
159
+ else()
160
+ target_compile_definitions(${PROJECT_NAME} PUBLIC TCOD_NO_UNICODE)
161
+ endif()
162
+
163
+ set_property(CACHE LIBTCOD_STB PROPERTY STRINGS "vendored" "ON")
164
+ if(LIBTCOD_STB STREQUAL "vcpkg")
165
+ message(DEPRECATION "LIBTCOD_STB=vcpkg is deprecated, this should be LIBTCOD_STB=ON")
166
+ set(LIBTCOD_STB "ON")
167
+ endif()
168
+ fix_deprecated_link_setting(LIBTCOD_STB)
169
+ if(LIBTCOD_STB STREQUAL "vendored")
170
+ message("Will be vendored: stb")
171
+ target_include_directories(${PROJECT_NAME} PRIVATE "vendor/")
172
+ else()
173
+ FetchContent_MakeAvailable(Stb)
174
+ target_include_directories(${PROJECT_NAME} PRIVATE ${Stb_INCLUDE_DIR})
175
+ endif()
176
+
177
+ if(LIBTCOD_THREADS AND NOT CMAKE_DISABLE_FIND_PACKAGE_Threads)
178
+ find_package(Threads REQUIRED)
179
+ if(DEFINED CMAKE_THREAD_LIBS_INIT)
180
+ target_link_libraries(${PROJECT_NAME} PUBLIC ${CMAKE_THREAD_LIBS_INIT})
181
+ endif()
182
+ else()
183
+ target_compile_definitions(${PROJECT_NAME} PUBLIC TCOD_NO_THREADS)
184
+ endif()
185
+
186
+ if(NOT MSVC)
187
+ target_link_libraries(${PROJECT_NAME} PRIVATE m) # Common math functions
188
+ endif()
189
+
190
+ target_include_directories(${PROJECT_NAME} INTERFACE
191
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
192
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
193
+ )
194
+
195
+ if(BUILD_SHARED_LIBS)
196
+ target_compile_definitions(${PROJECT_NAME} PRIVATE LIBTCOD_EXPORTS)
197
+ else()
198
+ target_compile_definitions(${PROJECT_NAME} PUBLIC LIBTCOD_STATIC)
199
+ endif()
200
+
201
+ if(MSVC)
202
+ target_compile_definitions(${PROJECT_NAME} PRIVATE _CRT_SECURE_NO_WARNINGS)
203
+ endif()
204
+
205
+ target_compile_definitions(${PROJECT_NAME} PRIVATE TCOD_IGNORE_DEPRECATED)
206
+
207
+ add_subdirectory(src)
208
+
209
+ if(MSVC)
210
+ target_compile_options(${PROJECT_NAME} PRIVATE /W4)
211
+ target_compile_options(${PROJECT_NAME} PRIVATE /utf-8)
212
+ else()
213
+ target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra)
214
+ endif()
215
+
216
+ if(LIBTCOD_DOCS)
217
+ message(STATUS "Preparing Doxygen")
218
+ find_package(Doxygen REQUIRED)
219
+ doxygen_add_docs(
220
+ ${PROJECT_NAME}_docs
221
+ ALL
222
+ COMMENT "Generating documentation using Doxygen ${Doxygen_VERSION}"
223
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/docs
224
+ CONFIG_FILE ${CMAKE_CURRENT_SOURCE_DIR}/docs/Doxyfile
225
+ )
226
+ if(LIBTCOD_INSTALL)
227
+ install(
228
+ DIRECTORY
229
+ ${CMAKE_CURRENT_SOURCE_DIR}/docs/html/
230
+ TYPE DOC
231
+ )
232
+ endif()
233
+ endif()
234
+
235
+ if(LIBTCOD_INSTALL)
236
+ install(
237
+ TARGETS ${PROJECT_NAME}
238
+ EXPORT ${PROJECT_NAME}Targets
239
+ FILE_SET ${PROJECT_NAME}_header_set
240
+ RUNTIME LIBRARY ARCHIVE
241
+ COMPONENT Library
242
+ )
243
+ include(CMakePackageConfigHelpers)
244
+ install(
245
+ EXPORT ${PROJECT_NAME}Targets
246
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}
247
+ NAMESPACE ${PROJECT_NAME}::
248
+ )
249
+ configure_package_config_file(
250
+ src/${PROJECT_NAME}Config.cmake.in
251
+ ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
252
+ INSTALL_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}
253
+ PATH_VARS CMAKE_INSTALL_INCLUDEDIR)
254
+ write_basic_package_version_file(
255
+ ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
256
+ COMPATIBILITY SameMajorVersion
257
+ )
258
+ install(
259
+ FILES
260
+ ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
261
+ ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
262
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}
263
+ )
264
+ install(
265
+ FILES "LICENSE.txt"
266
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}
267
+ RENAME copyright
268
+ )
269
+
270
+ if (LIBTCOD_INSTALL_PKGCONFIG)
271
+ set(prefix "${CMAKE_INSTALL_PREFIX}")
272
+ set(exec_prefix "\${prefix}")
273
+ set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
274
+ set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
275
+ set(PACKAGE_VERSION "${LIBTCOD_VERSION_FULL}")
276
+ configure_file(
277
+ ${CMAKE_CURRENT_SOURCE_DIR}/buildsys/autotools/libtcod.pc.in
278
+ ${CMAKE_CURRENT_BINARY_DIR}/libtcod.pc
279
+ @ONLY
280
+ NEWLINE_STYLE UNIX
281
+ )
282
+ install(
283
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/libtcod.pc
284
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
285
+ )
286
+ endif()
287
+ endif()
288
+
289
+ if(LIBTCOD_SAMPLES)
290
+ add_subdirectory(samples)
291
+ endif()
292
+ if(LIBTCOD_TESTS)
293
+ add_subdirectory(tests)
294
+ list(APPEND VCPKG_MANIFEST_FEATURES "tests")
295
+ endif()
296
+
297
+ if(LIBTCOD_CPACK)
298
+ if (WIN32)
299
+ set(CPACK_GENERATOR "ZIP")
300
+ else()
301
+ set(CPACK_GENERATOR "TGZ")
302
+ endif()
303
+ set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt")
304
+ set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
305
+ include(CPack)
306
+ endif()
@@ -35,7 +35,8 @@ include(FetchContent)
35
35
  FetchContent_Declare(
36
36
  libtcod
37
37
  GIT_REPOSITORY https://github.com/libtcod/libtcod
38
- GIT_TAG main # Replace main with desired version or revision later than 2.2.1
38
+ GIT_SUBMODULES ""
39
+ GIT_TAG main # Replace with desired version-tag or git-reference
39
40
  )
40
41
  FetchContent_MakeAvailable(libtcod)
41
42
  ```