tcod 21.2.2__tar.gz → 21.2.4__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.
- {tcod-21.2.2 → tcod-21.2.4}/CHANGELOG.md +17 -0
- {tcod-21.2.2 → tcod-21.2.4}/PKG-INFO +1 -1
- {tcod-21.2.2 → tcod-21.2.4}/build_libtcod.py +5 -4
- {tcod-21.2.2 → tcod-21.2.4}/build_sdl.py +8 -2
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/CHANGELOG.md +54 -5
- tcod-21.2.4/libtcod/CMakeLists.txt +315 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/README.md +2 -1
- tcod-21.2.2/libtcod/src/libtcod/bresenham_c.c → tcod-21.2.4/libtcod/src/libtcod/bresenham.h +85 -105
- tcod-21.2.4/libtcod/src/libtcod/bresenham_c.c +103 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/color.c +3 -154
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/color.h +144 -14
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/console.c +17 -12
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/console.h +9 -13
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/console_drawing.h +3 -9
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/console_etc.c +18 -23
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/console_etc.h +7 -11
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/console_init.c +3 -2
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/console_init.h +3 -9
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/console_printing.h +9 -27
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/console_rexpaint.c +54 -38
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/console_rexpaint.h +5 -13
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/context.h +14 -42
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/context_init.h +3 -9
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/context_viewport.h +3 -9
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/error.c +2 -1
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/error.h +2 -6
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/fov_permissive2.c +4 -3
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/fov_restrictive.c +1 -1
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/fov_symmetric_shadowcast.c +2 -3
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/globals.h +2 -6
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/heapq.c +10 -53
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/heapq.h +34 -0
- tcod-21.2.4/libtcod/src/libtcod/heightmap.h +241 -0
- tcod-21.2.4/libtcod/src/libtcod/heightmap_c.c +625 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/image_c.c +4 -4
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/lex_c.c +3 -2
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/libtcod_int.h +3 -1
- tcod-21.2.4/libtcod/src/libtcod/list.h +150 -0
- tcod-21.2.4/libtcod/src/libtcod/list_c.c +239 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/logging.h +3 -9
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/mersenne_c.c +3 -3
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/namegen_c.c +4 -4
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/noise.h +3 -9
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/parser_c.c +4 -3
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/path_c.c +113 -104
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/portability.h +1 -3
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/renderer_sdl2.c +3 -3
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/renderer_sdl2.h +3 -9
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/sys_sdl_c.c +4 -3
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/tileset.c +30 -10
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/tileset.h +8 -24
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/tileset_bdf.h +2 -6
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/tileset_fallback.c +4 -1
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/tileset_render.h +1 -3
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/utility.h +14 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/version.h +4 -8
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/zip.h +10 -14
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/zip_c.c +132 -153
- tcod-21.2.4/libtcod/src/vendor/lodepng.c +7257 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/vendor/lodepng.h +609 -191
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/vendor/stb_truetype.h +504 -319
- tcod-21.2.4/libtcod/src/vendor/utf8proc/bench/bench.c +56 -0
- tcod-21.2.4/libtcod/src/vendor/utf8proc/bench/icu.c +61 -0
- tcod-21.2.4/libtcod/src/vendor/utf8proc/bench/unistring.c +60 -0
- tcod-21.2.4/libtcod/src/vendor/utf8proc/bench/util.c +38 -0
- tcod-21.2.4/libtcod/src/vendor/utf8proc/bench/util.h +22 -0
- tcod-21.2.4/libtcod/src/vendor/utf8proc/test/app/app.c +9 -0
- tcod-21.2.4/libtcod/src/vendor/utf8proc/test/case.c +76 -0
- tcod-21.2.4/libtcod/src/vendor/utf8proc/test/charwidth.c +91 -0
- tcod-21.2.4/libtcod/src/vendor/utf8proc/test/custom.c +50 -0
- tcod-21.2.4/libtcod/src/vendor/utf8proc/test/fuzz_main.c +54 -0
- tcod-21.2.4/libtcod/src/vendor/utf8proc/test/fuzzer.c +100 -0
- tcod-21.2.4/libtcod/src/vendor/utf8proc/test/graphemetest.c +160 -0
- tcod-21.2.4/libtcod/src/vendor/utf8proc/test/iscase.c +63 -0
- tcod-21.2.4/libtcod/src/vendor/utf8proc/test/iterate.c +168 -0
- tcod-21.2.4/libtcod/src/vendor/utf8proc/test/maxdecomposition.c +22 -0
- tcod-21.2.4/libtcod/src/vendor/utf8proc/test/misc.c +102 -0
- tcod-21.2.4/libtcod/src/vendor/utf8proc/test/normtest.c +64 -0
- tcod-21.2.4/libtcod/src/vendor/utf8proc/test/printproperty.c +68 -0
- tcod-21.2.4/libtcod/src/vendor/utf8proc/test/tests.c +100 -0
- tcod-21.2.4/libtcod/src/vendor/utf8proc/test/tests.h +32 -0
- tcod-21.2.4/libtcod/src/vendor/utf8proc/test/valid.c +41 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/vendor/utf8proc/utf8proc.c +236 -140
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/vendor/utf8proc/utf8proc.h +186 -71
- tcod-21.2.4/libtcod/src/vendor/utf8proc/utf8proc_data.c +17480 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/vendor/zlib/adler32.c +5 -27
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/vendor/zlib/compress.c +37 -24
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/blast/blast-test.c +42 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/blast/blast.c +422 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/blast/blast.h +84 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/crc32vx/crc32_vx.c +254 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/crc32vx/crc32_vx_hooks.h +9 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/infback9/infback9.c +603 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/infback9/infback9.h +37 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/infback9/inffix9.h +107 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/infback9/inflate9.h +47 -0
- tcod-21.2.2/libtcod/src/vendor/zlib/inftrees.c → tcod-21.2.4/libtcod/src/vendor/zlib/contrib/infback9/inftree9.c +75 -62
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/infback9/inftree9.h +61 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/iostream/zfstream.h +128 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/iostream2/zstream.h +306 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/iostream3/zfstream.h +466 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/minizip/crypt.h +126 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/minizip/ints.h +57 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/minizip/ioapi.c +231 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/minizip/ioapi.h +183 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/minizip/iowin32.c +447 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/minizip/iowin32.h +27 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/minizip/miniunz.c +701 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/minizip/minizip.c +511 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/minizip/mztools.c +294 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/minizip/mztools.h +37 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/minizip/skipset.h +381 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/minizip/unzip.c +1982 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/minizip/unzip.h +443 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/minizip/zip.c +2260 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/minizip/zip.h +376 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/puff/bin-writer.c +26 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/puff/puff.c +840 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/puff/puff.h +35 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/puff/pufftest.c +168 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/contrib/testzlib/testzlib.c +275 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/crc32.c +983 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/crc32.h +9446 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/vendor/zlib/deflate.c +584 -526
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/vendor/zlib/deflate.h +57 -23
- tcod-21.2.4/libtcod/src/vendor/zlib/examples/enough.c +597 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/examples/fitblk.c +233 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/examples/gun.c +702 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/examples/gzappend.c +504 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/examples/gzjoin.c +449 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/examples/gzlog.c +1061 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/examples/gzlog.h +91 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/examples/gznorm.c +474 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/examples/zpipe.c +206 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/examples/zran.c +546 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/examples/zran.h +53 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/vendor/zlib/gzclose.c +1 -3
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/vendor/zlib/gzguts.h +69 -48
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/vendor/zlib/gzlib.c +119 -147
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/vendor/zlib/gzread.c +278 -205
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/vendor/zlib/gzwrite.c +236 -166
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/vendor/zlib/infback.c +37 -98
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/vendor/zlib/inffast.c +22 -24
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/vendor/zlib/inffast.h +1 -1
- tcod-21.2.4/libtcod/src/vendor/zlib/inffixed.h +94 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/vendor/zlib/inflate.c +149 -267
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/vendor/zlib/inflate.h +7 -4
- tcod-21.2.4/libtcod/src/vendor/zlib/inftrees.c +424 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/vendor/zlib/inftrees.h +17 -9
- tcod-21.2.4/libtcod/src/vendor/zlib/test/example.c +552 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/test/infcover.c +675 -0
- tcod-21.2.4/libtcod/src/vendor/zlib/test/minigzip.c +595 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/vendor/zlib/trees.c +304 -388
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/vendor/zlib/trees.h +1 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/vendor/zlib/uncompr.c +41 -33
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/vendor/zlib/zconf.h +50 -24
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/vendor/zlib/zlib.h +526 -370
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/vendor/zlib/zutil.c +71 -80
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/vendor/zlib/zutil.h +105 -45
- {tcod-21.2.2 → tcod-21.2.4}/tcod/_libtcod.pyi +98 -76
- {tcod-21.2.2 → tcod-21.2.4}/tcod/sdl/constants.py +1 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/version.py +3 -3
- {tcod-21.2.2 → tcod-21.2.4}/tcod.egg-info/PKG-INFO +1 -1
- {tcod-21.2.2 → tcod-21.2.4}/tcod.egg-info/SOURCES.txt +69 -2
- {tcod-21.2.2 → tcod-21.2.4}/tcod.egg-info/scm_file_list.json +2247 -742
- tcod-21.2.4/tcod.egg-info/scm_version.json +8 -0
- tcod-21.2.2/libtcod/CMakeLists.txt +0 -118
- tcod-21.2.2/libtcod/src/libtcod/bresenham.h +0 -93
- tcod-21.2.2/libtcod/src/libtcod/heightmap.h +0 -118
- tcod-21.2.2/libtcod/src/libtcod/heightmap_c.c +0 -666
- tcod-21.2.2/libtcod/src/libtcod/list.h +0 -103
- tcod-21.2.2/libtcod/src/libtcod/list_c.c +0 -299
- tcod-21.2.2/libtcod/src/vendor/khrplatform.h +0 -282
- tcod-21.2.2/libtcod/src/vendor/lodepng.c +0 -6300
- tcod-21.2.2/libtcod/src/vendor/stb_ds.h +0 -1895
- tcod-21.2.2/libtcod/src/vendor/utf8proc/utf8proc_data.c +0 -14385
- tcod-21.2.2/libtcod/src/vendor/zlib/crc32.c +0 -442
- tcod-21.2.2/libtcod/src/vendor/zlib/crc32.h +0 -441
- tcod-21.2.2/libtcod/src/vendor/zlib/inffixed.h +0 -94
- tcod-21.2.2/tcod.egg-info/scm_version.json +0 -8
- {tcod-21.2.2 → tcod-21.2.4}/CONTRIBUTING.md +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/LICENSE.txt +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/MANIFEST.in +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/README.rst +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/CONTRIBUTING.md +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/LIBTCOD-CREDITS.txt +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/LICENSE.txt +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/bsp.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/bsp_c.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/config.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/console_drawing.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/console_printing.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/console_types.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/context.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/context_init.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/context_viewport.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/fov.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/fov_c.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/fov_circular_raycasting.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/fov_diamond_raycasting.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/fov_recursive_shadowcasting.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/fov_types.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/globals.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/image.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/lex.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/libtcod.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/logging.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/mersenne.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/mersenne_types.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/mouse.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/mouse_types.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/namegen.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/noise_c.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/noise_defaults.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/parser.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/path.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/pathfinder.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/pathfinder.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/pathfinder_frontier.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/pathfinder_frontier.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/random.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/random.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/renderer_xterm.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/renderer_xterm.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/sdl2/console_grid.glslf +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/sdl2/console_grid.glslv +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/sdl2/event.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/sys.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/sys_c.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/sys_sdl_img_bmp.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/sys_sdl_img_png.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/tileset_bdf.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/tileset_fallback.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/tileset_render.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/tileset_truetype.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/tileset_truetype.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/timer.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/tree.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/tree_c.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/txtfield.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/txtfield_c.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/wrappers.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod/wrappers.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/libtcod_c.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcod/src/vendor/stb.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/libtcodpy.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/pyproject.toml +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/requirements.txt +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/setup.cfg +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/setup.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/__init__.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/__pyinstaller/__init__.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/__pyinstaller/hook-tcod.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/_internal.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/bsp.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/cdef.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/cffi.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/cffi.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/color.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/console.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/constants.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/context.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/event.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/event_constants.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/image.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/libtcodpy.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/los.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/map.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/noise.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/noise.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/noise.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/path.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/path.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/path.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/py.typed +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/random.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/random.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/render.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/sdl/__init__.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/sdl/_internal.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/sdl/audio.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/sdl/joystick.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/sdl/mouse.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/sdl/render.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/sdl/sys.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/sdl/video.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/tcod.c +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/tcod.h +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/tcod.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod/tileset.py +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod.egg-info/dependency_links.txt +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod.egg-info/entry_points.txt +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod.egg-info/requires.txt +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tcod.egg-info/top_level.txt +0 -0
- {tcod-21.2.2 → tcod-21.2.4}/tox.ini +0 -0
|
@@ -6,6 +6,23 @@ This project adheres to [Semantic Versioning](https://semver.org/) since version
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [21.2.4] - 2026-11-13
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Updated libtcod to 2.3.2
|
|
14
|
+
|
|
15
|
+
### Security
|
|
16
|
+
|
|
17
|
+
- Safer handling of untrusted REXPaint files.
|
|
18
|
+
|
|
19
|
+
## [21.2.3] - 2026-11-09
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- Updated libtcod to 2.3.0
|
|
24
|
+
- Updated bundled SDL to 3.4.20
|
|
25
|
+
|
|
9
26
|
## [21.2.2] - 2026-10-22
|
|
10
27
|
|
|
11
28
|
### Changed
|
|
@@ -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"(
|
|
51
|
+
RE_INLINE = re.compile(r"(^[^\n]*?inline.*?\(.*?\))\s*\{.*?\n\}$", re.DOTALL | re.MULTILINE)
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
class ParsedHeader:
|
|
@@ -197,10 +197,11 @@ 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
|
|
|
203
|
-
MSVC_CFLAGS = {"DEBUG": ["/Od"], "RELEASE": ["/GL", "/O2", "/
|
|
204
|
+
MSVC_CFLAGS = {"DEBUG": ["/Od"], "RELEASE": ["/GL", "/O2", "/wd4996"]}
|
|
204
205
|
MSVC_LDFLAGS: dict[str, list[str]] = {"DEBUG": [], "RELEASE": ["/LTCG"]}
|
|
205
206
|
GCC_CFLAGS = {
|
|
206
207
|
"DEBUG": ["-std=c99", "-Og", "-g", "-fPIC"],
|
|
@@ -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:
|
|
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.4.
|
|
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.4.
|
|
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",
|
|
@@ -378,6 +381,9 @@ def get_cdef() -> tuple[str, dict[str, str]]:
|
|
|
378
381
|
)
|
|
379
382
|
sdl_cdef = parser.get_output()
|
|
380
383
|
|
|
384
|
+
if "PYODIDE" in os.environ:
|
|
385
|
+
sdl_cdef = RE_PRINTF.sub("", sdl_cdef)
|
|
386
|
+
|
|
381
387
|
sdl_cdef = sdl_cdef.replace("_Bool", "bool")
|
|
382
388
|
sdl_cdef = RE_VAFUNC.sub("", sdl_cdef)
|
|
383
389
|
sdl_cdef = RE_INLINE.sub("", sdl_cdef)
|
|
@@ -9,10 +9,59 @@ 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.2] - 2026-11-12
|
|
13
|
+
### CMake
|
|
14
|
+
- `Requires.private` in pkg-config file now only includes the packages requested by the current configuration. https://github.com/libtcod/libtcod/pull/207
|
|
15
|
+
|
|
16
|
+
### Security
|
|
17
|
+
- Safer handling of `NULL` `TCOD_List*` pointers passed to list functions.
|
|
18
|
+
- `TCOD_list_get` now performs bounds checking.
|
|
19
|
+
- Prevent unsafe interactions with memory when loading untrusted size values from REXPaint files.
|
|
20
|
+
- `TCOD_List` will now gracefully handle failed memory allocations.
|
|
21
|
+
- Consoles now refuse to allocate when combined width and height would overflow.
|
|
22
|
+
- `TCOD_load_xp_from_memory` will check for incomplete compressed streams.
|
|
23
|
+
|
|
24
|
+
## [2.3.1] - 2026-11-10
|
|
25
|
+
### CMake
|
|
26
|
+
- Fixed build failures when selecting `vendored` dependencies. https://github.com/libtcod/libtcod/pull/206
|
|
27
|
+
|
|
28
|
+
## [2.3.0] - 2026-11-09
|
|
29
|
+
### Added
|
|
30
|
+
- Added `TCOD_heightmap_kernel_transform_out` for convolution with separate source and destination heightmaps. https://github.com/libtcod/libtcod/pull/175
|
|
31
|
+
- Added `TCOD_heightmap_is_valid` and `TCOD_heightmap_in_bounds`.
|
|
32
|
+
|
|
33
|
+
### Changed
|
|
34
|
+
- `TCOD_heightmap_get_minmax` now outputs `FLT_MAX` and `-FLT_MAX` in exceptional cases instead of zero.
|
|
35
|
+
- `TCOD_heightmap_get_value` and `TCOD_heightmap_set_value` are now inline.
|
|
36
|
+
|
|
37
|
+
### CMake
|
|
38
|
+
- Fixed installed or distributed packages not including headers at the correct prefixes.
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
- Image downsampling no longer counts source pixels twice at integer sampling boundaries. https://github.com/libtcod/libtcod/pull/205
|
|
42
|
+
- Dijkstra routes now follow the computed movement costs, including diagonal costs and directed callbacks. https://github.com/libtcod/libtcod/pull/203
|
|
43
|
+
- Symmetric shadowcasting rounds negative sector edges correctly, preserving visibility when a dungeon is rotated. https://github.com/libtcod/libtcod/pull/204
|
|
44
|
+
- Fixed A* returning before a cheaper route to a weighted destination is settled. https://github.com/libtcod/libtcod/pull/201
|
|
45
|
+
- Fixed A* computing non-ideal routes with non-Euclidean distance costs. https://github.com/libtcod/libtcod/pull/202
|
|
46
|
+
- Terrain normals no longer become flat at map edges; fractional edge samples use their actual spacing. https://github.com/libtcod/libtcod/pull/200
|
|
47
|
+
- Midpoint terrain generation now seeds the corners of its working square using the heightmap stride. https://github.com/libtcod/libtcod/pull/198
|
|
48
|
+
- Bezier terrain carving now includes the starting hill, even when the curve stays in one cell. https://github.com/libtcod/libtcod/pull/197
|
|
49
|
+
- Heightmap normalization preserves ranges with better precision and no longer ignores very small values. https://github.com/libtcod/libtcod/pull/199
|
|
50
|
+
- 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
|
|
51
|
+
- 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
|
|
52
|
+
- Fixed `TCOD_heightmap_kernel_transform` reading modified values during in-place convolution. https://github.com/libtcod/libtcod/pull/175
|
|
53
|
+
- `TCOD_heightmap_get_minmax` no longer writes to NULL outputs when the input heightmap has zero elements.
|
|
54
|
+
- Fixed memory crashes with using the permissive or restrictive field-of-view algorithms on very small maps. https://github.com/libtcod/libtcod/pull/184
|
|
55
|
+
- Basic math functions from `libm` were not linked in C.
|
|
56
|
+
- Voronoi terrain generation now includes distant sites for extra large maps.
|
|
57
|
+
- Internally used `popen`, `pclose` were undeclared due to missing feature test macros on Linux
|
|
58
|
+
|
|
59
|
+
### Removed
|
|
60
|
+
- SCons support has been officially removed.
|
|
61
|
+
|
|
12
62
|
## [2.2.2] - 2026-01-06
|
|
13
63
|
### CMake
|
|
14
|
-
- Now fully supports `FetchPackage` for dependency resolution.
|
|
15
|
-
[#141](https://github.com/libtcod/libtcod/issues/141)
|
|
64
|
+
- Now fully supports `FetchPackage` for dependency resolution. https://github.com/libtcod/libtcod/issues/141
|
|
16
65
|
- No longer sets output directories.
|
|
17
66
|
- Now only configures Vcpkg or CPack when `LIBTCOD_VCPKG` or `LIBTCOD_CPACK` is enabled.
|
|
18
67
|
- `LIBTCOD_UTF8PROC` now defaults to `ON` instead of `vcpkg`.
|
|
@@ -166,8 +215,8 @@ Versions since `2.0.0` only track API breaks and no longer guarantee ABI compati
|
|
|
166
215
|
|
|
167
216
|
## [1.22.0] - 2022-08-24
|
|
168
217
|
### Added
|
|
169
|
-
- Libtcod can now be built without zlib by passing the `-
|
|
170
|
-
- Libtcod can now be built without PNG support by passing the `-
|
|
218
|
+
- 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`.
|
|
219
|
+
- Libtcod can now be built without PNG support by passing the `-D LIBTCOD_LODEPNG=disable` flag to CMake.
|
|
171
220
|
- Added context screen capture functions to take screenshots into memory instead of a file.
|
|
172
221
|
|
|
173
222
|
### Changed
|
|
@@ -185,7 +234,7 @@ Versions since `2.0.0` only track API breaks and no longer guarantee ABI compati
|
|
|
185
234
|
- Added the `tcod::Context` class to better handle contexts in C++.
|
|
186
235
|
- Added a CMake toggle `LIBTCOD_THREADS` to remove deprecated threading functions.
|
|
187
236
|
`CMAKE_DISABLE_FIND_PACKAGE_Threads=1` can also be used.
|
|
188
|
-
- Libtcod can now be built without SDL by passing the `-
|
|
237
|
+
- Libtcod can now be built without SDL by passing the `-D LIBTCOD_SDL2=disable` flag in CMake or by setting
|
|
189
238
|
`CMAKE_DISABLE_FIND_PACKAGE_SDL2=1`.
|
|
190
239
|
|
|
191
240
|
### Changed
|
|
@@ -0,0 +1,315 @@
|
|
|
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 "src/vendor/lodepng.c")
|
|
138
|
+
target_include_directories(${PROJECT_NAME} PRIVATE "src/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
|
+
add_subdirectory("src/vendor/utf8proc")
|
|
155
|
+
target_link_libraries(${PROJECT_NAME} PRIVATE utf8proc::utf8proc)
|
|
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 "src/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(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
|
+
|
|
280
|
+
set(prefix "${CMAKE_INSTALL_PREFIX}")
|
|
281
|
+
set(exec_prefix "\${prefix}")
|
|
282
|
+
set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
|
|
283
|
+
set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
|
|
284
|
+
set(PACKAGE_VERSION "${LIBTCOD_VERSION_FULL}")
|
|
285
|
+
configure_file(
|
|
286
|
+
${CMAKE_CURRENT_SOURCE_DIR}/buildsys/autotools/libtcod.pc.in
|
|
287
|
+
${CMAKE_CURRENT_BINARY_DIR}/libtcod.pc
|
|
288
|
+
@ONLY
|
|
289
|
+
NEWLINE_STYLE UNIX
|
|
290
|
+
)
|
|
291
|
+
install(
|
|
292
|
+
FILES ${CMAKE_CURRENT_BINARY_DIR}/libtcod.pc
|
|
293
|
+
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
|
|
294
|
+
)
|
|
295
|
+
endif()
|
|
296
|
+
endif()
|
|
297
|
+
|
|
298
|
+
if(LIBTCOD_SAMPLES)
|
|
299
|
+
add_subdirectory(samples)
|
|
300
|
+
endif()
|
|
301
|
+
if(LIBTCOD_TESTS)
|
|
302
|
+
add_subdirectory(tests)
|
|
303
|
+
list(APPEND VCPKG_MANIFEST_FEATURES "tests")
|
|
304
|
+
endif()
|
|
305
|
+
|
|
306
|
+
if(LIBTCOD_CPACK)
|
|
307
|
+
if (WIN32)
|
|
308
|
+
set(CPACK_GENERATOR "ZIP")
|
|
309
|
+
else()
|
|
310
|
+
set(CPACK_GENERATOR "TGZ")
|
|
311
|
+
endif()
|
|
312
|
+
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt")
|
|
313
|
+
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
|
|
314
|
+
include(CPack)
|
|
315
|
+
endif()
|
|
@@ -35,7 +35,8 @@ include(FetchContent)
|
|
|
35
35
|
FetchContent_Declare(
|
|
36
36
|
libtcod
|
|
37
37
|
GIT_REPOSITORY https://github.com/libtcod/libtcod
|
|
38
|
-
|
|
38
|
+
GIT_SUBMODULES ""
|
|
39
|
+
GIT_TAG main # Replace with desired version-tag or git-reference
|
|
39
40
|
)
|
|
40
41
|
FetchContent_MakeAvailable(libtcod)
|
|
41
42
|
```
|