tcod 16.2.2__tar.gz → 16.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tcod-16.2.2 → tcod-16.2.3}/CHANGELOG.md +8 -0
- {tcod-16.2.2 → tcod-16.2.3}/PKG-INFO +1 -1
- {tcod-16.2.2 → tcod-16.2.3}/build_libtcod.py +2 -1
- {tcod-16.2.2 → tcod-16.2.3}/build_sdl.py +1 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcodpy.py +1 -0
- {tcod-16.2.2 → tcod-16.2.3}/pyproject.toml +5 -5
- {tcod-16.2.2 → tcod-16.2.3}/requirements.txt +2 -1
- {tcod-16.2.2 → tcod-16.2.3}/setup.py +1 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/__init__.py +1 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/__pyinstaller/__init__.py +1 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/__pyinstaller/hook-tcod.py +1 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/_internal.py +1 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/bsp.py +1 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/cffi.py +1 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/color.py +1 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/console.py +7 -6
- {tcod-16.2.2 → tcod-16.2.3}/tcod/constants.py +1 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/context.py +1 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/event.py +18 -29
- {tcod-16.2.2 → tcod-16.2.3}/tcod/image.py +9 -1
- {tcod-16.2.2 → tcod-16.2.3}/tcod/libtcodpy.py +6 -10
- {tcod-16.2.2 → tcod-16.2.3}/tcod/los.py +1 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/map.py +2 -1
- {tcod-16.2.2 → tcod-16.2.3}/tcod/noise.py +2 -1
- {tcod-16.2.2 → tcod-16.2.3}/tcod/path.py +2 -1
- {tcod-16.2.2 → tcod-16.2.3}/tcod/random.py +1 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/sdl/__init__.py +1 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/sdl/_internal.py +1 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/sdl/audio.py +1 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/sdl/joystick.py +1 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/sdl/mouse.py +1 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/sdl/render.py +1 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/sdl/video.py +1 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/tcod.py +1 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/tileset.py +1 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/version.py +2 -2
- {tcod-16.2.2 → tcod-16.2.3}/tcod.egg-info/PKG-INFO +1 -1
- {tcod-16.2.2 → tcod-16.2.3}/CONTRIBUTING.md +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/LICENSE.txt +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/MANIFEST.in +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/README.rst +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/CHANGELOG.md +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/CMakeLists.txt +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/CONTRIBUTING.md +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/LIBTCOD-CREDITS.txt +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/LICENSE.txt +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/README.md +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/bresenham.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/bresenham_c.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/bsp.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/bsp_c.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/color.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/color.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/config.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/console.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/console.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/console_drawing.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/console_drawing.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/console_etc.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/console_etc.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/console_init.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/console_init.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/console_printing.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/console_printing.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/console_rexpaint.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/console_rexpaint.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/console_types.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/context.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/context.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/context_init.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/context_init.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/context_viewport.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/context_viewport.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/error.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/error.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/fov.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/fov_c.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/fov_circular_raycasting.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/fov_diamond_raycasting.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/fov_permissive2.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/fov_recursive_shadowcasting.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/fov_restrictive.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/fov_symmetric_shadowcast.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/fov_types.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/globals.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/globals.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/heapq.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/heapq.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/heightmap.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/heightmap_c.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/image.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/image_c.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/lex.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/lex_c.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/libtcod.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/libtcod_int.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/list.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/list_c.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/logging.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/logging.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/mersenne.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/mersenne_c.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/mersenne_types.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/mouse.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/mouse_types.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/namegen.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/namegen_c.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/noise.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/noise_c.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/noise_defaults.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/parser.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/parser_c.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/path.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/path_c.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/pathfinder.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/pathfinder.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/pathfinder_frontier.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/pathfinder_frontier.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/portability.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/random.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/random.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/renderer_sdl2.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/renderer_sdl2.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/renderer_xterm.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/renderer_xterm.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/sdl2/console_grid.glslf +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/sdl2/console_grid.glslv +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/sdl2/event.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/sys.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/sys_c.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/sys_sdl_c.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/sys_sdl_img_bmp.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/sys_sdl_img_png.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/tileset.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/tileset.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/tileset_bdf.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/tileset_bdf.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/tileset_fallback.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/tileset_fallback.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/tileset_render.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/tileset_render.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/tileset_truetype.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/tileset_truetype.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/timer.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/tree.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/tree_c.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/txtfield.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/txtfield_c.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/utility.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/version.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/wrappers.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/wrappers.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/zip.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod/zip_c.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/libtcod_c.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/khrplatform.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/lodepng.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/lodepng.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/stb.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/stb_ds.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/stb_truetype.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/utf8proc/utf8proc.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/utf8proc/utf8proc.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/utf8proc/utf8proc_data.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/zlib/adler32.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/zlib/compress.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/zlib/crc32.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/zlib/crc32.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/zlib/deflate.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/zlib/deflate.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/zlib/gzclose.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/zlib/gzguts.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/zlib/gzlib.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/zlib/gzread.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/zlib/gzwrite.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/zlib/infback.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/zlib/inffast.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/zlib/inffast.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/zlib/inffixed.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/zlib/inflate.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/zlib/inflate.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/zlib/inftrees.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/zlib/inftrees.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/zlib/trees.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/zlib/trees.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/zlib/uncompr.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/zlib/zconf.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/zlib/zlib.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/zlib/zutil.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/libtcod/src/vendor/zlib/zutil.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/setup.cfg +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/cdef.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/cffi.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/event_constants.py +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/noise.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/noise.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/path.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/path.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/py.typed +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/random.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/render.py +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/sdl/sys.py +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/tcod.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/tcod.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/tdl.c +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod/tdl.h +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod.egg-info/SOURCES.txt +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod.egg-info/dependency_links.txt +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod.egg-info/entry_points.txt +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod.egg-info/requires.txt +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/tcod.egg-info/top_level.txt +0 -0
- {tcod-16.2.2 → tcod-16.2.3}/tox.ini +0 -0
|
@@ -6,6 +6,14 @@ This project adheres to [Semantic Versioning](https://semver.org/) since version
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [16.2.3] - 2024-07-16
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- Fixed access violation when events are polled before SDL is initialized.
|
|
14
|
+
- Fixed access violation when libtcod images fail to load.
|
|
15
|
+
- Verify input files exist when calling `libtcodpy.parser_run`, `libtcodpy.namegen_parse`, `tcod.image.load`.
|
|
16
|
+
|
|
9
17
|
## [16.2.2] - 2024-01-16
|
|
10
18
|
|
|
11
19
|
### Fixed
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
"""Parse and compile libtcod and SDL sources for CFFI."""
|
|
3
|
+
|
|
3
4
|
from __future__ import annotations
|
|
4
5
|
|
|
5
6
|
import contextlib
|
|
@@ -15,7 +16,7 @@ from cffi import FFI
|
|
|
15
16
|
|
|
16
17
|
sys.path.append(str(Path(__file__).parent)) # Allow importing local modules.
|
|
17
18
|
|
|
18
|
-
import build_sdl
|
|
19
|
+
import build_sdl
|
|
19
20
|
|
|
20
21
|
Py_LIMITED_API = 0x03060000
|
|
21
22
|
|
|
@@ -146,7 +146,10 @@ module = "tcod._libtcod"
|
|
|
146
146
|
ignore_missing_imports = true
|
|
147
147
|
|
|
148
148
|
[tool.ruff]
|
|
149
|
-
#
|
|
149
|
+
extend-exclude = ["libtcod"] # Ignore submodule
|
|
150
|
+
line-length = 120
|
|
151
|
+
|
|
152
|
+
[tool.ruff.lint] # https://docs.astral.sh/ruff/rules/
|
|
150
153
|
select = [
|
|
151
154
|
"C90", # mccabe
|
|
152
155
|
"E", # pycodestyle
|
|
@@ -190,9 +193,6 @@ ignore = [
|
|
|
190
193
|
"D206", # indent-with-spaces
|
|
191
194
|
"W191", # tab-indentation
|
|
192
195
|
]
|
|
193
|
-
extend-exclude = ["libtcod"] # Ignore submodule
|
|
194
|
-
line-length = 120
|
|
195
196
|
|
|
196
|
-
[tool.ruff.pydocstyle]
|
|
197
|
-
# Use Google-style docstrings.
|
|
197
|
+
[tool.ruff.lint.pydocstyle] # https://docs.astral.sh/ruff/settings/#lintpydocstyle
|
|
198
198
|
convention = "google"
|
|
@@ -5,6 +5,7 @@ There were added since tcod 12.0.0.
|
|
|
5
5
|
If this hook is ever modified then the contributed hook needs to be removed from:
|
|
6
6
|
https://github.com/pyinstaller/pyinstaller-hooks-contrib
|
|
7
7
|
"""
|
|
8
|
+
|
|
8
9
|
from PyInstaller.utils.hooks import collect_dynamic_libs # type: ignore
|
|
9
10
|
|
|
10
11
|
hiddenimports = ["_cffi_backend"]
|
|
@@ -4,6 +4,7 @@ Libtcod consoles are a strictly tile-based representation of colored glyphs/tile
|
|
|
4
4
|
To render a console you need a tileset and a window to render to.
|
|
5
5
|
See :ref:`getting-started` for info on how to set those up.
|
|
6
6
|
"""
|
|
7
|
+
|
|
7
8
|
from __future__ import annotations
|
|
8
9
|
|
|
9
10
|
import warnings
|
|
@@ -312,8 +313,8 @@ class Console:
|
|
|
312
313
|
... (*WHITE, 255),
|
|
313
314
|
... (*BLACK, 255),
|
|
314
315
|
... )
|
|
315
|
-
>>> con.rgba[0, 0]
|
|
316
|
-
(88, [255, 255, 255, 255], [ 0, 0, 0, 255])
|
|
316
|
+
>>> print(f"{con.rgba[0, 0]=}")
|
|
317
|
+
con.rgba[0, 0]=...(88, [255, 255, 255, 255], [ 0, 0, 0, 255])...
|
|
317
318
|
|
|
318
319
|
.. versionadded:: 12.3
|
|
319
320
|
"""
|
|
@@ -333,11 +334,11 @@ class Console:
|
|
|
333
334
|
>>> con = tcod.console.Console(10, 2)
|
|
334
335
|
>>> BLUE, YELLOW, BLACK = (0, 0, 255), (255, 255, 0), (0, 0, 0)
|
|
335
336
|
>>> con.rgb[0, 0] = ord("@"), YELLOW, BLACK
|
|
336
|
-
>>> con.rgb[0, 0]
|
|
337
|
-
(64, [255, 255, 0], [0, 0, 0])
|
|
337
|
+
>>> print(f"{con.rgb[0, 0]=}")
|
|
338
|
+
con.rgb[0, 0]=...(64, [255, 255, 0], [0, 0, 0])...
|
|
338
339
|
>>> con.rgb["bg"] = BLUE
|
|
339
|
-
>>> con.rgb[0, 0]
|
|
340
|
-
(64, [255, 255, 0], [ 0, 0, 255])
|
|
340
|
+
>>> print(f"{con.rgb[0, 0]=}")
|
|
341
|
+
con.rgb[0, 0]=...(64, [255, 255, 0], [ 0, 0, 255])...
|
|
341
342
|
|
|
342
343
|
.. versionadded:: 12.3
|
|
343
344
|
"""
|
|
@@ -79,6 +79,7 @@ Example::
|
|
|
79
79
|
|
|
80
80
|
.. versionadded:: 8.4
|
|
81
81
|
"""
|
|
82
|
+
|
|
82
83
|
from __future__ import annotations
|
|
83
84
|
|
|
84
85
|
import enum
|
|
@@ -91,6 +92,7 @@ from typing_extensions import Literal
|
|
|
91
92
|
|
|
92
93
|
import tcod.event_constants
|
|
93
94
|
import tcod.sdl.joystick
|
|
95
|
+
import tcod.sdl.sys
|
|
94
96
|
from tcod.cffi import ffi, lib
|
|
95
97
|
from tcod.event_constants import * # noqa: F403
|
|
96
98
|
from tcod.event_constants import KMOD_ALT, KMOD_CTRL, KMOD_GUI, KMOD_SHIFT
|
|
@@ -172,16 +174,11 @@ def _verify_tile_coordinates(xy: Point | None) -> Point:
|
|
|
172
174
|
return Point(0, 0)
|
|
173
175
|
|
|
174
176
|
|
|
175
|
-
_is_sdl_video_initialized = False
|
|
176
|
-
|
|
177
|
-
|
|
178
177
|
def _init_sdl_video() -> None:
|
|
179
178
|
"""Keyboard layout stuff needs SDL to be initialized first."""
|
|
180
|
-
|
|
181
|
-
if _is_sdl_video_initialized:
|
|
179
|
+
if lib.SDL_WasInit(lib.SDL_INIT_VIDEO):
|
|
182
180
|
return
|
|
183
181
|
lib.SDL_InitSubSystem(lib.SDL_INIT_VIDEO)
|
|
184
|
-
_is_sdl_video_initialized = True
|
|
185
182
|
|
|
186
183
|
|
|
187
184
|
class Modifier(enum.IntFlag):
|
|
@@ -444,12 +441,7 @@ class MouseState(Event):
|
|
|
444
441
|
self._tile = Point(*xy)
|
|
445
442
|
|
|
446
443
|
def __repr__(self) -> str:
|
|
447
|
-
return
|
|
448
|
-
self.__class__.__name__,
|
|
449
|
-
tuple(self.position),
|
|
450
|
-
tuple(self.tile),
|
|
451
|
-
MouseButtonMask(self.state),
|
|
452
|
-
)
|
|
444
|
+
return f"tcod.event.{self.__class__.__name__}(position={tuple(self.position)!r}, tile={tuple(self.tile)!r}, state={MouseButtonMask(self.state)})"
|
|
453
445
|
|
|
454
446
|
def __str__(self) -> str:
|
|
455
447
|
return ("<%s, position=(x=%i, y=%i), tile=(x=%i, y=%i), state=%s>") % (
|
|
@@ -554,14 +546,7 @@ class MouseMotion(MouseState):
|
|
|
554
546
|
return self
|
|
555
547
|
|
|
556
548
|
def __repr__(self) -> str:
|
|
557
|
-
return
|
|
558
|
-
self.__class__.__name__,
|
|
559
|
-
tuple(self.position),
|
|
560
|
-
tuple(self.motion),
|
|
561
|
-
tuple(self.tile),
|
|
562
|
-
tuple(self.tile_motion),
|
|
563
|
-
MouseButtonMask(self.state),
|
|
564
|
-
)
|
|
549
|
+
return f"tcod.event.{self.__class__.__name__}(position={tuple(self.position)!r}, motion={tuple(self.motion)!r}, tile={tuple(self.tile)!r}, tile_motion={tuple(self.tile_motion)!r}, state={MouseButtonMask(self.state)!r})"
|
|
565
550
|
|
|
566
551
|
def __str__(self) -> str:
|
|
567
552
|
return ("<%s, motion=(x=%i, y=%i), tile_motion=(x=%i, y=%i)>") % (
|
|
@@ -621,12 +606,7 @@ class MouseButtonEvent(MouseState):
|
|
|
621
606
|
return self
|
|
622
607
|
|
|
623
608
|
def __repr__(self) -> str:
|
|
624
|
-
return "tcod.event.{}(position={!r}, tile={!r}, button={!r})"
|
|
625
|
-
self.__class__.__name__,
|
|
626
|
-
tuple(self.position),
|
|
627
|
-
tuple(self.tile),
|
|
628
|
-
MouseButton(self.button),
|
|
629
|
-
)
|
|
609
|
+
return f"tcod.event.{self.__class__.__name__}(position={tuple(self.position)!r}, tile={tuple(self.tile)!r}, button={MouseButton(self.button)!r})"
|
|
630
610
|
|
|
631
611
|
def __str__(self) -> str:
|
|
632
612
|
return "<type=%r, position=(x=%i, y=%i), tile=(x=%i, y=%i), button=%r)" % (
|
|
@@ -759,7 +739,7 @@ class WindowEvent(Event):
|
|
|
759
739
|
def __repr__(self) -> str:
|
|
760
740
|
return f"tcod.event.{self.__class__.__name__}(type={self.type!r})"
|
|
761
741
|
|
|
762
|
-
__WINDOW_TYPES = {
|
|
742
|
+
__WINDOW_TYPES: Final = {
|
|
763
743
|
lib.SDL_WINDOWEVENT_SHOWN: "WindowShown",
|
|
764
744
|
lib.SDL_WINDOWEVENT_HIDDEN: "WindowHidden",
|
|
765
745
|
lib.SDL_WINDOWEVENT_EXPOSED: "WindowExposed",
|
|
@@ -1212,6 +1192,13 @@ def get() -> Iterator[Any]:
|
|
|
1212
1192
|
It is also safe to call this function inside of a loop that is already handling events
|
|
1213
1193
|
(the event iterator is reentrant.)
|
|
1214
1194
|
"""
|
|
1195
|
+
if not lib.SDL_WasInit(tcod.sdl.sys.Subsystem.EVENTS):
|
|
1196
|
+
warnings.warn(
|
|
1197
|
+
"Events polled before SDL was initialized.",
|
|
1198
|
+
RuntimeWarning,
|
|
1199
|
+
stacklevel=1,
|
|
1200
|
+
)
|
|
1201
|
+
return
|
|
1215
1202
|
sdl_event = ffi.new("SDL_Event*")
|
|
1216
1203
|
while lib.SDL_PollEvent(sdl_event):
|
|
1217
1204
|
if sdl_event.type in _SDL_TO_CLASS_TABLE:
|
|
@@ -1600,7 +1587,9 @@ def add_watch(callback: _EventCallback) -> _EventCallback:
|
|
|
1600
1587
|
.. versionadded:: 13.4
|
|
1601
1588
|
"""
|
|
1602
1589
|
if callback in _event_watch_handles:
|
|
1603
|
-
warnings.warn(
|
|
1590
|
+
warnings.warn(
|
|
1591
|
+
f"{callback} is already an active event watcher, nothing was added.", RuntimeWarning, stacklevel=2
|
|
1592
|
+
)
|
|
1604
1593
|
return callback
|
|
1605
1594
|
handle = _event_watch_handles[callback] = ffi.new_handle(callback)
|
|
1606
1595
|
lib.SDL_AddEventWatch(lib._sdl_event_watcher, handle)
|
|
@@ -1617,7 +1606,7 @@ def remove_watch(callback: Callable[[Event], None]) -> None:
|
|
|
1617
1606
|
.. versionadded:: 13.4
|
|
1618
1607
|
"""
|
|
1619
1608
|
if callback not in _event_watch_handles:
|
|
1620
|
-
warnings.warn(f"{callback} is not an active event watcher, nothing was removed.", RuntimeWarning)
|
|
1609
|
+
warnings.warn(f"{callback} is not an active event watcher, nothing was removed.", RuntimeWarning, stacklevel=2)
|
|
1621
1610
|
return
|
|
1622
1611
|
handle = _event_watch_handles[callback]
|
|
1623
1612
|
lib.SDL_DelEventWatch(lib._sdl_event_watcher, handle)
|
|
@@ -8,6 +8,7 @@ To load images you should typically use `Pillow <https://pillow.readthedocs.io/e
|
|
|
8
8
|
The best it can do with consoles is convert an image into semigraphics which can be shown on non-emulated terminals.
|
|
9
9
|
For true pixel-based rendering you'll want to access the SDL rendering port at :any:`tcod.sdl.render`.
|
|
10
10
|
"""
|
|
11
|
+
|
|
11
12
|
from __future__ import annotations
|
|
12
13
|
|
|
13
14
|
from os import PathLike
|
|
@@ -38,10 +39,16 @@ class Image:
|
|
|
38
39
|
"""Initialize a blank image."""
|
|
39
40
|
self.width, self.height = width, height
|
|
40
41
|
self.image_c = ffi.gc(lib.TCOD_image_new(width, height), lib.TCOD_image_delete)
|
|
42
|
+
if self.image_c == ffi.NULL:
|
|
43
|
+
msg = "Failed to allocate image."
|
|
44
|
+
raise MemoryError(msg)
|
|
41
45
|
|
|
42
46
|
@classmethod
|
|
43
47
|
def _from_cdata(cls, cdata: Any) -> Image: # noqa: ANN401
|
|
44
48
|
self: Image = object.__new__(cls)
|
|
49
|
+
if cdata == ffi.NULL:
|
|
50
|
+
msg = "Pointer must not be NULL."
|
|
51
|
+
raise RuntimeError(msg)
|
|
45
52
|
self.image_c = cdata
|
|
46
53
|
self.width, self.height = self._get_size()
|
|
47
54
|
return self
|
|
@@ -364,7 +371,8 @@ def load(filename: str | PathLike[str]) -> NDArray[np.uint8]:
|
|
|
364
371
|
|
|
365
372
|
.. versionadded:: 11.4
|
|
366
373
|
"""
|
|
367
|
-
|
|
374
|
+
filename = Path(filename).resolve(strict=True)
|
|
375
|
+
image = Image._from_cdata(ffi.gc(lib.TCOD_image_load(_path_encode(filename)), lib.TCOD_image_delete))
|
|
368
376
|
array: NDArray[np.uint8] = np.asarray(image, dtype=np.uint8)
|
|
369
377
|
height, width, depth = array.shape
|
|
370
378
|
if depth == 3: # noqa: PLR2004
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""This module handles backward compatibility with the ctypes libtcodpy module."""
|
|
2
|
+
|
|
2
3
|
from __future__ import annotations
|
|
3
4
|
|
|
4
5
|
import atexit
|
|
@@ -325,13 +326,7 @@ class Dice(_CDataWrapper):
|
|
|
325
326
|
)
|
|
326
327
|
|
|
327
328
|
def __repr__(self) -> str:
|
|
328
|
-
return "{}(nb_dices={!r},nb_faces={!r},multiplier={!r},addsub={!r})"
|
|
329
|
-
self.__class__.__name__,
|
|
330
|
-
self.nb_dices,
|
|
331
|
-
self.nb_faces,
|
|
332
|
-
self.multiplier,
|
|
333
|
-
self.addsub,
|
|
334
|
-
)
|
|
329
|
+
return f"{self.__class__.__name__}(nb_dices={self.nb_dices!r},nb_faces={self.nb_faces!r},multiplier={self.multiplier!r},addsub={self.addsub!r})"
|
|
335
330
|
|
|
336
331
|
|
|
337
332
|
# reverse lookup table for KEY_X attributes, used by Key.__repr__
|
|
@@ -3439,7 +3434,7 @@ def mouse_get_status() -> Mouse:
|
|
|
3439
3434
|
|
|
3440
3435
|
@pending_deprecate()
|
|
3441
3436
|
def namegen_parse(filename: str | PathLike[str], random: tcod.random.Random | None = None) -> None:
|
|
3442
|
-
lib.TCOD_namegen_parse(_path_encode(Path(filename)), random or ffi.NULL)
|
|
3437
|
+
lib.TCOD_namegen_parse(_path_encode(Path(filename).resolve(strict=True)), random or ffi.NULL)
|
|
3443
3438
|
|
|
3444
3439
|
|
|
3445
3440
|
@pending_deprecate()
|
|
@@ -3641,8 +3636,9 @@ def _pycall_parser_error(msg: Any) -> None:
|
|
|
3641
3636
|
@deprecate("Parser functions have been deprecated.")
|
|
3642
3637
|
def parser_run(parser: Any, filename: str | PathLike[str], listener: Any = None) -> None:
|
|
3643
3638
|
global _parser_listener # noqa: PLW0603
|
|
3639
|
+
filename = Path(filename).resolve(strict=True)
|
|
3644
3640
|
if not listener:
|
|
3645
|
-
lib.TCOD_parser_run(parser, _path_encode(
|
|
3641
|
+
lib.TCOD_parser_run(parser, _path_encode(filename), ffi.NULL)
|
|
3646
3642
|
return
|
|
3647
3643
|
|
|
3648
3644
|
propagate_manager = _PropagateException()
|
|
@@ -3661,7 +3657,7 @@ def parser_run(parser: Any, filename: str | PathLike[str], listener: Any = None)
|
|
|
3661
3657
|
with _parser_callback_lock:
|
|
3662
3658
|
_parser_listener = listener
|
|
3663
3659
|
with propagate_manager:
|
|
3664
|
-
lib.TCOD_parser_run(parser, _path_encode(
|
|
3660
|
+
lib.TCOD_parser_run(parser, _path_encode(filename), c_listener)
|
|
3665
3661
|
|
|
3666
3662
|
|
|
3667
3663
|
@deprecate("libtcod objects are deleted automatically.")
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""libtcod map attributes and field-of-view functions."""
|
|
2
|
+
|
|
2
3
|
from __future__ import annotations
|
|
3
4
|
|
|
4
5
|
import warnings
|
|
@@ -60,7 +61,7 @@ class Map:
|
|
|
60
61
|
[ True, True, True],
|
|
61
62
|
[False, True, True],
|
|
62
63
|
[False, False, True]]...)
|
|
63
|
-
>>> m.fov
|
|
64
|
+
>>> m.fov.item(3, 1)
|
|
64
65
|
False
|
|
65
66
|
|
|
66
67
|
.. deprecated:: 11.13
|
|
@@ -31,6 +31,7 @@ Example::
|
|
|
31
31
|
[ 76, 54, 85, 144, 164],
|
|
32
32
|
[ 63, 94, 159, 209, 203]], dtype=uint8)
|
|
33
33
|
"""
|
|
34
|
+
|
|
34
35
|
from __future__ import annotations
|
|
35
36
|
|
|
36
37
|
import enum
|
|
@@ -235,7 +236,7 @@ class Noise:
|
|
|
235
236
|
raise IndexError(
|
|
236
237
|
"This noise generator has %i dimensions, but was indexed with %i." % (self.dimensions, len(indexes))
|
|
237
238
|
)
|
|
238
|
-
indexes = np.broadcast_arrays(*indexes)
|
|
239
|
+
indexes = list(np.broadcast_arrays(*indexes))
|
|
239
240
|
c_input = [ffi.NULL, ffi.NULL, ffi.NULL, ffi.NULL]
|
|
240
241
|
for i, index in enumerate(indexes):
|
|
241
242
|
if index.dtype.type == np.object_:
|
|
@@ -15,6 +15,7 @@ the root node. You can then get a path towards or away from the root with
|
|
|
15
15
|
All path-finding functions now respect the NumPy array shape (if a NumPy
|
|
16
16
|
array is used.)
|
|
17
17
|
"""
|
|
18
|
+
|
|
18
19
|
from __future__ import annotations
|
|
19
20
|
|
|
20
21
|
import functools
|
|
@@ -1140,7 +1141,7 @@ class Pathfinder:
|
|
|
1140
1141
|
>>> i, j = (3, 3) # Starting index.
|
|
1141
1142
|
>>> path = [(i, j)] # List of nodes from the start to the root.
|
|
1142
1143
|
>>> while not (pf.traversal[i, j] == (i, j)).all():
|
|
1143
|
-
... i, j = pf.traversal[i, j]
|
|
1144
|
+
... i, j = pf.traversal[i, j].tolist()
|
|
1144
1145
|
... path.append((i, j))
|
|
1145
1146
|
>>> path # Slower.
|
|
1146
1147
|
[(3, 3), (2, 2), (1, 1), (0, 0)]
|
|
@@ -10,6 +10,7 @@ useful to use `an alternative library for graphics rendering
|
|
|
10
10
|
<https://wiki.python.org/moin/PythonGameLibraries>`_ while continuing to use
|
|
11
11
|
python-tcod's pathfinding and field-of-view algorithms.
|
|
12
12
|
"""
|
|
13
|
+
|
|
13
14
|
from __future__ import annotations
|
|
14
15
|
|
|
15
16
|
import itertools
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|