tcod 17.0.0__tar.gz → 17.1.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-17.0.0 → tcod-17.1.0}/CHANGELOG.md +11 -0
- {tcod-17.0.0 → tcod-17.1.0}/PKG-INFO +1 -1
- {tcod-17.0.0 → tcod-17.1.0}/tcod/sdl/render.py +53 -30
- {tcod-17.0.0 → tcod-17.1.0}/tcod/version.py +2 -2
- {tcod-17.0.0 → tcod-17.1.0}/tcod.egg-info/PKG-INFO +1 -1
- {tcod-17.0.0 → tcod-17.1.0}/CONTRIBUTING.md +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/LICENSE.txt +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/MANIFEST.in +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/README.rst +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/build_libtcod.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/build_sdl.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/CHANGELOG.md +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/CMakeLists.txt +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/CONTRIBUTING.md +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/LIBTCOD-CREDITS.txt +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/LICENSE.txt +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/README.md +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/bresenham.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/bresenham_c.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/bsp.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/bsp_c.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/color.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/color.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/config.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/console.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/console.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/console_drawing.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/console_drawing.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/console_etc.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/console_etc.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/console_init.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/console_init.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/console_printing.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/console_printing.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/console_rexpaint.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/console_rexpaint.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/console_types.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/context.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/context.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/context_init.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/context_init.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/context_viewport.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/context_viewport.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/error.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/error.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/fov.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/fov_c.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/fov_circular_raycasting.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/fov_diamond_raycasting.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/fov_permissive2.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/fov_recursive_shadowcasting.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/fov_restrictive.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/fov_symmetric_shadowcast.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/fov_types.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/globals.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/globals.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/heapq.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/heapq.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/heightmap.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/heightmap_c.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/image.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/image_c.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/lex.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/lex_c.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/libtcod.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/libtcod_int.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/list.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/list_c.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/logging.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/logging.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/mersenne.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/mersenne_c.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/mersenne_types.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/mouse.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/mouse_types.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/namegen.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/namegen_c.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/noise.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/noise_c.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/noise_defaults.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/parser.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/parser_c.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/path.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/path_c.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/pathfinder.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/pathfinder.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/pathfinder_frontier.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/pathfinder_frontier.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/portability.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/random.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/random.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/renderer_sdl2.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/renderer_sdl2.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/renderer_xterm.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/renderer_xterm.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/sdl2/console_grid.glslf +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/sdl2/console_grid.glslv +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/sdl2/event.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/sys.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/sys_c.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/sys_sdl_c.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/sys_sdl_img_bmp.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/sys_sdl_img_png.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/tileset.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/tileset.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/tileset_bdf.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/tileset_bdf.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/tileset_fallback.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/tileset_fallback.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/tileset_render.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/tileset_render.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/tileset_truetype.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/tileset_truetype.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/timer.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/tree.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/tree_c.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/txtfield.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/txtfield_c.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/utility.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/version.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/wrappers.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/wrappers.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/zip.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod/zip_c.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/libtcod_c.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/khrplatform.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/lodepng.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/lodepng.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/stb.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/stb_ds.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/stb_truetype.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/utf8proc/utf8proc.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/utf8proc/utf8proc.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/utf8proc/utf8proc_data.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/zlib/adler32.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/zlib/compress.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/zlib/crc32.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/zlib/crc32.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/zlib/deflate.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/zlib/deflate.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/zlib/gzclose.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/zlib/gzguts.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/zlib/gzlib.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/zlib/gzread.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/zlib/gzwrite.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/zlib/infback.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/zlib/inffast.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/zlib/inffast.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/zlib/inffixed.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/zlib/inflate.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/zlib/inflate.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/zlib/inftrees.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/zlib/inftrees.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/zlib/trees.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/zlib/trees.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/zlib/uncompr.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/zlib/zconf.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/zlib/zlib.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/zlib/zutil.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcod/src/vendor/zlib/zutil.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/libtcodpy.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/pyproject.toml +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/requirements.txt +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/setup.cfg +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/setup.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/__init__.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/__pyinstaller/__init__.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/__pyinstaller/hook-tcod.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/_internal.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/bsp.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/cdef.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/cffi.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/cffi.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/color.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/console.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/constants.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/context.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/event.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/event_constants.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/image.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/libtcodpy.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/los.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/map.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/noise.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/noise.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/noise.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/path.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/path.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/path.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/py.typed +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/random.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/random.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/render.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/sdl/__init__.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/sdl/_internal.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/sdl/audio.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/sdl/joystick.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/sdl/mouse.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/sdl/sys.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/sdl/video.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/tcod.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/tcod.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/tcod.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/tdl.c +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/tdl.h +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod/tileset.py +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod.egg-info/SOURCES.txt +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod.egg-info/dependency_links.txt +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod.egg-info/entry_points.txt +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod.egg-info/requires.txt +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tcod.egg-info/top_level.txt +0 -0
- {tcod-17.0.0 → tcod-17.1.0}/tox.ini +0 -0
|
@@ -6,6 +6,17 @@ This project adheres to [Semantic Versioning](https://semver.org/) since version
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [17.1.0] - 2025-03-29
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- SDL renderer primitive drawing methods now support sequences of tuples.
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- `tcod.sdl.Renderer.draw_lines` type hint was too narrow.
|
|
18
|
+
- Fixed crash in `tcod.sdl.Renderer.geometry`.
|
|
19
|
+
|
|
9
20
|
## [17.0.0] - 2025-03-28
|
|
10
21
|
|
|
11
22
|
### Changed
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
from __future__ import annotations
|
|
7
7
|
|
|
8
8
|
import enum
|
|
9
|
-
from typing import Any, Final
|
|
9
|
+
from typing import Any, Final, Sequence
|
|
10
10
|
|
|
11
11
|
import numpy as np
|
|
12
12
|
from numpy.typing import NDArray
|
|
@@ -594,59 +594,78 @@ class Renderer:
|
|
|
594
594
|
_check(lib.SDL_RenderDrawLineF(self.p, x1, y1, x2, y2))
|
|
595
595
|
|
|
596
596
|
@staticmethod
|
|
597
|
-
def _convert_array(
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
return np.ascontiguousarray(array, np.float32)
|
|
597
|
+
def _convert_array(
|
|
598
|
+
array: NDArray[np.number] | Sequence[Sequence[float]], item_length: int
|
|
599
|
+
) -> NDArray[np.intc] | NDArray[np.float32]:
|
|
600
|
+
"""Convert ndarray for a SDL function expecting a C contiguous array of either intc or float32.
|
|
602
601
|
|
|
603
|
-
|
|
602
|
+
Array shape is enforced to be (n, item_length)
|
|
603
|
+
"""
|
|
604
|
+
if getattr(array, "dtype", None) in (np.intc, np.int8, np.int16, np.int32, np.uint8, np.uint16):
|
|
605
|
+
out = np.ascontiguousarray(array, np.intc)
|
|
606
|
+
else:
|
|
607
|
+
out = np.ascontiguousarray(array, np.float32)
|
|
608
|
+
if len(out.shape) != 2: # noqa: PLR2004
|
|
609
|
+
msg = f"Array must have 2 axes, but shape is {out.shape!r}"
|
|
610
|
+
raise TypeError(msg)
|
|
611
|
+
if out.shape[1] != item_length:
|
|
612
|
+
msg = f"Array shape[1] must be {item_length}, but shape is {out.shape!r}"
|
|
613
|
+
raise TypeError(msg)
|
|
614
|
+
return out
|
|
615
|
+
|
|
616
|
+
def fill_rects(self, rects: NDArray[np.number] | Sequence[tuple[float, float, float, float]]) -> None:
|
|
604
617
|
"""Fill multiple rectangles from an array.
|
|
605
618
|
|
|
619
|
+
Args:
|
|
620
|
+
rects: A sequence or array of (x, y, width, height) rectangles.
|
|
621
|
+
|
|
606
622
|
.. versionadded:: 13.5
|
|
607
623
|
"""
|
|
608
|
-
|
|
609
|
-
assert rects.shape[1] == 4 # noqa: PLR2004
|
|
610
|
-
rects = self._convert_array(rects)
|
|
624
|
+
rects = self._convert_array(rects, item_length=4)
|
|
611
625
|
if rects.dtype == np.intc:
|
|
612
626
|
_check(lib.SDL_RenderFillRects(self.p, tcod.ffi.from_buffer("SDL_Rect*", rects), rects.shape[0]))
|
|
613
627
|
return
|
|
614
628
|
_check(lib.SDL_RenderFillRectsF(self.p, tcod.ffi.from_buffer("SDL_FRect*", rects), rects.shape[0]))
|
|
615
629
|
|
|
616
|
-
def draw_rects(self, rects: NDArray[np.number]) -> None:
|
|
630
|
+
def draw_rects(self, rects: NDArray[np.number] | Sequence[tuple[float, float, float, float]]) -> None:
|
|
617
631
|
"""Draw multiple outlined rectangles from an array.
|
|
618
632
|
|
|
633
|
+
Args:
|
|
634
|
+
rects: A sequence or array of (x, y, width, height) rectangles.
|
|
635
|
+
|
|
619
636
|
.. versionadded:: 13.5
|
|
620
637
|
"""
|
|
638
|
+
rects = self._convert_array(rects, item_length=4)
|
|
621
639
|
assert len(rects.shape) == 2 # noqa: PLR2004
|
|
622
640
|
assert rects.shape[1] == 4 # noqa: PLR2004
|
|
623
|
-
rects = self._convert_array(rects)
|
|
624
641
|
if rects.dtype == np.intc:
|
|
625
642
|
_check(lib.SDL_RenderDrawRects(self.p, tcod.ffi.from_buffer("SDL_Rect*", rects), rects.shape[0]))
|
|
626
643
|
return
|
|
627
644
|
_check(lib.SDL_RenderDrawRectsF(self.p, tcod.ffi.from_buffer("SDL_FRect*", rects), rects.shape[0]))
|
|
628
645
|
|
|
629
|
-
def draw_points(self, points: NDArray[np.number]) -> None:
|
|
646
|
+
def draw_points(self, points: NDArray[np.number] | Sequence[tuple[float, float]]) -> None:
|
|
630
647
|
"""Draw an array of points.
|
|
631
648
|
|
|
649
|
+
Args:
|
|
650
|
+
points: A sequence or array of (x, y) points.
|
|
651
|
+
|
|
632
652
|
.. versionadded:: 13.5
|
|
633
653
|
"""
|
|
634
|
-
|
|
635
|
-
assert points.shape[1] == 2 # noqa: PLR2004
|
|
636
|
-
points = self._convert_array(points)
|
|
654
|
+
points = self._convert_array(points, item_length=2)
|
|
637
655
|
if points.dtype == np.intc:
|
|
638
656
|
_check(lib.SDL_RenderDrawPoints(self.p, tcod.ffi.from_buffer("SDL_Point*", points), points.shape[0]))
|
|
639
657
|
return
|
|
640
658
|
_check(lib.SDL_RenderDrawPointsF(self.p, tcod.ffi.from_buffer("SDL_FPoint*", points), points.shape[0]))
|
|
641
659
|
|
|
642
|
-
def draw_lines(self, points: NDArray[np.
|
|
660
|
+
def draw_lines(self, points: NDArray[np.number] | Sequence[tuple[float, float]]) -> None:
|
|
643
661
|
"""Draw a connected series of lines from an array.
|
|
644
662
|
|
|
663
|
+
Args:
|
|
664
|
+
points: A sequence or array of (x, y) points.
|
|
665
|
+
|
|
645
666
|
.. versionadded:: 13.5
|
|
646
667
|
"""
|
|
647
|
-
|
|
648
|
-
assert points.shape[1] == 2 # noqa: PLR2004
|
|
649
|
-
points = self._convert_array(points)
|
|
668
|
+
points = self._convert_array(points, item_length=2)
|
|
650
669
|
if points.dtype == np.intc:
|
|
651
670
|
_check(lib.SDL_RenderDrawLines(self.p, tcod.ffi.from_buffer("SDL_Point*", points), points.shape[0] - 1))
|
|
652
671
|
return
|
|
@@ -656,29 +675,33 @@ class Renderer:
|
|
|
656
675
|
def geometry(
|
|
657
676
|
self,
|
|
658
677
|
texture: Texture | None,
|
|
659
|
-
xy: NDArray[np.float32],
|
|
660
|
-
color: NDArray[np.uint8],
|
|
661
|
-
uv: NDArray[np.float32],
|
|
678
|
+
xy: NDArray[np.float32] | Sequence[tuple[float, float]],
|
|
679
|
+
color: NDArray[np.uint8] | Sequence[tuple[int, int, int, int]],
|
|
680
|
+
uv: NDArray[np.float32] | Sequence[tuple[float, float]],
|
|
662
681
|
indices: NDArray[np.uint8 | np.uint16 | np.uint32] | None = None,
|
|
663
682
|
) -> None:
|
|
664
683
|
"""Render triangles from texture and vertex data.
|
|
665
684
|
|
|
685
|
+
Args:
|
|
686
|
+
texture: The SDL texture to render from.
|
|
687
|
+
xy: A sequence of (x, y) points to buffer.
|
|
688
|
+
color: A sequence of (r, g, b, a) colors to buffer.
|
|
689
|
+
uv: A sequence of (x, y) coordinates to buffer.
|
|
690
|
+
indices: A sequence of indexes referring to the buffered data, every 3 indexes is a triangle to render.
|
|
691
|
+
|
|
666
692
|
.. versionadded:: 13.5
|
|
667
693
|
"""
|
|
668
|
-
|
|
694
|
+
xy = np.ascontiguousarray(xy, np.float32)
|
|
669
695
|
assert len(xy.shape) == 2 # noqa: PLR2004
|
|
670
696
|
assert xy.shape[1] == 2 # noqa: PLR2004
|
|
671
|
-
assert xy[0].flags.c_contiguous
|
|
672
697
|
|
|
673
|
-
|
|
698
|
+
color = np.ascontiguousarray(color, np.uint8)
|
|
674
699
|
assert len(color.shape) == 2 # noqa: PLR2004
|
|
675
700
|
assert color.shape[1] == 4 # noqa: PLR2004
|
|
676
|
-
assert color[0].flags.c_contiguous
|
|
677
701
|
|
|
678
|
-
|
|
702
|
+
uv = np.ascontiguousarray(uv, np.float32)
|
|
679
703
|
assert len(uv.shape) == 2 # noqa: PLR2004
|
|
680
704
|
assert uv.shape[1] == 2 # noqa: PLR2004
|
|
681
|
-
assert uv[0].flags.c_contiguous
|
|
682
705
|
if indices is not None:
|
|
683
706
|
assert indices.dtype.type in (np.uint8, np.uint16, np.uint32, np.int8, np.int16, np.int32)
|
|
684
707
|
indices = np.ascontiguousarray(indices)
|
|
@@ -690,7 +713,7 @@ class Renderer:
|
|
|
690
713
|
texture.p if texture else ffi.NULL,
|
|
691
714
|
ffi.cast("float*", xy.ctypes.data),
|
|
692
715
|
xy.strides[0],
|
|
693
|
-
ffi.cast("
|
|
716
|
+
ffi.cast("SDL_Color*", color.ctypes.data),
|
|
694
717
|
color.strides[0],
|
|
695
718
|
ffi.cast("float*", uv.ctypes.data),
|
|
696
719
|
uv.strides[0],
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|