tcod 21.2.3__tar.gz → 21.2.5__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 (286) hide show
  1. {tcod-21.2.3 → tcod-21.2.5}/CHANGELOG.md +16 -0
  2. {tcod-21.2.3 → tcod-21.2.5}/PKG-INFO +1 -1
  3. {tcod-21.2.3 → tcod-21.2.5}/build_libtcod.py +3 -5
  4. {tcod-21.2.3 → tcod-21.2.5}/libtcod/CHANGELOG.md +42 -18
  5. {tcod-21.2.3 → tcod-21.2.5}/libtcod/CMakeLists.txt +37 -6
  6. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/console.c +17 -12
  7. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/console.h +7 -7
  8. tcod-21.2.5/libtcod/src/libtcod/console_rexpaint.c +661 -0
  9. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/console_rexpaint.h +3 -3
  10. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/libtcod_int.h +3 -1
  11. tcod-21.2.5/libtcod/src/libtcod/list.h +150 -0
  12. tcod-21.2.5/libtcod/src/libtcod/list_c.c +241 -0
  13. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/sys_sdl_c.c +1 -1
  14. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/version.h +2 -2
  15. {tcod-21.2.3 → tcod-21.2.5}/tcod/_libtcod.pyi +47 -47
  16. {tcod-21.2.3 → tcod-21.2.5}/tcod/version.py +3 -3
  17. {tcod-21.2.3 → tcod-21.2.5}/tcod.egg-info/PKG-INFO +1 -1
  18. tcod-21.2.5/tcod.egg-info/scm_version.json +8 -0
  19. tcod-21.2.3/libtcod/src/libtcod/console_rexpaint.c +0 -399
  20. tcod-21.2.3/libtcod/src/libtcod/list.h +0 -103
  21. tcod-21.2.3/libtcod/src/libtcod/list_c.c +0 -299
  22. tcod-21.2.3/tcod.egg-info/scm_version.json +0 -8
  23. {tcod-21.2.3 → tcod-21.2.5}/CONTRIBUTING.md +0 -0
  24. {tcod-21.2.3 → tcod-21.2.5}/LICENSE.txt +0 -0
  25. {tcod-21.2.3 → tcod-21.2.5}/MANIFEST.in +0 -0
  26. {tcod-21.2.3 → tcod-21.2.5}/README.rst +0 -0
  27. {tcod-21.2.3 → tcod-21.2.5}/build_sdl.py +0 -0
  28. {tcod-21.2.3 → tcod-21.2.5}/libtcod/CONTRIBUTING.md +0 -0
  29. {tcod-21.2.3 → tcod-21.2.5}/libtcod/LIBTCOD-CREDITS.txt +0 -0
  30. {tcod-21.2.3 → tcod-21.2.5}/libtcod/LICENSE.txt +0 -0
  31. {tcod-21.2.3 → tcod-21.2.5}/libtcod/README.md +0 -0
  32. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/bresenham.h +0 -0
  33. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/bresenham_c.c +0 -0
  34. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/bsp.h +0 -0
  35. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/bsp_c.c +0 -0
  36. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/color.c +0 -0
  37. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/color.h +0 -0
  38. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/config.h +0 -0
  39. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/console_drawing.c +0 -0
  40. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/console_drawing.h +0 -0
  41. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/console_etc.c +0 -0
  42. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/console_etc.h +0 -0
  43. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/console_init.c +0 -0
  44. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/console_init.h +0 -0
  45. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/console_printing.c +0 -0
  46. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/console_printing.h +0 -0
  47. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/console_types.h +0 -0
  48. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/context.c +0 -0
  49. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/context.h +0 -0
  50. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/context_init.c +0 -0
  51. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/context_init.h +0 -0
  52. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/context_viewport.c +0 -0
  53. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/context_viewport.h +0 -0
  54. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/error.c +0 -0
  55. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/error.h +0 -0
  56. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/fov.h +0 -0
  57. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/fov_c.c +0 -0
  58. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/fov_circular_raycasting.c +0 -0
  59. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/fov_diamond_raycasting.c +0 -0
  60. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/fov_permissive2.c +0 -0
  61. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/fov_recursive_shadowcasting.c +0 -0
  62. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/fov_restrictive.c +0 -0
  63. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/fov_symmetric_shadowcast.c +0 -0
  64. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/fov_types.h +0 -0
  65. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/globals.c +0 -0
  66. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/globals.h +0 -0
  67. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/heapq.c +0 -0
  68. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/heapq.h +0 -0
  69. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/heightmap.h +0 -0
  70. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/heightmap_c.c +0 -0
  71. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/image.h +0 -0
  72. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/image_c.c +0 -0
  73. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/lex.h +0 -0
  74. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/lex_c.c +0 -0
  75. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/libtcod.h +0 -0
  76. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/logging.c +0 -0
  77. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/logging.h +0 -0
  78. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/mersenne.h +0 -0
  79. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/mersenne_c.c +0 -0
  80. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/mersenne_types.h +0 -0
  81. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/mouse.h +0 -0
  82. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/mouse_types.h +0 -0
  83. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/namegen.h +0 -0
  84. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/namegen_c.c +0 -0
  85. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/noise.h +0 -0
  86. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/noise_c.c +0 -0
  87. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/noise_defaults.h +0 -0
  88. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/parser.h +0 -0
  89. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/parser_c.c +0 -0
  90. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/path.h +0 -0
  91. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/path_c.c +0 -0
  92. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/pathfinder.c +0 -0
  93. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/pathfinder.h +0 -0
  94. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/pathfinder_frontier.c +0 -0
  95. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/pathfinder_frontier.h +0 -0
  96. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/portability.h +0 -0
  97. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/random.c +0 -0
  98. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/random.h +0 -0
  99. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/renderer_sdl2.c +0 -0
  100. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/renderer_sdl2.h +0 -0
  101. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/renderer_xterm.c +0 -0
  102. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/renderer_xterm.h +0 -0
  103. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/sdl2/console_grid.glslf +0 -0
  104. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/sdl2/console_grid.glslv +0 -0
  105. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/sdl2/event.h +0 -0
  106. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/sys.h +0 -0
  107. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/sys_c.c +0 -0
  108. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/sys_sdl_img_bmp.c +0 -0
  109. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/sys_sdl_img_png.c +0 -0
  110. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/tileset.c +0 -0
  111. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/tileset.h +0 -0
  112. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/tileset_bdf.c +0 -0
  113. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/tileset_bdf.h +0 -0
  114. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/tileset_fallback.c +0 -0
  115. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/tileset_fallback.h +0 -0
  116. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/tileset_render.c +0 -0
  117. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/tileset_render.h +0 -0
  118. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/tileset_truetype.c +0 -0
  119. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/tileset_truetype.h +0 -0
  120. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/timer.h +0 -0
  121. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/tree.h +0 -0
  122. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/tree_c.c +0 -0
  123. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/txtfield.h +0 -0
  124. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/txtfield_c.c +0 -0
  125. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/utility.h +0 -0
  126. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/wrappers.c +0 -0
  127. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/wrappers.h +0 -0
  128. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/zip.h +0 -0
  129. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod/zip_c.c +0 -0
  130. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod.h +0 -0
  131. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/libtcod_c.c +0 -0
  132. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/lodepng.c +0 -0
  133. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/lodepng.h +0 -0
  134. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/stb.c +0 -0
  135. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/stb_truetype.h +0 -0
  136. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/utf8proc/bench/bench.c +0 -0
  137. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/utf8proc/bench/icu.c +0 -0
  138. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/utf8proc/bench/unistring.c +0 -0
  139. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/utf8proc/bench/util.c +0 -0
  140. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/utf8proc/bench/util.h +0 -0
  141. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/utf8proc/test/app/app.c +0 -0
  142. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/utf8proc/test/case.c +0 -0
  143. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/utf8proc/test/charwidth.c +0 -0
  144. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/utf8proc/test/custom.c +0 -0
  145. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/utf8proc/test/fuzz_main.c +0 -0
  146. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/utf8proc/test/fuzzer.c +0 -0
  147. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/utf8proc/test/graphemetest.c +0 -0
  148. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/utf8proc/test/iscase.c +0 -0
  149. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/utf8proc/test/iterate.c +0 -0
  150. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/utf8proc/test/maxdecomposition.c +0 -0
  151. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/utf8proc/test/misc.c +0 -0
  152. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/utf8proc/test/normtest.c +0 -0
  153. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/utf8proc/test/printproperty.c +0 -0
  154. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/utf8proc/test/tests.c +0 -0
  155. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/utf8proc/test/tests.h +0 -0
  156. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/utf8proc/test/valid.c +0 -0
  157. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/utf8proc/utf8proc.c +0 -0
  158. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/utf8proc/utf8proc.h +0 -0
  159. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/utf8proc/utf8proc_data.c +0 -0
  160. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/adler32.c +0 -0
  161. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/compress.c +0 -0
  162. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/blast/blast-test.c +0 -0
  163. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/blast/blast.c +0 -0
  164. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/blast/blast.h +0 -0
  165. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/crc32vx/crc32_vx.c +0 -0
  166. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/crc32vx/crc32_vx_hooks.h +0 -0
  167. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/infback9/infback9.c +0 -0
  168. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/infback9/infback9.h +0 -0
  169. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/infback9/inffix9.h +0 -0
  170. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/infback9/inflate9.h +0 -0
  171. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/infback9/inftree9.c +0 -0
  172. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/infback9/inftree9.h +0 -0
  173. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/iostream/zfstream.h +0 -0
  174. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/iostream2/zstream.h +0 -0
  175. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/iostream3/zfstream.h +0 -0
  176. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/minizip/crypt.h +0 -0
  177. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/minizip/ints.h +0 -0
  178. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/minizip/ioapi.c +0 -0
  179. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/minizip/ioapi.h +0 -0
  180. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/minizip/iowin32.c +0 -0
  181. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/minizip/iowin32.h +0 -0
  182. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/minizip/miniunz.c +0 -0
  183. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/minizip/minizip.c +0 -0
  184. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/minizip/mztools.c +0 -0
  185. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/minizip/mztools.h +0 -0
  186. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/minizip/skipset.h +0 -0
  187. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/minizip/unzip.c +0 -0
  188. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/minizip/unzip.h +0 -0
  189. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/minizip/zip.c +0 -0
  190. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/minizip/zip.h +0 -0
  191. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/puff/bin-writer.c +0 -0
  192. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/puff/puff.c +0 -0
  193. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/puff/puff.h +0 -0
  194. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/puff/pufftest.c +0 -0
  195. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/contrib/testzlib/testzlib.c +0 -0
  196. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/crc32.c +0 -0
  197. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/crc32.h +0 -0
  198. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/deflate.c +0 -0
  199. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/deflate.h +0 -0
  200. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/examples/enough.c +0 -0
  201. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/examples/fitblk.c +0 -0
  202. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/examples/gun.c +0 -0
  203. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/examples/gzappend.c +0 -0
  204. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/examples/gzjoin.c +0 -0
  205. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/examples/gzlog.c +0 -0
  206. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/examples/gzlog.h +0 -0
  207. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/examples/gznorm.c +0 -0
  208. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/examples/zpipe.c +0 -0
  209. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/examples/zran.c +0 -0
  210. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/examples/zran.h +0 -0
  211. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/gzclose.c +0 -0
  212. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/gzguts.h +0 -0
  213. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/gzlib.c +0 -0
  214. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/gzread.c +0 -0
  215. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/gzwrite.c +0 -0
  216. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/infback.c +0 -0
  217. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/inffast.c +0 -0
  218. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/inffast.h +0 -0
  219. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/inffixed.h +0 -0
  220. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/inflate.c +0 -0
  221. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/inflate.h +0 -0
  222. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/inftrees.c +0 -0
  223. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/inftrees.h +0 -0
  224. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/test/example.c +0 -0
  225. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/test/infcover.c +0 -0
  226. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/test/minigzip.c +0 -0
  227. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/trees.c +0 -0
  228. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/trees.h +0 -0
  229. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/uncompr.c +0 -0
  230. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/zconf.h +0 -0
  231. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/zlib.h +0 -0
  232. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/zutil.c +0 -0
  233. {tcod-21.2.3 → tcod-21.2.5}/libtcod/src/vendor/zlib/zutil.h +0 -0
  234. {tcod-21.2.3 → tcod-21.2.5}/libtcodpy.py +0 -0
  235. {tcod-21.2.3 → tcod-21.2.5}/pyproject.toml +0 -0
  236. {tcod-21.2.3 → tcod-21.2.5}/requirements.txt +0 -0
  237. {tcod-21.2.3 → tcod-21.2.5}/setup.cfg +0 -0
  238. {tcod-21.2.3 → tcod-21.2.5}/setup.py +0 -0
  239. {tcod-21.2.3 → tcod-21.2.5}/tcod/__init__.py +0 -0
  240. {tcod-21.2.3 → tcod-21.2.5}/tcod/__pyinstaller/__init__.py +0 -0
  241. {tcod-21.2.3 → tcod-21.2.5}/tcod/__pyinstaller/hook-tcod.py +0 -0
  242. {tcod-21.2.3 → tcod-21.2.5}/tcod/_internal.py +0 -0
  243. {tcod-21.2.3 → tcod-21.2.5}/tcod/bsp.py +0 -0
  244. {tcod-21.2.3 → tcod-21.2.5}/tcod/cdef.h +0 -0
  245. {tcod-21.2.3 → tcod-21.2.5}/tcod/cffi.h +0 -0
  246. {tcod-21.2.3 → tcod-21.2.5}/tcod/cffi.py +0 -0
  247. {tcod-21.2.3 → tcod-21.2.5}/tcod/color.py +0 -0
  248. {tcod-21.2.3 → tcod-21.2.5}/tcod/console.py +0 -0
  249. {tcod-21.2.3 → tcod-21.2.5}/tcod/constants.py +0 -0
  250. {tcod-21.2.3 → tcod-21.2.5}/tcod/context.py +0 -0
  251. {tcod-21.2.3 → tcod-21.2.5}/tcod/event.py +0 -0
  252. {tcod-21.2.3 → tcod-21.2.5}/tcod/event_constants.py +0 -0
  253. {tcod-21.2.3 → tcod-21.2.5}/tcod/image.py +0 -0
  254. {tcod-21.2.3 → tcod-21.2.5}/tcod/libtcodpy.py +0 -0
  255. {tcod-21.2.3 → tcod-21.2.5}/tcod/los.py +0 -0
  256. {tcod-21.2.3 → tcod-21.2.5}/tcod/map.py +0 -0
  257. {tcod-21.2.3 → tcod-21.2.5}/tcod/noise.c +0 -0
  258. {tcod-21.2.3 → tcod-21.2.5}/tcod/noise.h +0 -0
  259. {tcod-21.2.3 → tcod-21.2.5}/tcod/noise.py +0 -0
  260. {tcod-21.2.3 → tcod-21.2.5}/tcod/path.c +0 -0
  261. {tcod-21.2.3 → tcod-21.2.5}/tcod/path.h +0 -0
  262. {tcod-21.2.3 → tcod-21.2.5}/tcod/path.py +0 -0
  263. {tcod-21.2.3 → tcod-21.2.5}/tcod/py.typed +0 -0
  264. {tcod-21.2.3 → tcod-21.2.5}/tcod/random.h +0 -0
  265. {tcod-21.2.3 → tcod-21.2.5}/tcod/random.py +0 -0
  266. {tcod-21.2.3 → tcod-21.2.5}/tcod/render.py +0 -0
  267. {tcod-21.2.3 → tcod-21.2.5}/tcod/sdl/__init__.py +0 -0
  268. {tcod-21.2.3 → tcod-21.2.5}/tcod/sdl/_internal.py +0 -0
  269. {tcod-21.2.3 → tcod-21.2.5}/tcod/sdl/audio.py +0 -0
  270. {tcod-21.2.3 → tcod-21.2.5}/tcod/sdl/constants.py +0 -0
  271. {tcod-21.2.3 → tcod-21.2.5}/tcod/sdl/joystick.py +0 -0
  272. {tcod-21.2.3 → tcod-21.2.5}/tcod/sdl/mouse.py +0 -0
  273. {tcod-21.2.3 → tcod-21.2.5}/tcod/sdl/render.py +0 -0
  274. {tcod-21.2.3 → tcod-21.2.5}/tcod/sdl/sys.py +0 -0
  275. {tcod-21.2.3 → tcod-21.2.5}/tcod/sdl/video.py +0 -0
  276. {tcod-21.2.3 → tcod-21.2.5}/tcod/tcod.c +0 -0
  277. {tcod-21.2.3 → tcod-21.2.5}/tcod/tcod.h +0 -0
  278. {tcod-21.2.3 → tcod-21.2.5}/tcod/tcod.py +0 -0
  279. {tcod-21.2.3 → tcod-21.2.5}/tcod/tileset.py +0 -0
  280. {tcod-21.2.3 → tcod-21.2.5}/tcod.egg-info/SOURCES.txt +0 -0
  281. {tcod-21.2.3 → tcod-21.2.5}/tcod.egg-info/dependency_links.txt +0 -0
  282. {tcod-21.2.3 → tcod-21.2.5}/tcod.egg-info/entry_points.txt +0 -0
  283. {tcod-21.2.3 → tcod-21.2.5}/tcod.egg-info/requires.txt +0 -0
  284. {tcod-21.2.3 → tcod-21.2.5}/tcod.egg-info/scm_file_list.json +0 -0
  285. {tcod-21.2.3 → tcod-21.2.5}/tcod.egg-info/top_level.txt +0 -0
  286. {tcod-21.2.3 → tcod-21.2.5}/tox.ini +0 -0
@@ -6,6 +6,22 @@ This project adheres to [Semantic Versioning](https://semver.org/) since version
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [21.2.5] - 2026-11-21
10
+
11
+ ### Changed
12
+
13
+ - Updated libtcod to 2.3.3
14
+
15
+ ## [21.2.4] - 2026-11-13
16
+
17
+ ### Changed
18
+
19
+ - Updated libtcod to 2.3.2
20
+
21
+ ### Security
22
+
23
+ - Safer handling of untrusted REXPaint files.
24
+
9
25
  ## [21.2.3] - 2026-11-09
10
26
 
11
27
  ### Changed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tcod
3
- Version: 21.2.3
3
+ Version: 21.2.5
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
@@ -44,7 +44,7 @@ RE_INCLUDE = re.compile(r'#include "([^"]*)"')
44
44
  RE_TAGS = re.compile(
45
45
  r"TCODLIB_C?API|TCOD_PUBLIC|TCOD_PRIVATE|TCOD_NODISCARD|TCOD_DEPRECATED_NOMESSAGE|TCOD_DEPRECATED_ENUM"
46
46
  r"|(TCOD_DEPRECATED\(\".*?\"\))"
47
- r"|(TCOD_DEPRECATED|TCODLIB_FORMAT)\([^)]*\)|__restrict"
47
+ r"|(TCOD_DEPRECATED|TCODLIB_FORMAT)\([^)]*\)"
48
48
  r"|TCODLIB_(BEGIN|END)_IGNORE_DEPRECATIONS"
49
49
  )
50
50
  RE_VAFUNC = re.compile(r"^[^;]*\([^;]*va_list.*\);", re.MULTILINE)
@@ -74,6 +74,7 @@ class ParsedHeader:
74
74
  header = RE_TAGS.sub("", header)
75
75
  header = RE_VAFUNC.sub("", header)
76
76
  header = RE_INLINE.sub(r"\1;", header)
77
+ header = header.replace("__restrict", "restrict") # Resolve header qualifier
77
78
  self.header = header.strip()
78
79
  self.depends = frozenset(depends)
79
80
  self.all_headers[self.path] = self
@@ -185,7 +186,6 @@ sources += ["libtcod/src/vendor/utf8proc/utf8proc.c"]
185
186
  sources += glob.glob("libtcod/src/vendor/zlib/*.c")
186
187
 
187
188
  if sys.platform == "win32":
188
- libraries += ["User32"]
189
189
  define_macros.append(("TCODLIB_API", ""))
190
190
  define_macros.append(("_CRT_SECURE_NO_WARNINGS", None))
191
191
 
@@ -201,7 +201,7 @@ define_macros.append(("UTF8PROC_STATIC", None))
201
201
 
202
202
  tdl_build = os.environ.get("TDL_BUILD", "RELEASE").upper()
203
203
 
204
- MSVC_CFLAGS = {"DEBUG": ["/Od"], "RELEASE": ["/GL", "/O2", "/GS-", "/wd4996"]}
204
+ MSVC_CFLAGS = {"DEBUG": ["/Od"], "RELEASE": ["/GL", "/O2", "/wd4996"]}
205
205
  MSVC_LDFLAGS: dict[str, list[str]] = {"DEBUG": [], "RELEASE": ["/LTCG"]}
206
206
  GCC_CFLAGS = {
207
207
  "DEBUG": ["-std=c99", "-Og", "-g", "-fPIC"],
@@ -209,10 +209,8 @@ GCC_CFLAGS = {
209
209
  "-std=c99",
210
210
  "-flto",
211
211
  "-O3",
212
- "-g",
213
212
  "-fPIC",
214
213
  "-Wno-deprecated-declarations",
215
- "-Wno-discarded-qualifiers", # Ignore discarded restrict qualifiers.
216
214
  ],
217
215
  }
218
216
 
@@ -9,9 +9,36 @@ 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.3] - 2026-11-20
13
+ ### CMake
14
+ - CMake-installed pkg-config files now handle absolute include paths and link to the correct library on MSVC.
15
+
16
+ ### Fixed
17
+ - Saving/loading REXPaint files with zero layers is more reliable.
18
+ - `TCOD_sys_clipboard_set` return value was inverted.
19
+
20
+ ### Security
21
+ - Loading REXPaint files is no longer allowed an unlimited amount of memory.
22
+
23
+ ## [2.3.2] - 2026-11-12
24
+ ### CMake
25
+ - `Requires.private` in pkg-config file now only includes the packages requested by the current configuration. https://github.com/libtcod/libtcod/pull/207
26
+
27
+ ### Security
28
+ - Safer handling of `NULL` `TCOD_List*` pointers passed to list functions.
29
+ - `TCOD_list_get` now performs bounds checking.
30
+ - Prevent unsafe interactions with memory when loading untrusted size values from REXPaint files.
31
+ - `TCOD_List` will now gracefully handle failed memory allocations.
32
+ - Consoles now refuse to allocate when combined width and height would overflow.
33
+ - `TCOD_load_xp_from_memory` will check for incomplete compressed streams.
34
+
35
+ ## [2.3.1] - 2026-11-10
36
+ ### CMake
37
+ - Fixed build failures when selecting `vendored` dependencies. https://github.com/libtcod/libtcod/pull/206
38
+
12
39
  ## [2.3.0] - 2026-11-09
13
40
  ### Added
14
- - Added `TCOD_heightmap_kernel_transform_out` for convolution with separate source and destination heightmaps.
41
+ - Added `TCOD_heightmap_kernel_transform_out` for convolution with separate source and destination heightmaps. https://github.com/libtcod/libtcod/pull/175
15
42
  - Added `TCOD_heightmap_is_valid` and `TCOD_heightmap_in_bounds`.
16
43
 
17
44
  ### Changed
@@ -22,22 +49,20 @@ Versions since `2.0.0` only track API breaks and no longer guarantee ABI compati
22
49
  - Fixed installed or distributed packages not including headers at the correct prefixes.
23
50
 
24
51
  ### 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.
52
+ - Image downsampling no longer counts source pixels twice at integer sampling boundaries. https://github.com/libtcod/libtcod/pull/205
53
+ - Dijkstra routes now follow the computed movement costs, including diagonal costs and directed callbacks. https://github.com/libtcod/libtcod/pull/203
54
+ - Symmetric shadowcasting rounds negative sector edges correctly, preserving visibility when a dungeon is rotated. https://github.com/libtcod/libtcod/pull/204
55
+ - Fixed A* returning before a cheaper route to a weighted destination is settled. https://github.com/libtcod/libtcod/pull/201
56
+ - Fixed A* computing non-ideal routes with non-Euclidean distance costs. https://github.com/libtcod/libtcod/pull/202
57
+ - Terrain normals no longer become flat at map edges; fractional edge samples use their actual spacing. https://github.com/libtcod/libtcod/pull/200
58
+ - Midpoint terrain generation now seeds the corners of its working square using the heightmap stride. https://github.com/libtcod/libtcod/pull/198
59
+ - Bezier terrain carving now includes the starting hill, even when the curve stays in one cell. https://github.com/libtcod/libtcod/pull/197
60
+ - Heightmap normalization preserves ranges with better precision and no longer ignores very small values. https://github.com/libtcod/libtcod/pull/199
61
+ - Fixed heightmap slopes cancelling on tilted planes or becoming negative at peaks; diagonal neighbors now use their geometric distance. https://github.com/libtcod/libtcod/pull/195
62
+ - Tilesheet color-key detection now works with an empty space glyph when the zeroth tile is not empty. https://github.com/libtcod/libtcod/pull/190
63
+ - Fixed `TCOD_heightmap_kernel_transform` reading modified values during in-place convolution. https://github.com/libtcod/libtcod/pull/175
38
64
  - `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)
65
+ - Fixed memory crashes with using the permissive or restrictive field-of-view algorithms on very small maps. https://github.com/libtcod/libtcod/pull/184
41
66
  - Basic math functions from `libm` were not linked in C.
42
67
  - Voronoi terrain generation now includes distant sites for extra large maps.
43
68
  - Internally used `popen`, `pclose` were undeclared due to missing feature test macros on Linux
@@ -47,8 +72,7 @@ Versions since `2.0.0` only track API breaks and no longer guarantee ABI compati
47
72
 
48
73
  ## [2.2.2] - 2026-01-06
49
74
  ### CMake
50
- - Now fully supports `FetchPackage` for dependency resolution.
51
- [#141](https://github.com/libtcod/libtcod/issues/141)
75
+ - Now fully supports `FetchPackage` for dependency resolution. https://github.com/libtcod/libtcod/issues/141
52
76
  - No longer sets output directories.
53
77
  - Now only configures Vcpkg or CPack when `LIBTCOD_VCPKG` or `LIBTCOD_CPACK` is enabled.
54
78
  - `LIBTCOD_UTF8PROC` now defaults to `ON` instead of `vcpkg`.
@@ -134,8 +134,8 @@ set_property(CACHE LIBTCOD_LODEPNG PROPERTY STRINGS "vendored" "ON" "OFF")
134
134
  fix_deprecated_link_setting(LIBTCOD_LODEPNG)
135
135
  if(LIBTCOD_LODEPNG STREQUAL "vendored")
136
136
  message("Will be vendored: LodePNG")
137
- target_sources(${PROJECT_NAME} PRIVATE "vendor/lodepng.c")
138
- target_include_directories(${PROJECT_NAME} PRIVATE "vendor/")
137
+ target_sources(${PROJECT_NAME} PRIVATE "src/vendor/lodepng.c")
138
+ target_include_directories(${PROJECT_NAME} PRIVATE "src/vendor/")
139
139
  elseif(LIBTCOD_LODEPNG)
140
140
  FetchContent_MakeAvailable(lodepng-c)
141
141
  target_link_libraries(${PROJECT_NAME} PRIVATE lodepng-c)
@@ -151,8 +151,8 @@ endif()
151
151
  fix_deprecated_link_setting(LIBTCOD_UTF8PROC)
152
152
  if(LIBTCOD_UTF8PROC STREQUAL "vendored")
153
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")
154
+ add_subdirectory("src/vendor/utf8proc")
155
+ target_link_libraries(${PROJECT_NAME} PRIVATE utf8proc::utf8proc)
156
156
  elseif(LIBTCOD_UTF8PROC)
157
157
  FetchContent_MakeAvailable(utf8proc)
158
158
  target_link_libraries(${PROJECT_NAME} PRIVATE utf8proc::utf8proc)
@@ -168,7 +168,7 @@ endif()
168
168
  fix_deprecated_link_setting(LIBTCOD_STB)
169
169
  if(LIBTCOD_STB STREQUAL "vendored")
170
170
  message("Will be vendored: stb")
171
- target_include_directories(${PROJECT_NAME} PRIVATE "vendor/")
171
+ target_include_directories(${PROJECT_NAME} PRIVATE "src/vendor/")
172
172
  else()
173
173
  FetchContent_MakeAvailable(Stb)
174
174
  target_include_directories(${PROJECT_NAME} PRIVATE ${Stb_INCLUDE_DIR})
@@ -268,10 +268,41 @@ if(LIBTCOD_INSTALL)
268
268
  )
269
269
 
270
270
  if (LIBTCOD_INSTALL_PKGCONFIG)
271
+ set(LIBTCOD_PKGCONFIG_REQUIRES_PRIVATE_LIST)
272
+ if(LIBTCOD_SDL3)
273
+ list(APPEND LIBTCOD_PKGCONFIG_REQUIRES_PRIVATE_LIST sdl3)
274
+ endif()
275
+ if(LIBTCOD_ZLIB)
276
+ list(APPEND LIBTCOD_PKGCONFIG_REQUIRES_PRIVATE_LIST zlib)
277
+ endif()
278
+ string(JOIN ", " LIBTCOD_PKGCONFIG_REQUIRES_PRIVATE ${LIBTCOD_PKGCONFIG_REQUIRES_PRIVATE_LIST})
279
+
271
280
  set(prefix "${CMAKE_INSTALL_PREFIX}")
272
281
  set(exec_prefix "\${prefix}")
273
282
  set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
274
- set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
283
+ if(IS_ABSOLUTE "${CMAKE_INSTALL_INCLUDEDIR}")
284
+ file(RELATIVE_PATH LIBTCOD_PKGCONFIG_INCLUDEDIR
285
+ "${CMAKE_INSTALL_PREFIX}"
286
+ "${CMAKE_INSTALL_INCLUDEDIR}")
287
+ if(IS_ABSOLUTE "${LIBTCOD_PKGCONFIG_INCLUDEDIR}")
288
+ set(includedir "${CMAKE_INSTALL_INCLUDEDIR}")
289
+ else()
290
+ set(includedir "\${prefix}/${LIBTCOD_PKGCONFIG_INCLUDEDIR}")
291
+ endif()
292
+ else()
293
+ set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
294
+ endif()
295
+
296
+ set(LIBTCOD_PKGCONFIG_LIBS "-ltcod")
297
+ set(LIBTCOD_PKGCONFIG_CFLAGS "")
298
+ if(MSVC)
299
+ set(LIBTCOD_PKGCONFIG_LIBS "-llibtcod")
300
+ if(NOT BUILD_SHARED_LIBS)
301
+ # This is appended to the include flag in the .pc template.
302
+ set(LIBTCOD_PKGCONFIG_CFLAGS " -DLIBTCOD_STATIC")
303
+ endif()
304
+ endif()
305
+
275
306
  set(PACKAGE_VERSION "${LIBTCOD_VERSION_FULL}")
276
307
  configure_file(
277
308
  ${CMAKE_CURRENT_SOURCE_DIR}/buildsys/autotools/libtcod.pc.in
@@ -31,6 +31,7 @@
31
31
  */
32
32
  #include "console.h"
33
33
 
34
+ #include <limits.h>
34
35
  #include <stdlib.h>
35
36
 
36
37
  #include "libtcod_int.h"
@@ -70,26 +71,30 @@ static bool TCOD_console_init_(TCOD_Console* con) {
70
71
  TCOD_console_clear(con);
71
72
  return true;
72
73
  }
73
- TCOD_Console* TCOD_console_new(int w, int h) {
74
- if (w < 0 || h < 0) {
75
- TCOD_set_errorvf("Width and height can not be negative: got %i,%i", w, h);
74
+ TCOD_Console* TCOD_console_new(int width, int height) {
75
+ if (width < 0 || height < 0) {
76
+ TCOD_set_errorvf("Width and height can not be negative: got %i,%i", width, height);
76
77
  return NULL;
77
78
  }
78
- struct TCOD_Console* con = calloc(1, sizeof(*con));
79
- if (!con) {
79
+ if ((uintmax_t)width * (uintmax_t)height > INT_MAX) {
80
+ TCOD_set_errorv("Console size is too large.");
81
+ return NULL;
82
+ }
83
+ struct TCOD_Console* new_console = calloc(1, sizeof(*new_console));
84
+ if (!new_console) {
80
85
  TCOD_set_errorv("Could not allocate memory for a console.");
81
86
  return NULL;
82
87
  }
83
- con->w = w;
84
- con->h = h;
85
- con->elements = w * h;
86
- TCOD_console_init_(con);
88
+ new_console->w = width;
89
+ new_console->h = height;
90
+ new_console->elements = width * height;
91
+ TCOD_console_init_(new_console);
87
92
  if (TCOD_ctx.root) {
88
93
  // Default values for the root console are set by TCOD_console_init_.
89
- con->alignment = TCOD_ctx.root->alignment;
90
- con->bkgnd_flag = TCOD_ctx.root->bkgnd_flag;
94
+ new_console->alignment = TCOD_ctx.root->alignment;
95
+ new_console->bkgnd_flag = TCOD_ctx.root->bkgnd_flag;
91
96
  }
92
- return con;
97
+ return new_console;
93
98
  }
94
99
  void TCOD_console_delete(TCOD_Console* con) {
95
100
  TCOD_Console* console = (con ? con : TCOD_ctx.root);
@@ -256,14 +256,14 @@ typedef struct TCOD_Console* TCOD_console_t;
256
256
  #ifdef __cplusplus
257
257
  extern "C" {
258
258
  #endif // __cplusplus
259
- /**
260
- * Return a new console with a specific number of columns and rows.
261
- *
262
- * \param w Number of columns.
263
- * \param h Number of columns.
264
- * \return A pointer to the new console, or NULL on error.
259
+ /***************************************************************************
260
+ @brief Return a new console with a specific number of columns and rows.
261
+
262
+ @param width Number of columns.
263
+ @param height Number of rows.
264
+ @return A pointer to the new console, or NULL on error.
265
265
  */
266
- TCOD_PUBLIC TCOD_NODISCARD TCOD_Console* TCOD_console_new(int w, int h);
266
+ TCOD_PUBLIC TCOD_NODISCARD TCOD_Console* TCOD_console_new(int width, int height);
267
267
  /**
268
268
  * Return the width of a console.
269
269
  */