tcod 19.6.1__tar.gz → 20.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tcod-19.6.1 → tcod-20.0.0}/CHANGELOG.md +26 -0
- {tcod-19.6.1 → tcod-20.0.0}/LICENSE.txt +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/PKG-INFO +3 -6
- {tcod-19.6.1 → tcod-20.0.0}/build_libtcod.py +24 -12
- {tcod-19.6.1 → tcod-20.0.0}/build_sdl.py +23 -10
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/CHANGELOG.md +15 -0
- tcod-20.0.0/libtcod/CMakeLists.txt +118 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/CONTRIBUTING.md +21 -15
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/LICENSE.txt +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/README.md +38 -41
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/bresenham.h +6 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/bresenham_c.c +4 -4
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/bsp.h +6 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/bsp_c.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/color.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/color.h +3 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/config.h +6 -3
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/console.c +5 -11
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/console.h +35 -45
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/console_drawing.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/console_drawing.h +9 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/console_etc.c +8 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/console_etc.h +29 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/console_init.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/console_init.h +5 -3
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/console_printing.c +1 -8
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/console_printing.h +40 -21
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/console_rexpaint.c +6 -6
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/console_rexpaint.h +12 -8
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/console_types.h +3 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/context.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/context.h +3 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/context_init.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/context_init.h +3 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/context_viewport.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/context_viewport.h +3 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/error.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/error.h +3 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/fov.h +10 -10
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/fov_c.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/fov_circular_raycasting.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/fov_diamond_raycasting.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/fov_permissive2.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/fov_recursive_shadowcasting.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/fov_restrictive.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/fov_symmetric_shadowcast.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/fov_types.h +7 -2
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/globals.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/globals.h +3 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/heapq.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/heapq.h +3 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/heightmap.h +3 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/heightmap_c.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/image.h +3 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/image_c.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/lex.h +3 -2
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/lex_c.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/libtcod.h +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/libtcod_int.h +1 -1
- tcod-20.0.0/libtcod/src/libtcod/list.h +103 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/list_c.c +28 -42
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/logging.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/logging.h +3 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/mersenne.h +6 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/mersenne_c.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/mersenne_types.h +7 -2
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/mouse.h +3 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/mouse_types.h +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/namegen.h +3 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/namegen_c.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/noise.h +3 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/noise_c.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/noise_defaults.h +3 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/parser.h +3 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/parser_c.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/path.h +6 -2
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/path_c.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/pathfinder.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/pathfinder.h +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/pathfinder_frontier.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/pathfinder_frontier.h +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/portability.h +3 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/random.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/random.h +3 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/renderer_sdl2.c +6 -3
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/renderer_sdl2.h +3 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/renderer_xterm.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/renderer_xterm.h +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/sdl2/event.h +3 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/sys.h +6 -4
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/sys_c.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/sys_sdl_c.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/sys_sdl_img_bmp.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/sys_sdl_img_png.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/tileset.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/tileset.h +8 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/tileset_bdf.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/tileset_bdf.h +4 -2
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/tileset_fallback.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/tileset_fallback.h +3 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/tileset_render.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/tileset_render.h +7 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/tileset_truetype.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/tileset_truetype.h +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/timer.h +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/tree.h +3 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/tree_c.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/txtfield.h +3 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/txtfield_c.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/utility.h +4 -4
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/version.h +5 -3
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/wrappers.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/wrappers.h +3 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/zip.h +3 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/zip_c.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod.h +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod_c.c +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/pyproject.toml +9 -9
- {tcod-19.6.1 → tcod-20.0.0}/setup.py +14 -6
- {tcod-19.6.1 → tcod-20.0.0}/tcod/_internal.py +1 -11
- {tcod-19.6.1 → tcod-20.0.0}/tcod/cffi.py +5 -3
- {tcod-19.6.1 → tcod-20.0.0}/tcod/color.py +2 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod/console.py +7 -2
- {tcod-19.6.1 → tcod-20.0.0}/tcod/context.py +4 -2
- {tcod-19.6.1 → tcod-20.0.0}/tcod/event.py +78 -3
- {tcod-19.6.1 → tcod-20.0.0}/tcod/image.py +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/tcod/libtcodpy.py +140 -136
- {tcod-19.6.1 → tcod-20.0.0}/tcod/map.py +15 -14
- {tcod-19.6.1 → tcod-20.0.0}/tcod/noise.py +4 -3
- {tcod-19.6.1 → tcod-20.0.0}/tcod/path.py +6 -5
- {tcod-19.6.1 → tcod-20.0.0}/tcod/sdl/_internal.py +2 -2
- {tcod-19.6.1 → tcod-20.0.0}/tcod/sdl/audio.py +5 -3
- {tcod-19.6.1 → tcod-20.0.0}/tcod/sdl/joystick.py +5 -5
- {tcod-19.6.1 → tcod-20.0.0}/tcod/sdl/mouse.py +7 -4
- {tcod-19.6.1 → tcod-20.0.0}/tcod/sdl/render.py +38 -10
- {tcod-19.6.1 → tcod-20.0.0}/tcod/sdl/sys.py +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/tcod/sdl/video.py +2 -2
- {tcod-19.6.1 → tcod-20.0.0}/tcod/tileset.py +1 -1
- {tcod-19.6.1 → tcod-20.0.0}/tcod/version.py +3 -3
- {tcod-19.6.1 → tcod-20.0.0}/tcod.egg-info/PKG-INFO +3 -6
- tcod-19.6.1/libtcod/CMakeLists.txt +0 -63
- tcod-19.6.1/libtcod/src/libtcod/list.h +0 -75
- {tcod-19.6.1 → tcod-20.0.0}/CONTRIBUTING.md +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/MANIFEST.in +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/README.rst +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/LIBTCOD-CREDITS.txt +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/sdl2/console_grid.glslf +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/libtcod/sdl2/console_grid.glslv +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/khrplatform.h +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/lodepng.c +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/lodepng.h +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/stb.c +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/stb_ds.h +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/stb_truetype.h +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/utf8proc/utf8proc.c +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/utf8proc/utf8proc.h +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/utf8proc/utf8proc_data.c +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/zlib/adler32.c +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/zlib/compress.c +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/zlib/crc32.c +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/zlib/crc32.h +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/zlib/deflate.c +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/zlib/deflate.h +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/zlib/gzclose.c +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/zlib/gzguts.h +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/zlib/gzlib.c +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/zlib/gzread.c +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/zlib/gzwrite.c +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/zlib/infback.c +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/zlib/inffast.c +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/zlib/inffast.h +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/zlib/inffixed.h +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/zlib/inflate.c +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/zlib/inflate.h +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/zlib/inftrees.c +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/zlib/inftrees.h +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/zlib/trees.c +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/zlib/trees.h +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/zlib/uncompr.c +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/zlib/zconf.h +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/zlib/zlib.h +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/zlib/zutil.c +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcod/src/vendor/zlib/zutil.h +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/libtcodpy.py +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/requirements.txt +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/setup.cfg +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod/__init__.py +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod/__pyinstaller/__init__.py +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod/__pyinstaller/hook-tcod.py +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod/_libtcod.pyi +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod/bsp.py +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod/cdef.h +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod/cffi.h +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod/constants.py +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod/event_constants.py +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod/los.py +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod/noise.c +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod/noise.h +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod/path.c +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod/path.h +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod/py.typed +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod/random.h +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod/random.py +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod/render.py +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod/sdl/__init__.py +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod/sdl/constants.py +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod/tcod.c +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod/tcod.h +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod/tcod.py +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod.egg-info/SOURCES.txt +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod.egg-info/dependency_links.txt +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod.egg-info/entry_points.txt +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod.egg-info/requires.txt +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tcod.egg-info/top_level.txt +0 -0
- {tcod-19.6.1 → tcod-20.0.0}/tox.ini +0 -0
|
@@ -6,6 +6,32 @@ This project adheres to [Semantic Versioning](https://semver.org/) since version
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [20.0.0] - 2026-02-06
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Now supports free-threaded Python, deploys with `cp314t` wheels.
|
|
14
|
+
- Added methods: `Renderer.coordinates_from_window` and `Renderer.coordinates_to_window`
|
|
15
|
+
- Added `tcod.event.convert_coordinates_from_window`.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- `Renderer.logical_size` now returns `None` instead of `(0, 0)` when logical size is unset.
|
|
20
|
+
|
|
21
|
+
## [19.6.3] - 2026-01-12
|
|
22
|
+
|
|
23
|
+
Fix missing deployment
|
|
24
|
+
|
|
25
|
+
## [19.6.2] - 2026-01-12
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
|
|
29
|
+
- Update to libtcod 2.2.2
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
- Mouse coordinate to tile conversions now support SDL renderer logical size and scaling.
|
|
34
|
+
|
|
9
35
|
## [19.6.1] - 2025-12-15
|
|
10
36
|
|
|
11
37
|
### Fixed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tcod
|
|
3
|
-
Version:
|
|
3
|
+
Version: 20.0.0
|
|
4
4
|
Summary: The official Python port of libtcod.
|
|
5
5
|
Author-email: Kyle Benesch <4b796c65+tcod@gmail.com>
|
|
6
6
|
License-Expression: BSD-2-Clause
|
|
@@ -10,7 +10,7 @@ Project-URL: Changelog, https://github.com/libtcod/python-tcod/blob/main/CHANGEL
|
|
|
10
10
|
Project-URL: Source, https://github.com/libtcod/python-tcod
|
|
11
11
|
Project-URL: Tracker, https://github.com/libtcod/python-tcod/issues
|
|
12
12
|
Project-URL: Forum, https://github.com/libtcod/python-tcod/discussions
|
|
13
|
-
Keywords: roguelike,
|
|
13
|
+
Keywords: roguelike,roguelikedev,gamedev,Unicode,libtcod,libtcodpy,field-of-view,pathfinding
|
|
14
14
|
Platform: Windows
|
|
15
15
|
Platform: MacOS
|
|
16
16
|
Platform: Linux
|
|
@@ -24,10 +24,7 @@ Classifier: Operating System :: POSIX
|
|
|
24
24
|
Classifier: Operating System :: MacOS :: MacOS X
|
|
25
25
|
Classifier: Operating System :: Microsoft :: Windows
|
|
26
26
|
Classifier: Programming Language :: Python :: 3
|
|
27
|
-
Classifier: Programming Language :: Python ::
|
|
28
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
29
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
30
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
27
|
+
Classifier: Programming Language :: Python :: Free Threading :: 2 - Beta
|
|
31
28
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
32
29
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
33
30
|
Classifier: Topic :: Games/Entertainment
|
|
@@ -11,9 +11,8 @@ import platform
|
|
|
11
11
|
import re
|
|
12
12
|
import subprocess
|
|
13
13
|
import sys
|
|
14
|
-
from collections.abc import Iterable, Iterator
|
|
15
14
|
from pathlib import Path
|
|
16
|
-
from typing import Any, ClassVar
|
|
15
|
+
from typing import TYPE_CHECKING, Any, ClassVar, Final
|
|
17
16
|
|
|
18
17
|
import attrs
|
|
19
18
|
import pycparser # type: ignore[import-untyped]
|
|
@@ -27,7 +26,10 @@ sys.path.append(str(Path(__file__).parent)) # Allow importing local modules.
|
|
|
27
26
|
|
|
28
27
|
import build_sdl
|
|
29
28
|
|
|
30
|
-
|
|
29
|
+
if TYPE_CHECKING:
|
|
30
|
+
from collections.abc import Iterable, Iterator
|
|
31
|
+
|
|
32
|
+
Py_LIMITED_API: None | int = 0x03100000
|
|
31
33
|
|
|
32
34
|
HEADER_PARSE_PATHS = ("tcod/", "libtcod/src/libtcod/")
|
|
33
35
|
HEADER_PARSE_EXCLUDES = ("gl2_ext_.h", "renderer_gl_internal.h", "event.h")
|
|
@@ -165,9 +167,14 @@ libraries: list[str] = [*build_sdl.libraries]
|
|
|
165
167
|
library_dirs: list[str] = [*build_sdl.library_dirs]
|
|
166
168
|
define_macros: list[tuple[str, Any]] = []
|
|
167
169
|
|
|
168
|
-
if "
|
|
170
|
+
if "free-threading build" in sys.version:
|
|
171
|
+
Py_LIMITED_API = None
|
|
172
|
+
if "PYODIDE" in os.environ:
|
|
169
173
|
# Unable to apply Py_LIMITED_API to Pyodide in cffi<=1.17.1
|
|
170
174
|
# https://github.com/python-cffi/cffi/issues/179
|
|
175
|
+
Py_LIMITED_API = None
|
|
176
|
+
|
|
177
|
+
if Py_LIMITED_API:
|
|
171
178
|
define_macros.append(("Py_LIMITED_API", Py_LIMITED_API))
|
|
172
179
|
|
|
173
180
|
sources += walk_sources("tcod/")
|
|
@@ -269,7 +276,7 @@ def find_sdl_attrs(prefix: str) -> Iterator[tuple[str, int | str | Any]]:
|
|
|
269
276
|
|
|
270
277
|
`prefix` is used to filter out which names to copy.
|
|
271
278
|
"""
|
|
272
|
-
from tcod._libtcod import lib
|
|
279
|
+
from tcod._libtcod import lib # noqa: PLC0415
|
|
273
280
|
|
|
274
281
|
if prefix.startswith("SDL_"):
|
|
275
282
|
name_starts_at = 4
|
|
@@ -320,12 +327,14 @@ EXCLUDE_CONSTANT_PREFIXES = [
|
|
|
320
327
|
]
|
|
321
328
|
|
|
322
329
|
|
|
330
|
+
RE_CONSTANTS_ALL: Final = re.compile(
|
|
331
|
+
r"(.*# --- From constants.py ---).*(# --- End constants.py ---.*)",
|
|
332
|
+
re.DOTALL,
|
|
333
|
+
)
|
|
334
|
+
|
|
335
|
+
|
|
323
336
|
def update_module_all(filename: Path, new_all: str) -> None:
|
|
324
337
|
"""Update the __all__ of a file with the constants from new_all."""
|
|
325
|
-
RE_CONSTANTS_ALL = re.compile(
|
|
326
|
-
r"(.*# --- From constants.py ---).*(# --- End constants.py ---.*)",
|
|
327
|
-
re.DOTALL,
|
|
328
|
-
)
|
|
329
338
|
match = RE_CONSTANTS_ALL.match(filename.read_text(encoding="utf-8"))
|
|
330
339
|
assert match, f"Can't determine __all__ subsection in {filename}!"
|
|
331
340
|
header, footer = match.groups()
|
|
@@ -346,8 +355,8 @@ def generate_enums(prefix: str) -> Iterator[str]:
|
|
|
346
355
|
|
|
347
356
|
def write_library_constants() -> None:
|
|
348
357
|
"""Write libtcod constants into the tcod.constants module."""
|
|
349
|
-
import tcod.color
|
|
350
|
-
from tcod._libtcod import ffi, lib
|
|
358
|
+
import tcod.color # noqa: PLC0415
|
|
359
|
+
from tcod._libtcod import ffi, lib # noqa: PLC0415
|
|
351
360
|
|
|
352
361
|
with Path("tcod/constants.py").open("w", encoding="utf-8") as f:
|
|
353
362
|
all_names = []
|
|
@@ -441,6 +450,8 @@ def _fix_reserved_name(name: str) -> str:
|
|
|
441
450
|
|
|
442
451
|
@attrs.define(frozen=True)
|
|
443
452
|
class ConvertedParam:
|
|
453
|
+
"""Converted type parameter from C types into Python type-hints."""
|
|
454
|
+
|
|
444
455
|
name: str = attrs.field(converter=_fix_reserved_name)
|
|
445
456
|
hint: str
|
|
446
457
|
original: str
|
|
@@ -460,7 +471,8 @@ def _type_from_names(names: list[str]) -> str:
|
|
|
460
471
|
return "Any"
|
|
461
472
|
|
|
462
473
|
|
|
463
|
-
def _param_as_hint(node: pycparser.c_ast.Node, default_name: str) -> ConvertedParam:
|
|
474
|
+
def _param_as_hint(node: pycparser.c_ast.Node, default_name: str) -> ConvertedParam: # noqa: PLR0911
|
|
475
|
+
"""Return a Python type-hint from a C AST node."""
|
|
464
476
|
original = pycparser.c_generator.CGenerator().visit(node)
|
|
465
477
|
name: str
|
|
466
478
|
names: list[str]
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
6
|
+
import functools
|
|
6
7
|
import io
|
|
7
8
|
import logging
|
|
8
9
|
import os
|
|
9
|
-
import platform
|
|
10
10
|
import re
|
|
11
11
|
import shutil
|
|
12
12
|
import subprocess
|
|
@@ -28,7 +28,20 @@ import requests
|
|
|
28
28
|
logger = logging.getLogger(__name__)
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
RE_MACHINE = re.compile(r".*\((.+)\)\]", re.DOTALL)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
@functools.cache
|
|
35
|
+
def python_machine() -> str:
|
|
36
|
+
"""Return the Python machine architecture (e.g. 'i386', 'AMD64', 'ARM64')."""
|
|
37
|
+
# Only needs to function correctly for Windows platforms.
|
|
38
|
+
match = RE_MACHINE.match(sys.version)
|
|
39
|
+
assert match, repr(sys.version)
|
|
40
|
+
(machine,) = match.groups()
|
|
41
|
+
machine = {"Intel": "i386"}.get(machine, machine)
|
|
42
|
+
logger.info(f"python_machine: {machine}")
|
|
43
|
+
return machine
|
|
44
|
+
|
|
32
45
|
|
|
33
46
|
# Reject versions of SDL older than this, update the requirements in the readme if you change this.
|
|
34
47
|
SDL_MIN_VERSION = (3, 2, 0)
|
|
@@ -139,8 +152,8 @@ def check_sdl_version() -> None:
|
|
|
139
152
|
sdl_version_str = subprocess.check_output(["sdl3-config", "--version"], universal_newlines=True).strip()
|
|
140
153
|
except FileNotFoundError as exc:
|
|
141
154
|
msg = (
|
|
142
|
-
f"libsdl3-dev or equivalent must be installed on your system and must be at least version {needed_version}
|
|
143
|
-
"
|
|
155
|
+
f"libsdl3-dev or equivalent must be installed on your system and must be at least version {needed_version}.\n"
|
|
156
|
+
"sdl3-config must be on PATH."
|
|
144
157
|
)
|
|
145
158
|
raise RuntimeError(msg) from exc
|
|
146
159
|
except subprocess.CalledProcessError as exc:
|
|
@@ -223,8 +236,8 @@ class SDLParser(pcpp.Preprocessor): # type: ignore[misc]
|
|
|
223
236
|
assert "SDL3/SDL" not in includepath, (includepath, curdir)
|
|
224
237
|
raise pcpp.OutputDirective(pcpp.Action.IgnoreAndRemove)
|
|
225
238
|
|
|
226
|
-
def _should_track_define(self, tokens: list[Any]) -> bool:
|
|
227
|
-
if len(tokens) < 3:
|
|
239
|
+
def _should_track_define(self, tokens: list[Any]) -> bool: # noqa: PLR0911
|
|
240
|
+
if len(tokens) < 3: # noqa: PLR2004
|
|
228
241
|
return False
|
|
229
242
|
if tokens[0].value in IGNORE_DEFINES:
|
|
230
243
|
return False
|
|
@@ -236,7 +249,7 @@ class SDLParser(pcpp.Preprocessor): # type: ignore[misc]
|
|
|
236
249
|
return False # Likely calls a private function.
|
|
237
250
|
if tokens[1].type == "CPP_LPAREN":
|
|
238
251
|
return False # Function-like macro.
|
|
239
|
-
if len(tokens) >= 4 and tokens[2].type == "CPP_INTEGER" and tokens[3].type == "CPP_DOT":
|
|
252
|
+
if len(tokens) >= 4 and tokens[2].type == "CPP_INTEGER" and tokens[3].type == "CPP_DOT": # noqa: PLR2004
|
|
240
253
|
return False # Value is a floating point number.
|
|
241
254
|
if tokens[0].value.startswith("SDL_PR") and (tokens[0].value.endswith("32") or tokens[0].value.endswith("64")):
|
|
242
255
|
return False # Data type for printing, which is not needed.
|
|
@@ -386,10 +399,10 @@ else:
|
|
|
386
399
|
# Bundle the Windows SDL DLL.
|
|
387
400
|
if sys.platform == "win32" and SDL_BUNDLE_PATH is not None:
|
|
388
401
|
include_dirs.append(str(SDL_INCLUDE))
|
|
389
|
-
ARCH_MAPPING = {"
|
|
390
|
-
SDL_LIB_DIR = Path(SDL_BUNDLE_PATH, "lib/", ARCH_MAPPING[
|
|
402
|
+
ARCH_MAPPING = {"i386": "x86", "AMD64": "x64", "ARM64": "arm64"}
|
|
403
|
+
SDL_LIB_DIR = Path(SDL_BUNDLE_PATH, "lib/", ARCH_MAPPING[python_machine()])
|
|
391
404
|
library_dirs.append(str(SDL_LIB_DIR))
|
|
392
|
-
SDL_LIB_DEST = Path("tcod", ARCH_MAPPING[
|
|
405
|
+
SDL_LIB_DEST = Path("tcod", ARCH_MAPPING[python_machine()])
|
|
393
406
|
SDL_LIB_DEST.mkdir(exist_ok=True)
|
|
394
407
|
SDL_LIB_DEST_FILE = SDL_LIB_DEST / "SDL3.dll"
|
|
395
408
|
SDL_LIB_FILE = SDL_LIB_DIR / "SDL3.dll"
|
|
@@ -9,6 +9,21 @@ Versions since `2.0.0` only track API breaks and no longer guarantee ABI compati
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [2.2.2] - 2026-01-06
|
|
13
|
+
### CMake
|
|
14
|
+
- Now fully supports `FetchPackage` for dependency resolution.
|
|
15
|
+
[#141](https://github.com/libtcod/libtcod/issues/141)
|
|
16
|
+
- No longer sets output directories.
|
|
17
|
+
- Now only configures Vcpkg or CPack when `LIBTCOD_VCPKG` or `LIBTCOD_CPACK` is enabled.
|
|
18
|
+
- `LIBTCOD_UTF8PROC` now defaults to `ON` instead of `vcpkg`.
|
|
19
|
+
- Library dependency options now use `ON`/`OFF` values instead of `find_package`/`disable`.
|
|
20
|
+
- `CMAKE_DISABLE_FIND_PACKAGE_X` no longer disables dependencies automatically.
|
|
21
|
+
- Added `LIBTCOD_DOCS` to build and install HTML documentation.
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
- Mouse coordinate to tile conversions now support SDL renderer logical size and scaling.
|
|
25
|
+
- Fixed out-of-bounds memory access in `TCODList::reverse` and `TCODList` copy methods.
|
|
26
|
+
|
|
12
27
|
## [2.2.1] - 2025-09-05
|
|
13
28
|
### Fixed
|
|
14
29
|
- Fixed compile errors on Android platforms.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.24...4.2)
|
|
2
|
+
include(FetchContent)
|
|
3
|
+
|
|
4
|
+
option(LIBTCOD_VCPKG "Enable Vcpkg toolchain by default." OFF)
|
|
5
|
+
option(LIBTCOD_SAMPLES "Build sources from the samples directory." OFF)
|
|
6
|
+
option(LIBTCOD_TESTS "Build unit tests." OFF)
|
|
7
|
+
option(LIBTCOD_INSTALL "Enable install targets." ON)
|
|
8
|
+
option(LIBTCOD_CPACK "Enable CPack for libtcod." OFF)
|
|
9
|
+
option(LIBTCOD_DOCS "Build documentation using Doxygen for installation." OFF)
|
|
10
|
+
|
|
11
|
+
option(LIBTCOD_THREADS "If true then deprecated thread functions are enabled by libtcod." ON)
|
|
12
|
+
option(LIBTCOD_SDL3 "Enable or disable this library dependency." ON)
|
|
13
|
+
option(LIBTCOD_ZLIB "Enable or disable this library dependency." ON)
|
|
14
|
+
set(LIBTCOD_LODEPNG "ON" CACHE STRING "How this library will be linked.")
|
|
15
|
+
set(LIBTCOD_UTF8PROC "ON" CACHE STRING "How this library will be linked.")
|
|
16
|
+
set(LIBTCOD_STB "ON" CACHE STRING "How this library will be linked.")
|
|
17
|
+
|
|
18
|
+
FetchContent_Declare(
|
|
19
|
+
SDL3
|
|
20
|
+
GIT_REPOSITORY https://github.com/libsdl-org/SDL
|
|
21
|
+
GIT_TAG f5e5f6588921eed3d7d048ce43d9eb1ff0da0ffc # release-3.2.30
|
|
22
|
+
GIT_SHALLOW TRUE
|
|
23
|
+
FIND_PACKAGE_ARGS CONFIG
|
|
24
|
+
)
|
|
25
|
+
set(SDL_INSTALL ${LIBTCOD_INSTALL} CACHE BOOL "")
|
|
26
|
+
set(SDL_INSTALL_CPACK OFF CACHE BOOL "")
|
|
27
|
+
set(SDL_INSTALL_DOCS OFF CACHE BOOL "")
|
|
28
|
+
|
|
29
|
+
FetchContent_Declare(
|
|
30
|
+
zlib
|
|
31
|
+
GIT_REPOSITORY https://github.com/madler/zlib
|
|
32
|
+
GIT_TAG 570720b0c24f9686c33f35a1b3165c1f568b96be # v1.3.1.2
|
|
33
|
+
GIT_SHALLOW TRUE
|
|
34
|
+
FIND_PACKAGE_ARGS
|
|
35
|
+
)
|
|
36
|
+
set(ZLIB_BUILD_TESTING OFF CACHE BOOL "")
|
|
37
|
+
set(ZLIB_INSTALL ${LIBTCOD_INSTALL} CACHE BOOL "")
|
|
38
|
+
|
|
39
|
+
FetchContent_Declare(
|
|
40
|
+
lodepng-c
|
|
41
|
+
GIT_REPOSITORY https://github.com/lvandeve/lodepng
|
|
42
|
+
GIT_TAG d41d4aa8c63dea277e25c94ad85046b6c5335ccc
|
|
43
|
+
PATCH_COMMAND git apply ${CMAKE_CURRENT_SOURCE_DIR}/cmake/lodepng-c.patch
|
|
44
|
+
FIND_PACKAGE_ARGS CONFIG
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
FetchContent_Declare(
|
|
48
|
+
utf8proc
|
|
49
|
+
GIT_REPOSITORY https://github.com/JuliaStrings/utf8proc
|
|
50
|
+
GIT_TAG e5e799221b45bbb90f5fdc5c69b6b8dfbf017e78 # v2.11.3
|
|
51
|
+
GIT_SHALLOW TRUE
|
|
52
|
+
PATCH_COMMAND git apply ${CMAKE_CURRENT_SOURCE_DIR}/cmake/utf8proc.patch
|
|
53
|
+
FIND_PACKAGE_ARGS
|
|
54
|
+
)
|
|
55
|
+
set(UTF8PROC_INSTALL ${LIBTCOD_INSTALL} CACHE BOOL "")
|
|
56
|
+
|
|
57
|
+
FetchContent_Declare(
|
|
58
|
+
Stb
|
|
59
|
+
GIT_REPOSITORY https://github.com/nothings/stb
|
|
60
|
+
GIT_TAG f1c79c02822848a9bed4315b12c8c8f3761e1296
|
|
61
|
+
PATCH_COMMAND git apply ${CMAKE_CURRENT_SOURCE_DIR}/cmake/stb.patch
|
|
62
|
+
FIND_PACKAGE_ARGS
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
if(LIBTCOD_VCPKG)
|
|
67
|
+
set(CMAKE_TOOLCHAIN_FILE
|
|
68
|
+
"${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake"
|
|
69
|
+
CACHE STRING "Vcpkg toolchain file")
|
|
70
|
+
endif()
|
|
71
|
+
|
|
72
|
+
file(STRINGS src/libtcod/version.h LIBTCOD_VERSION_LINE REGEX "TCOD_STRVERSION")
|
|
73
|
+
string(REGEX MATCH "TCOD_STRVERSION \"([^\"]+)\"" LIBTCOD_VERSION_LINE ${LIBTCOD_VERSION_LINE})
|
|
74
|
+
set(LIBTCOD_VERSION_FULL ${CMAKE_MATCH_1})
|
|
75
|
+
string(REGEX MATCH "([0-9]+\.[0-9]+\.[0-9]+)" LIBTCOD_VERSION ${LIBTCOD_VERSION_FULL})
|
|
76
|
+
message(STATUS "Libtcod version: ${LIBTCOD_VERSION}")
|
|
77
|
+
|
|
78
|
+
project(
|
|
79
|
+
libtcod
|
|
80
|
+
VERSION ${LIBTCOD_VERSION}
|
|
81
|
+
LANGUAGES C CXX
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake OPTIONAL RESULT_VARIABLE CONAN_FILE)
|
|
85
|
+
if(CONAN_FILE)
|
|
86
|
+
conan_basic_setup(TARGETS)
|
|
87
|
+
endif()
|
|
88
|
+
|
|
89
|
+
add_library(${PROJECT_NAME})
|
|
90
|
+
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
|
|
91
|
+
add_subdirectory(src)
|
|
92
|
+
|
|
93
|
+
set_target_properties(${PROJECT_NAME} PROPERTIES
|
|
94
|
+
C_VISIBILITY_PRESET hidden
|
|
95
|
+
CXX_VISIBILITY_PRESET hidden
|
|
96
|
+
VISIBILITY_INLINES_HIDDEN OFF
|
|
97
|
+
VERSION ${PROJECT_VERSION}
|
|
98
|
+
SOVERSION ${PROJECT_VERSION_MAJOR}
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
if(LIBTCOD_SAMPLES)
|
|
102
|
+
add_subdirectory(samples)
|
|
103
|
+
endif()
|
|
104
|
+
if(LIBTCOD_TESTS)
|
|
105
|
+
add_subdirectory(tests)
|
|
106
|
+
list(APPEND VCPKG_MANIFEST_FEATURES "tests")
|
|
107
|
+
endif()
|
|
108
|
+
|
|
109
|
+
if(LIBTCOD_CPACK)
|
|
110
|
+
if (WIN32)
|
|
111
|
+
set(CPACK_GENERATOR "ZIP")
|
|
112
|
+
else()
|
|
113
|
+
set(CPACK_GENERATOR "TGZ")
|
|
114
|
+
endif()
|
|
115
|
+
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt")
|
|
116
|
+
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
|
|
117
|
+
include(CPack)
|
|
118
|
+
endif()
|
|
@@ -82,18 +82,24 @@ Instructions are [provided here](https://github.com/libtcod/libtcod/tree/master/
|
|
|
82
82
|
|
|
83
83
|
The libtcod repository includes a CMake script for compiling libtcod and its tests and samples.
|
|
84
84
|
You can include the repository as a submodule allowing another project to build and run any version of libtcod.
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
|
99
|
-
|
|
|
85
|
+
For more info the project root `CMakeLists.txt` file contains config options near the top of the script.
|
|
86
|
+
|
|
87
|
+
When building locally the `LIBTCOD_VCPKG` flag must be set with `-D LIBTCOD_VCPKG=ON` during CMake configuration,
|
|
88
|
+
otherwise the Vcpkg toolchain must be manually set.
|
|
89
|
+
|
|
90
|
+
The method used to find dependencies can be changed by setting the following cache variables to the following:
|
|
91
|
+
- `ON` means CMake's `FetchContent_MakeAvailable` command will be used.
|
|
92
|
+
`find_package` is preferred but if the package does not exist locally then it will be automatically downloaded.
|
|
93
|
+
- `vendored` means that sources bundled in the repository will be statically compiled.
|
|
94
|
+
This is not recommended because the bundled libraries may be out-of-date.
|
|
95
|
+
- `OFF` can be used to remove a library.
|
|
96
|
+
Libtcod functions which require that library will no longer be available.
|
|
97
|
+
|
|
98
|
+
| Cache Variable | Default | Options | Notes |
|
|
99
|
+
| ---------------- | ------- | ------- | ----- |
|
|
100
|
+
| LIBTCOD_SDL3 | ON | ON, OFF | Support for libtcod contexts.
|
|
101
|
+
| LIBTCOD_ZLIB | ON | ON, OFF | Support for REXPaint and TCODZip.
|
|
102
|
+
| LIBTCOD_LODEPNG | ON | ON, OFF, vendored |
|
|
103
|
+
| LIBTCOD_UTF8PROC | ON | ON, OFF, vendored | Support for console printing functions.
|
|
104
|
+
| LIBTCOD_STB | ON | ON, OFF, vendored |
|
|
105
|
+
| LIBTCOD_THREADS | OFF | ON, OFF | Support for deprecated functions, leave this off.
|
|
@@ -1,35 +1,54 @@
|
|
|
1
|
-
#
|
|
1
|
+
# libtcod
|
|
2
2
|
|
|
3
3
|
libtcod is a free, fast, portable and uncomplicated API for roguelike developers providing a true color console, pathfinding, field-of-view, and a few other utilities frequently used in roguelikes.
|
|
4
4
|
|
|
5
|
-
## Status
|
|
6
|
-
|
|
7
5
|
[](https://github.com/libtcod/libtcod/actions)
|
|
8
6
|
[](https://libtcod.readthedocs.io/en/latest/?badge=latest)
|
|
9
7
|
[](https://codecov.io/gh/libtcod/libtcod)
|
|
10
8
|
[](https://github.com/libtcod/libtcod/blob/main/CHANGELOG.md)
|
|
11
9
|
[](https://repology.org/project/libtcod/versions)
|
|
12
10
|
|
|
13
|
-
#
|
|
11
|
+
# Getting Started
|
|
14
12
|
|
|
15
13
|
## Using Vcpkg
|
|
16
14
|
|
|
17
|
-
This is the easiest way to get the latest stable version of libtcod for any project.
|
|
18
|
-
|
|
19
15
|
Libtcod is included as a port in [Vcpkg](https://github.com/microsoft/vcpkg).
|
|
20
16
|
You can install libtcod via Vcpkg and then link the library using a [CMake](https://cmake.org/) script as you normally do for that package manager.
|
|
17
|
+
You may want to fork [this template project](https://github.com/HexDecimal/libtcod-vcpkg-template) if you plan on starting a project with this setup.
|
|
21
18
|
|
|
22
19
|
## As a submodule
|
|
23
20
|
|
|
24
21
|
This is the best option for testing the development versions of libtcod.
|
|
25
22
|
|
|
26
|
-
You can include libtcod in a project by adding the libtcod repository as a [submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules) and then adding that directory to a [CMake](https://cmake.org/) script
|
|
27
|
-
|
|
23
|
+
You can include libtcod in a project by adding the libtcod repository as a [submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules) and then adding that directory to a [CMake](https://cmake.org/) script with `add_subdirectory`.
|
|
24
|
+
|
|
25
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for more details on configuring dependencies.
|
|
26
|
+
|
|
27
|
+
## Using FetchContent
|
|
28
|
+
|
|
29
|
+
Libtcod can be included via `FetchContent` in a projects `CMakeLists.txt`:
|
|
30
|
+
|
|
31
|
+
```cmake
|
|
32
|
+
cmake_minimum_required(VERSION 4.2)
|
|
33
|
+
include(FetchContent)
|
|
34
|
+
|
|
35
|
+
FetchContent_Declare(
|
|
36
|
+
libtcod
|
|
37
|
+
GIT_REPOSITORY https://github.com/libtcod/libtcod
|
|
38
|
+
GIT_TAG main # Replace main with desired version or revision later than 2.2.1
|
|
39
|
+
)
|
|
40
|
+
FetchContent_MakeAvailable(libtcod)
|
|
41
|
+
```
|
|
28
42
|
|
|
29
|
-
|
|
30
|
-
See [CONTRIBUTING.md](CONTRIBUTING.md) for details on configuring dependencies.
|
|
43
|
+
Afterwards libtcod can be linked to a project as normal.
|
|
31
44
|
|
|
32
|
-
|
|
45
|
+
```cmake
|
|
46
|
+
target_link_libraries(${PROJECT_NAME} PRIVATE libtcod::libtcod)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for more details on configuring dependencies.
|
|
50
|
+
|
|
51
|
+
## Using a pre-built binary
|
|
33
52
|
|
|
34
53
|
This is not recommend as these releases are unwieldy, are more difficult to update, and are less cross-platform.
|
|
35
54
|
*Do not upload binary files to your projects source repository.*
|
|
@@ -38,57 +57,35 @@ If you are programming in C or C++ then
|
|
|
38
57
|
Windows and MacOS binaries are available from the
|
|
39
58
|
[GitHub Releases page](https://github.com/libtcod/libtcod/releases).
|
|
40
59
|
|
|
41
|
-
Various C/C++ sample projects are included within
|
|
42
|
-
the repository which can be used as examples of various features.
|
|
43
|
-
|
|
44
60
|
Keep in mind that as a C++ library, you may need to distribute the
|
|
45
61
|
appropriate runtime with your program such as the
|
|
46
62
|
[Visual Studio 2015 runtimes](https://www.microsoft.com/en-us/download/details.aspx?id=53587)
|
|
47
63
|
or else the program will fail to run.
|
|
48
64
|
|
|
49
|
-
For those who wish to program in Python you can install python-tcod using
|
|
50
|
-
[this installation guide](https://python-tcod.readthedocs.io/en/latest/installation.html).
|
|
51
|
-
Once installed you can follow
|
|
52
|
-
[the Python 3 tutorial](http://rogueliketutorials.com/)
|
|
53
|
-
or you can find Python example scripts on the
|
|
54
|
-
[python-tcod repository](https://github.com/libtcod/python-tcod).
|
|
55
|
-
|
|
56
|
-
A alternative version of the Python library (libtcodpy) exists in the binary
|
|
57
|
-
downloads, but you should avoid using this version as it is not as well
|
|
58
|
-
maintained.
|
|
59
|
-
|
|
60
65
|
## Compiling from source
|
|
61
66
|
|
|
62
67
|
This is only recommended for libtcod developers.
|
|
63
68
|
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
64
69
|
|
|
65
|
-
#
|
|
70
|
+
# Documentation and Tutorials
|
|
66
71
|
|
|
67
72
|
The latest documentation is [here](https://libtcod.readthedocs.io/en/latest).
|
|
68
|
-
|
|
69
|
-
[
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
[python-tcod documentation](http://python-tcod.readthedocs.io).
|
|
73
|
-
|
|
74
|
-
libtcod comes with a sample application, implementations of which are provided
|
|
75
|
-
in each of
|
|
73
|
+
It is incomplete, so most people will want to read the [1.6.4 documentation](https://libtcod.github.io/docs/index2.html?c=true&cpp=true&cs=false&py=false&lua=false) instead.
|
|
74
|
+
Python users should use the [python-tcod documentation](http://python-tcod.readthedocs.io).
|
|
75
|
+
|
|
76
|
+
libtcod comes with a sample application, implementations of which are provided in each of
|
|
76
77
|
C ([samples_c.c](https://github.com/libtcod/libtcod/blob/master/samples/samples_c.c)),
|
|
77
78
|
C++ ([samples_cpp.cpp](https://github.com/libtcod/libtcod/blob/master/samples/samples_cpp.cpp)),
|
|
78
79
|
and Python ([samples_py.py](https://github.com/libtcod/python-tcod/blob/master/examples/samples_tcod.py)).
|
|
79
|
-
This provides a decent overview of the basic features, in an interactive
|
|
80
|
-
|
|
81
|
-
Each should be identical for the most part, so if you are using Windows,
|
|
82
|
-
downloading the pre-compiled binaries and running the included `samples.exe`
|
|
83
|
-
which is compiled from the C source code, should be representative of the other
|
|
84
|
-
versions.
|
|
80
|
+
This provides a decent overview of the basic features, in an interactive fashion.
|
|
81
|
+
Each should be identical for the most part, so if you are using Windows, downloading the pre-compiled binaries and running the included `samples.exe` which is compiled from the C source code, should be representative of the other versions.
|
|
85
82
|
|
|
86
83
|
# Contact / Community
|
|
87
84
|
|
|
88
85
|
For reporting bugs or requesting features you should use the [GitHub Issues page](https://github.com/libtcod/libtcod/issues).
|
|
89
86
|
For smaller questions or help with a tutorial or project you can join ``#libtcod`` on the [Roguelikes Discord](https://discord.gg/jEgZtqB) or on the [Libera.Chat](https://libera.chat/) IRC.
|
|
90
87
|
|
|
91
|
-
|
|
88
|
+
## Sponsors
|
|
92
89
|
|
|
93
90
|
[Sponsors donating $25 or more per month](https://github.com/sponsors/HexDecimal) will have their names or logos listed here.
|
|
94
91
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* BSD 3-Clause License
|
|
2
2
|
*
|
|
3
|
-
* Copyright © 2008-
|
|
3
|
+
* Copyright © 2008-2026, Jice and the libtcod contributors.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
*
|
|
6
6
|
* Redistribution and use in source and binary forms, with or without
|
|
@@ -29,12 +29,16 @@
|
|
|
29
29
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
30
30
|
* POSSIBILITY OF SUCH DAMAGE.
|
|
31
31
|
*/
|
|
32
|
+
/// @file bresenham.h
|
|
33
|
+
/// Bresenham line module.
|
|
32
34
|
#pragma once
|
|
33
35
|
#ifndef TCOD_BRESENHAM_H_
|
|
34
36
|
#define TCOD_BRESENHAM_H_
|
|
35
37
|
|
|
36
38
|
#include "portability.h"
|
|
37
39
|
|
|
40
|
+
/// @defgroup Bresenham Bresenham lines
|
|
41
|
+
/// @{
|
|
38
42
|
#ifdef __cplusplus
|
|
39
43
|
extern "C" {
|
|
40
44
|
#endif
|
|
@@ -85,4 +89,5 @@ TCODLIB_API bool TCOD_line_mt(
|
|
|
85
89
|
#ifdef __cplusplus
|
|
86
90
|
} // extern "C"
|
|
87
91
|
#endif // __cplusplus
|
|
92
|
+
/// @}
|
|
88
93
|
#endif // TCOD_BRESENHAM_H_
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* BSD 3-Clause License
|
|
2
2
|
*
|
|
3
|
-
* Copyright © 2008-
|
|
3
|
+
* Copyright © 2008-2026, Jice and the libtcod contributors.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
*
|
|
6
6
|
* Redistribution and use in source and binary forms, with or without
|
|
@@ -124,7 +124,7 @@ bool TCOD_line_step_mt(int* __restrict xCur, int* __restrict yCur, TCOD_bresenha
|
|
|
124
124
|
* \verbatim embed:rst:leading-asterisk
|
|
125
125
|
* .. deprecated:: 1.6.6
|
|
126
126
|
* The `data` parameter for this call is redundant, you should call
|
|
127
|
-
*
|
|
127
|
+
* TCOD_line instead.
|
|
128
128
|
* \endverbatim
|
|
129
129
|
*/
|
|
130
130
|
bool TCOD_line_mt(int xo, int yo, int xd, int yd, TCOD_line_listener_t listener, TCOD_bresenham_data_t* data) {
|
|
@@ -147,7 +147,7 @@ bool TCOD_line_mt(int xo, int yo, int xd, int yd, TCOD_line_listener_t listener,
|
|
|
147
147
|
* This function is not reentrant and will fail if a new line is started
|
|
148
148
|
* before the last is finished processing.
|
|
149
149
|
*
|
|
150
|
-
* Use
|
|
150
|
+
* Use TCOD_line_init_mt instead.
|
|
151
151
|
* \endverbatim
|
|
152
152
|
*/
|
|
153
153
|
void TCOD_line_init(int xFrom, int yFrom, int xTo, int yTo) {
|
|
@@ -168,7 +168,7 @@ void TCOD_line_init(int xFrom, int yFrom, int xTo, int yTo) {
|
|
|
168
168
|
* This function is not reentrant and will fail if a new line is started
|
|
169
169
|
* before the last is finished processing.
|
|
170
170
|
*
|
|
171
|
-
* Use
|
|
171
|
+
* Use TCOD_line_step_mt instead.
|
|
172
172
|
* \endverbatim
|
|
173
173
|
*/
|
|
174
174
|
bool TCOD_line_step(int* __restrict xCur, int* __restrict yCur) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* BSD 3-Clause License
|
|
2
2
|
*
|
|
3
|
-
* Copyright © 2008-
|
|
3
|
+
* Copyright © 2008-2026, Jice and the libtcod contributors.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
*
|
|
6
6
|
* Redistribution and use in source and binary forms, with or without
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
30
30
|
* POSSIBILITY OF SUCH DAMAGE.
|
|
31
31
|
*/
|
|
32
|
+
/// @file bsp.h
|
|
33
|
+
/// Binary space partitioning module.
|
|
32
34
|
#pragma once
|
|
33
35
|
#ifndef TCOD_BSP_H_
|
|
34
36
|
#define TCOD_BSP_H_
|
|
@@ -37,6 +39,8 @@
|
|
|
37
39
|
#include "portability.h"
|
|
38
40
|
#include "tree.h"
|
|
39
41
|
|
|
42
|
+
/// @defgroup BSP Binary space partitioning
|
|
43
|
+
/// @{
|
|
40
44
|
#ifdef __cplusplus
|
|
41
45
|
extern "C" {
|
|
42
46
|
#endif
|
|
@@ -74,4 +78,5 @@ TCODLIB_API void TCOD_bsp_remove_sons(TCOD_bsp_t* node);
|
|
|
74
78
|
#ifdef __cplusplus
|
|
75
79
|
}
|
|
76
80
|
#endif
|
|
81
|
+
/// @}
|
|
77
82
|
#endif // TCOD_BSP_H_
|