tcod 21.2.3__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.3 → tcod-21.2.4}/CHANGELOG.md +10 -0
- {tcod-21.2.3 → tcod-21.2.4}/PKG-INFO +1 -1
- {tcod-21.2.3 → tcod-21.2.4}/build_libtcod.py +1 -1
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/CHANGELOG.md +31 -18
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/CMakeLists.txt +14 -5
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/console.c +17 -12
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/console.h +7 -7
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/console_rexpaint.c +54 -38
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/console_rexpaint.h +1 -1
- {tcod-21.2.3 → 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.3 → tcod-21.2.4}/libtcod/src/libtcod/version.h +2 -2
- {tcod-21.2.3 → tcod-21.2.4}/tcod/_libtcod.pyi +47 -47
- {tcod-21.2.3 → tcod-21.2.4}/tcod/version.py +3 -3
- {tcod-21.2.3 → tcod-21.2.4}/tcod.egg-info/PKG-INFO +1 -1
- tcod-21.2.4/tcod.egg-info/scm_version.json +8 -0
- tcod-21.2.3/libtcod/src/libtcod/list.h +0 -103
- tcod-21.2.3/libtcod/src/libtcod/list_c.c +0 -299
- tcod-21.2.3/tcod.egg-info/scm_version.json +0 -8
- {tcod-21.2.3 → tcod-21.2.4}/CONTRIBUTING.md +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/LICENSE.txt +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/MANIFEST.in +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/README.rst +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/build_sdl.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/CONTRIBUTING.md +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/LIBTCOD-CREDITS.txt +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/LICENSE.txt +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/README.md +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/bresenham.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/bresenham_c.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/bsp.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/bsp_c.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/color.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/color.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/config.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/console_drawing.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/console_drawing.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/console_etc.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/console_etc.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/console_init.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/console_init.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/console_printing.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/console_printing.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/console_types.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/context.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/context.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/context_init.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/context_init.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/context_viewport.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/context_viewport.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/error.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/error.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/fov.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/fov_c.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/fov_circular_raycasting.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/fov_diamond_raycasting.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/fov_permissive2.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/fov_recursive_shadowcasting.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/fov_restrictive.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/fov_symmetric_shadowcast.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/fov_types.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/globals.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/globals.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/heapq.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/heapq.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/heightmap.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/heightmap_c.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/image.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/image_c.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/lex.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/lex_c.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/libtcod.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/logging.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/logging.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/mersenne.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/mersenne_c.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/mersenne_types.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/mouse.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/mouse_types.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/namegen.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/namegen_c.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/noise.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/noise_c.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/noise_defaults.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/parser.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/parser_c.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/path.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/path_c.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/pathfinder.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/pathfinder.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/pathfinder_frontier.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/pathfinder_frontier.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/portability.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/random.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/random.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/renderer_sdl2.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/renderer_sdl2.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/renderer_xterm.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/renderer_xterm.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/sdl2/console_grid.glslf +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/sdl2/console_grid.glslv +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/sdl2/event.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/sys.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/sys_c.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/sys_sdl_c.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/sys_sdl_img_bmp.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/sys_sdl_img_png.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/tileset.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/tileset.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/tileset_bdf.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/tileset_bdf.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/tileset_fallback.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/tileset_fallback.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/tileset_render.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/tileset_render.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/tileset_truetype.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/tileset_truetype.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/timer.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/tree.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/tree_c.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/txtfield.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/txtfield_c.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/utility.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/wrappers.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/wrappers.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/zip.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod/zip_c.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/libtcod_c.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/lodepng.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/lodepng.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/stb.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/stb_truetype.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/utf8proc/bench/bench.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/utf8proc/bench/icu.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/utf8proc/bench/unistring.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/utf8proc/bench/util.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/utf8proc/bench/util.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/utf8proc/test/app/app.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/utf8proc/test/case.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/utf8proc/test/charwidth.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/utf8proc/test/custom.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/utf8proc/test/fuzz_main.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/utf8proc/test/fuzzer.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/utf8proc/test/graphemetest.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/utf8proc/test/iscase.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/utf8proc/test/iterate.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/utf8proc/test/maxdecomposition.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/utf8proc/test/misc.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/utf8proc/test/normtest.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/utf8proc/test/printproperty.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/utf8proc/test/tests.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/utf8proc/test/tests.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/utf8proc/test/valid.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/utf8proc/utf8proc.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/utf8proc/utf8proc.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/utf8proc/utf8proc_data.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/adler32.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/compress.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/blast/blast-test.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/blast/blast.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/blast/blast.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/crc32vx/crc32_vx.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/crc32vx/crc32_vx_hooks.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/infback9/infback9.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/infback9/infback9.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/infback9/inffix9.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/infback9/inflate9.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/infback9/inftree9.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/infback9/inftree9.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/iostream/zfstream.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/iostream2/zstream.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/iostream3/zfstream.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/minizip/crypt.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/minizip/ints.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/minizip/ioapi.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/minizip/ioapi.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/minizip/iowin32.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/minizip/iowin32.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/minizip/miniunz.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/minizip/minizip.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/minizip/mztools.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/minizip/mztools.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/minizip/skipset.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/minizip/unzip.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/minizip/unzip.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/minizip/zip.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/minizip/zip.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/puff/bin-writer.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/puff/puff.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/puff/puff.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/puff/pufftest.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/contrib/testzlib/testzlib.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/crc32.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/crc32.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/deflate.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/deflate.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/examples/enough.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/examples/fitblk.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/examples/gun.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/examples/gzappend.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/examples/gzjoin.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/examples/gzlog.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/examples/gzlog.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/examples/gznorm.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/examples/zpipe.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/examples/zran.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/examples/zran.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/gzclose.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/gzguts.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/gzlib.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/gzread.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/gzwrite.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/infback.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/inffast.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/inffast.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/inffixed.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/inflate.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/inflate.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/inftrees.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/inftrees.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/test/example.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/test/infcover.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/test/minigzip.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/trees.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/trees.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/uncompr.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/zconf.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/zlib.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/zutil.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcod/src/vendor/zlib/zutil.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/libtcodpy.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/pyproject.toml +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/requirements.txt +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/setup.cfg +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/setup.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/__init__.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/__pyinstaller/__init__.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/__pyinstaller/hook-tcod.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/_internal.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/bsp.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/cdef.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/cffi.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/cffi.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/color.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/console.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/constants.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/context.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/event.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/event_constants.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/image.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/libtcodpy.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/los.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/map.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/noise.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/noise.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/noise.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/path.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/path.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/path.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/py.typed +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/random.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/random.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/render.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/sdl/__init__.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/sdl/_internal.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/sdl/audio.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/sdl/constants.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/sdl/joystick.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/sdl/mouse.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/sdl/render.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/sdl/sys.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/sdl/video.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/tcod.c +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/tcod.h +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/tcod.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod/tileset.py +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod.egg-info/SOURCES.txt +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod.egg-info/dependency_links.txt +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod.egg-info/entry_points.txt +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod.egg-info/requires.txt +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod.egg-info/scm_file_list.json +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tcod.egg-info/top_level.txt +0 -0
- {tcod-21.2.3 → tcod-21.2.4}/tox.ini +0 -0
|
@@ -6,6 +6,16 @@ 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
|
+
|
|
9
19
|
## [21.2.3] - 2026-11-09
|
|
10
20
|
|
|
11
21
|
### Changed
|
|
@@ -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", "/
|
|
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"],
|
|
@@ -9,9 +9,25 @@ 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
|
+
|
|
12
28
|
## [2.3.0] - 2026-11-09
|
|
13
29
|
### Added
|
|
14
|
-
- Added `TCOD_heightmap_kernel_transform_out` for convolution with separate source and destination heightmaps.
|
|
30
|
+
- Added `TCOD_heightmap_kernel_transform_out` for convolution with separate source and destination heightmaps. https://github.com/libtcod/libtcod/pull/175
|
|
15
31
|
- Added `TCOD_heightmap_is_valid` and `TCOD_heightmap_in_bounds`.
|
|
16
32
|
|
|
17
33
|
### Changed
|
|
@@ -22,22 +38,20 @@ Versions since `2.0.0` only track API breaks and no longer guarantee ABI compati
|
|
|
22
38
|
- Fixed installed or distributed packages not including headers at the correct prefixes.
|
|
23
39
|
|
|
24
40
|
### 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
|
-
|
|
37
|
-
- Fixed `TCOD_heightmap_kernel_transform` reading modified values during in-place convolution.
|
|
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
|
|
38
53
|
- `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)
|
|
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
|
|
41
55
|
- Basic math functions from `libm` were not linked in C.
|
|
42
56
|
- Voronoi terrain generation now includes distant sites for extra large maps.
|
|
43
57
|
- Internally used `popen`, `pclose` were undeclared due to missing feature test macros on Linux
|
|
@@ -47,8 +61,7 @@ Versions since `2.0.0` only track API breaks and no longer guarantee ABI compati
|
|
|
47
61
|
|
|
48
62
|
## [2.2.2] - 2026-01-06
|
|
49
63
|
### CMake
|
|
50
|
-
- Now fully supports `FetchPackage` for dependency resolution.
|
|
51
|
-
[#141](https://github.com/libtcod/libtcod/issues/141)
|
|
64
|
+
- Now fully supports `FetchPackage` for dependency resolution. https://github.com/libtcod/libtcod/issues/141
|
|
52
65
|
- No longer sets output directories.
|
|
53
66
|
- Now only configures Vcpkg or CPack when `LIBTCOD_VCPKG` or `LIBTCOD_CPACK` is enabled.
|
|
54
67
|
- `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
|
-
|
|
155
|
-
|
|
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,6 +268,15 @@ 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}")
|
|
@@ -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
|
|
74
|
-
if (
|
|
75
|
-
TCOD_set_errorvf("Width and height can not be negative: got %i,%i",
|
|
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
|
-
|
|
79
|
-
|
|
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
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
TCOD_console_init_(
|
|
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
|
-
|
|
90
|
-
|
|
94
|
+
new_console->alignment = TCOD_ctx.root->alignment;
|
|
95
|
+
new_console->bkgnd_flag = TCOD_ctx.root->bkgnd_flag;
|
|
91
96
|
}
|
|
92
|
-
return
|
|
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
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
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
|
|
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
|
*/
|
|
@@ -48,26 +48,35 @@
|
|
|
48
48
|
#define SDL_Swap32LE(x) (x)
|
|
49
49
|
#endif // NO_SDL
|
|
50
50
|
|
|
51
|
+
// REXPaint Specification:
|
|
52
|
+
// https://steveasleep.com/rexpaint_manual.html#appendix-b:-.xp-format-specification-(and-import-libraries)
|
|
53
|
+
|
|
51
54
|
#pragma pack(push, 1)
|
|
52
|
-
|
|
55
|
+
/// @brief REXPaint header struct, always at the beginning of the gzip stream.
|
|
53
56
|
typedef struct RexPaintHeader {
|
|
54
|
-
int32_t version;
|
|
55
|
-
int32_t layer_count;
|
|
57
|
+
int32_t version; // Typically ``-1`` is expected here.
|
|
58
|
+
int32_t layer_count; // Official specification is 1 to 9 layer but more can be handled
|
|
56
59
|
} RexPaintHeader;
|
|
57
|
-
|
|
60
|
+
/// @brief The struct header at the start of each REXPaint layer.
|
|
58
61
|
typedef struct RexPaintLayerChunk {
|
|
59
62
|
int32_t width;
|
|
60
63
|
int32_t height;
|
|
61
64
|
} RexPaintLayerChunk;
|
|
62
|
-
|
|
65
|
+
/// @brief The layout of REXPaint's tile data.
|
|
63
66
|
typedef struct RexPaintTile {
|
|
64
|
-
int32_t ch;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
+
int32_t ch; // REXPaint uses EASCII but libtcod will typically use UCS-4. Any decoding happens later.
|
|
68
|
+
TCOD_ColorRGB fg;
|
|
69
|
+
TCOD_ColorRGB bg;
|
|
67
70
|
} RexPaintTile;
|
|
68
71
|
#pragma pack(pop)
|
|
69
|
-
|
|
70
|
-
|
|
72
|
+
|
|
73
|
+
/// @brief REXPaint uses this color as its transparency key color.
|
|
74
|
+
static const TCOD_ColorRGB XP_KEY_COLOR = {255, 0, 255};
|
|
75
|
+
|
|
76
|
+
/// @brief Convert a list of consoles into a single console, deleting the list when done.
|
|
77
|
+
/// Follows REXPaint's rules for transparency.
|
|
78
|
+
/// @param console_list Will be taken and deleted by this call.
|
|
79
|
+
/// @return A new console or NULL on error.
|
|
71
80
|
static TCOD_Console* combine_console_list(TCOD_list_t console_list) {
|
|
72
81
|
TCOD_Console* main_console;
|
|
73
82
|
if (!console_list) {
|
|
@@ -78,16 +87,20 @@ static TCOD_Console* combine_console_list(TCOD_list_t console_list) {
|
|
|
78
87
|
main_console = TCOD_list_pop(console_list);
|
|
79
88
|
while (!TCOD_list_is_empty(console_list)) {
|
|
80
89
|
TCOD_Console* console = TCOD_list_pop(console_list);
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
/* This blit may fail if the consoles do not match shapes. */
|
|
90
|
+
TCOD_console_set_key_color(console, XP_KEY_COLOR); // Set key color before blit.
|
|
91
|
+
// This blit may fail if the consoles do not match shapes.
|
|
84
92
|
TCOD_console_blit(console, 0, 0, 0, 0, main_console, 0, 0, 1.0f, 1.0f);
|
|
85
93
|
TCOD_console_delete(console);
|
|
86
94
|
}
|
|
87
95
|
TCOD_list_delete(console_list);
|
|
88
96
|
return main_console;
|
|
89
97
|
}
|
|
90
|
-
|
|
98
|
+
/// @brief Convert a REXPaint tile to a Console tile and output it to a console.
|
|
99
|
+
/// @param i Index of the REXPaint tile.
|
|
100
|
+
/// @param xp_tile Raw uncompressed data of the REXPaint tile.
|
|
101
|
+
/// @param console Output console with the same width/height as the input.
|
|
102
|
+
static void xp_tile_to_console_tile(int i, const RexPaintTile* xp_tile, TCOD_Console* console) {
|
|
103
|
+
// Input is column-major, output is row-major
|
|
91
104
|
const int x = i / console->h;
|
|
92
105
|
const int y = i % console->h;
|
|
93
106
|
console->tiles[x + y * console->w] = (TCOD_ConsoleTile){
|
|
@@ -96,19 +109,21 @@ void xp_tile_to_console_tile(int i, const RexPaintTile* xp_tile, TCOD_Console* c
|
|
|
96
109
|
{xp_tile->bg.r, xp_tile->bg.g, xp_tile->bg.b, 0xff},
|
|
97
110
|
};
|
|
98
111
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
112
|
+
/// @brief Read a console from a REXPaint gzFile file.
|
|
113
|
+
/// @param gz_file Input file for reading.
|
|
114
|
+
/// @param out New console will be outputted here.
|
|
115
|
+
/// @return
|
|
116
|
+
static TCOD_Error console_from_xp_file(gzFile gz_file, TCOD_Console** out) {
|
|
103
117
|
RexPaintLayerChunk xp_layer;
|
|
104
118
|
int z_errno = gzread(gz_file, &xp_layer, sizeof(xp_layer));
|
|
105
119
|
if (z_errno < 0) {
|
|
106
120
|
return TCOD_set_errorvf("Error decoding REXPaint file: %s", gzerror(gz_file, &z_errno));
|
|
107
121
|
}
|
|
122
|
+
// Untrusted width/height input values
|
|
108
123
|
xp_layer.width = SDL_Swap32LE(xp_layer.width);
|
|
109
124
|
xp_layer.height = SDL_Swap32LE(xp_layer.height);
|
|
110
125
|
*out = TCOD_console_new(xp_layer.width, xp_layer.height);
|
|
111
|
-
if (!*out) return
|
|
126
|
+
if (!*out) return TCOD_E_ERROR;
|
|
112
127
|
const int layer_total = xp_layer.width * xp_layer.height;
|
|
113
128
|
for (int i = 0; i < layer_total; ++i) {
|
|
114
129
|
RexPaintTile xp_tile;
|
|
@@ -153,13 +168,13 @@ int TCOD_load_xp(const char* path, int n, TCOD_Console** out) {
|
|
|
153
168
|
gzclose(gz_file);
|
|
154
169
|
return xp_header.layer_count;
|
|
155
170
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
171
|
+
/// @brief Append a console to a REXPaint gzFile.
|
|
172
|
+
/// @param console Console to save, should not be NULL.
|
|
173
|
+
/// @param gz_file Output file for writing.
|
|
174
|
+
/// @return Negative values on failure.
|
|
159
175
|
static TCOD_Error console_to_xp_file(const TCOD_Console* console, gzFile gz_file) {
|
|
160
|
-
if (console
|
|
161
|
-
|
|
162
|
-
}
|
|
176
|
+
if (!console) return TCOD_set_errorv("Console was NULL.");
|
|
177
|
+
if (console->w < 0 || console->h < 0) return TCOD_set_errorv("Console data is corrupt.");
|
|
163
178
|
RexPaintLayerChunk xp_layer = {.width = SDL_Swap32LE(console->w), .height = SDL_Swap32LE(console->h)};
|
|
164
179
|
int z_err = gzwrite(gz_file, &xp_layer, sizeof(xp_layer));
|
|
165
180
|
if (z_err < 0) {
|
|
@@ -272,31 +287,30 @@ bool TCOD_console_list_save_xp(TCOD_list_t console_list, const char* filename, i
|
|
|
272
287
|
filename,
|
|
273
288
|
compress_level) == TCOD_E_OK);
|
|
274
289
|
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
static int console_from_xp_stream(z_stream* stream, TCOD_Console** out) {
|
|
290
|
+
/// @brief Load a console from a REXPaint chunk from a zlib `stream` to `out`.
|
|
291
|
+
/// @param stream Stream input.
|
|
292
|
+
/// @param out Where to output a new console.
|
|
293
|
+
/// @return Negative values on error.
|
|
294
|
+
static TCOD_Error console_from_xp_stream(z_stream* stream, TCOD_Console** out) {
|
|
281
295
|
RexPaintLayerChunk xp_layer;
|
|
282
296
|
stream->next_out = (unsigned char*)&xp_layer;
|
|
283
297
|
stream->avail_out = sizeof(xp_layer);
|
|
284
298
|
int z_err = inflate(stream, Z_SYNC_FLUSH);
|
|
285
|
-
if (z_err < 0)
|
|
286
|
-
|
|
287
|
-
|
|
299
|
+
if (z_err < 0) return TCOD_set_errorvf("Decoding error: %s", stream->msg);
|
|
300
|
+
if (stream->avail_out != 0) return TCOD_set_errorv("Unexpected end of stream.");
|
|
301
|
+
|
|
288
302
|
xp_layer.width = SDL_Swap32LE(xp_layer.width);
|
|
289
303
|
xp_layer.height = SDL_Swap32LE(xp_layer.height);
|
|
290
304
|
*out = TCOD_console_new(xp_layer.width, xp_layer.height);
|
|
291
|
-
if (!*out) return
|
|
305
|
+
if (!*out) return TCOD_E_ERROR;
|
|
292
306
|
const int layer_total = xp_layer.width * xp_layer.height;
|
|
293
307
|
for (int i = 0; i < layer_total; ++i) {
|
|
294
308
|
RexPaintTile xp_tile;
|
|
295
309
|
stream->next_out = (Bytef*)&xp_tile;
|
|
296
310
|
stream->avail_out = sizeof(xp_tile);
|
|
297
|
-
if (inflate(stream, Z_SYNC_FLUSH) < 0)
|
|
298
|
-
|
|
299
|
-
|
|
311
|
+
if (inflate(stream, Z_SYNC_FLUSH) < 0) return TCOD_set_errorvf("Decoding error: %s", stream->msg);
|
|
312
|
+
if (stream->avail_out != 0) return TCOD_set_errorv("Unexpected end of stream.");
|
|
313
|
+
|
|
300
314
|
xp_tile_to_console_tile(i, &xp_tile, *out);
|
|
301
315
|
}
|
|
302
316
|
return TCOD_E_OK;
|
|
@@ -313,6 +327,8 @@ int TCOD_load_xp_from_memory(int n_data, const unsigned char* data, int n_out, T
|
|
|
313
327
|
inflateEnd(&stream);
|
|
314
328
|
return TCOD_E_ERROR;
|
|
315
329
|
}
|
|
330
|
+
if (stream.avail_out != 0) return TCOD_set_errorv("Unexpected end of stream.");
|
|
331
|
+
|
|
316
332
|
header.version = SDL_Swap32LE(header.version);
|
|
317
333
|
header.layer_count = SDL_Swap32LE(header.layer_count);
|
|
318
334
|
if (n_out <= 0 || !out) {
|
|
@@ -142,7 +142,7 @@ TCODLIB_API int TCOD_load_xp_from_memory(int n_data, const unsigned char* data,
|
|
|
142
142
|
|
|
143
143
|
@param n_consoles The length of the input `consoles` array.
|
|
144
144
|
@param consoles An array of tcod consoles, can not be NULL.
|
|
145
|
-
@param n_out The size of the `out` buffer, if
|
|
145
|
+
@param n_out The size of the `out` buffer, if zero then an upper bound will be returned.
|
|
146
146
|
@param out A pointer to an output buffer, can be NULL.
|
|
147
147
|
@param compression_level A compression level for the zlib library.
|
|
148
148
|
@return If `out=NULL` then returns the upper bound of the buffer size needed.
|
|
@@ -199,7 +199,9 @@ int TCOD_sys_get_image_alpha(const struct SDL_Surface* image, int x, int y);
|
|
|
199
199
|
bool TCOD_sys_check_magic_number(const char* filename, size_t size, uint8_t* data);
|
|
200
200
|
|
|
201
201
|
/* TCOD_list nonpublic methods */
|
|
202
|
-
|
|
202
|
+
|
|
203
|
+
/// @brief Set the number of items in a list. The new size will be no more than `lst->allocSize`.
|
|
204
|
+
void TCOD_list_set_size(TCOD_list_t lst, int size);
|
|
203
205
|
|
|
204
206
|
typedef struct scale_data_t {
|
|
205
207
|
float force_recalc;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/* BSD 3-Clause License
|
|
2
|
+
*
|
|
3
|
+
* Copyright © 2008-2026, Jice and the libtcod contributors.
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
*
|
|
6
|
+
* Redistribution and use in source and binary forms, with or without
|
|
7
|
+
* modification, are permitted provided that the following conditions are met:
|
|
8
|
+
*
|
|
9
|
+
* 1. Redistributions of source code must retain the above copyright notice,
|
|
10
|
+
* this list of conditions and the following disclaimer.
|
|
11
|
+
*
|
|
12
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
* this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
* and/or other materials provided with the distribution.
|
|
15
|
+
*
|
|
16
|
+
* 3. Neither the name of the copyright holder nor the names of its
|
|
17
|
+
* contributors may be used to endorse or promote products derived from
|
|
18
|
+
* this software without specific prior written permission.
|
|
19
|
+
*
|
|
20
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
21
|
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
22
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
23
|
+
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
|
24
|
+
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
25
|
+
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
26
|
+
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
27
|
+
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
28
|
+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
29
|
+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
30
|
+
* POSSIBILITY OF SUCH DAMAGE.
|
|
31
|
+
*/
|
|
32
|
+
/// @file list.h
|
|
33
|
+
/// Deprecated libtcod list module.
|
|
34
|
+
#pragma once
|
|
35
|
+
#ifndef TCOD_LIST_H_
|
|
36
|
+
#define TCOD_LIST_H_
|
|
37
|
+
|
|
38
|
+
#include "portability.h"
|
|
39
|
+
|
|
40
|
+
#ifdef __cplusplus
|
|
41
|
+
extern "C" {
|
|
42
|
+
#endif
|
|
43
|
+
/// @defgroup List List objects
|
|
44
|
+
/// Deprecated libtcod lists for use when required by older functions.
|
|
45
|
+
/// @{
|
|
46
|
+
/***************************************************************************
|
|
47
|
+
@brief Libtcod's generic container, deprecated in favor of more standard tools.
|
|
48
|
+
|
|
49
|
+
@deprecated
|
|
50
|
+
This object is deprecated in favor of more standard tools.
|
|
51
|
+
In C a library such as ``stb_ds.h`` should be used where a lower level interface isn't possible.
|
|
52
|
+
*/
|
|
53
|
+
typedef struct TCOD_List {
|
|
54
|
+
/// A pointer to an array of void pointers. Internal.
|
|
55
|
+
void** array;
|
|
56
|
+
/// The current count of items in the array. Internal.
|
|
57
|
+
int fillSize;
|
|
58
|
+
/// The maximum number of items that `array` can currently hold. Internal.
|
|
59
|
+
int allocSize;
|
|
60
|
+
} TCOD_List;
|
|
61
|
+
|
|
62
|
+
typedef TCOD_List* TCOD_list_t;
|
|
63
|
+
|
|
64
|
+
/***************************************************************************
|
|
65
|
+
@brief Return a new list.
|
|
66
|
+
|
|
67
|
+
@return TCOD_List*
|
|
68
|
+
|
|
69
|
+
@code{.c}
|
|
70
|
+
TCOD_List* intList = TCOD_list_new();
|
|
71
|
+
TCOD_List* floatList = TCOD_list_new();
|
|
72
|
+
@endcode
|
|
73
|
+
*/
|
|
74
|
+
TCODLIB_API TCOD_DEPRECATED("TCOD_List is not a suitable container. Use a custom array or a C++ container instead.")
|
|
75
|
+
TCOD_List* TCOD_list_new(void);
|
|
76
|
+
|
|
77
|
+
/// @brief Return a new list which can hold up to `nb_elements` items.
|
|
78
|
+
TCODLIB_API TCOD_DEPRECATED("TCOD_List is not a suitable container. Use a custom array or a C++ container instead.")
|
|
79
|
+
TCOD_List* TCOD_list_allocate(int nb_elements);
|
|
80
|
+
|
|
81
|
+
/// @brief Return a copy of `lst`.
|
|
82
|
+
TCODLIB_API TCOD_List* TCOD_list_duplicate(TCOD_List* lst);
|
|
83
|
+
|
|
84
|
+
/// @brief Delete a list.
|
|
85
|
+
/// This only frees the list itself, if the list contains any pointers then those will need to be freed separately.
|
|
86
|
+
TCODLIB_API void TCOD_list_delete(TCOD_List* lst);
|
|
87
|
+
|
|
88
|
+
/// @brief Add `element` to the end of a list.
|
|
89
|
+
TCODLIB_API void TCOD_list_push(TCOD_List* lst, const void* element);
|
|
90
|
+
|
|
91
|
+
/// @brief Remove the last item from a list and return it. If the list is empty this will return NULL.
|
|
92
|
+
TCODLIB_API void* TCOD_list_pop(TCOD_List* lst);
|
|
93
|
+
|
|
94
|
+
/// @brief Return the list item from the list, without removing it. If the list is empty this will return NULL.
|
|
95
|
+
TCODLIB_API void* TCOD_list_peek(TCOD_List* lst);
|
|
96
|
+
|
|
97
|
+
/// @brief Add all items from `extend` to the end of `lst`.
|
|
98
|
+
TCODLIB_API void TCOD_list_add_all(TCOD_List* lst, TCOD_List* extend);
|
|
99
|
+
|
|
100
|
+
/// @brief Return the item at `index`.
|
|
101
|
+
TCODLIB_API void* TCOD_list_get(TCOD_List* lst, int index);
|
|
102
|
+
|
|
103
|
+
/// @brief Assign `element` to `lst` at `index`. The list will automatically resize to fit an item at `index`.
|
|
104
|
+
TCODLIB_API void TCOD_list_set(TCOD_List* lst, const void* element, int index);
|
|
105
|
+
|
|
106
|
+
/// @brief Return a pointer to the beginning of the list.
|
|
107
|
+
TCODLIB_API void** TCOD_list_begin(TCOD_List* lst);
|
|
108
|
+
|
|
109
|
+
/// @brief Return a pointer to the end of the list.
|
|
110
|
+
TCODLIB_API void** TCOD_list_end(TCOD_List* lst);
|
|
111
|
+
|
|
112
|
+
/// @brief Reverse the order of elements in the list.
|
|
113
|
+
TCODLIB_API void TCOD_list_reverse(TCOD_List* lst);
|
|
114
|
+
|
|
115
|
+
/// @brief Remove `iter_element` from the list and return the next iterator element.
|
|
116
|
+
TCODLIB_API void** TCOD_list_remove_iterator(TCOD_List* lst, void** iter_element);
|
|
117
|
+
|
|
118
|
+
/// @brief Remove `element` from the list.
|
|
119
|
+
TCODLIB_API void TCOD_list_remove(TCOD_List* lst, const void* element);
|
|
120
|
+
|
|
121
|
+
/// @brief Remove `iter_element` from the list and return a new iterator.
|
|
122
|
+
/// This replaces the element with the element from the end of the list instead of preserving the order of elements.
|
|
123
|
+
TCODLIB_API void** TCOD_list_remove_iterator_fast(TCOD_List* lst, void** iter_element);
|
|
124
|
+
|
|
125
|
+
/// @brief Remove an item from the list.
|
|
126
|
+
/// The removed item is replaced with an item from the end of the list instead of preserving the order of items.
|
|
127
|
+
TCODLIB_API void TCOD_list_remove_fast(TCOD_List* lst, const void* element);
|
|
128
|
+
|
|
129
|
+
/// @brief Return true if `element` is in the list.
|
|
130
|
+
TCODLIB_API bool TCOD_list_contains(TCOD_List* lst, const void* element);
|
|
131
|
+
|
|
132
|
+
/// @brief Remove all items from a list.
|
|
133
|
+
TCODLIB_API void TCOD_list_clear(TCOD_List* lst);
|
|
134
|
+
|
|
135
|
+
/// @brief Call ``free()`` on all items on the list, then remove them.
|
|
136
|
+
TCODLIB_API void TCOD_list_clear_and_delete(TCOD_List* lst);
|
|
137
|
+
|
|
138
|
+
/// @brief Return the current count of items in a list.
|
|
139
|
+
TCODLIB_API int TCOD_list_size(TCOD_List* lst);
|
|
140
|
+
|
|
141
|
+
/// @brief Insert `element` on the index before `index`.
|
|
142
|
+
TCODLIB_API void** TCOD_list_insert_before(TCOD_List* lst, const void* element, int index);
|
|
143
|
+
|
|
144
|
+
/// @brief Returns true if this list is empty.
|
|
145
|
+
TCODLIB_API bool TCOD_list_is_empty(TCOD_List* lst);
|
|
146
|
+
#ifdef __cplusplus
|
|
147
|
+
}
|
|
148
|
+
#endif
|
|
149
|
+
/// @}
|
|
150
|
+
#endif // TCOD_LIST_H_
|