tcod 19.2.0__tar.gz → 19.3.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.2.0 → tcod-19.3.0}/CHANGELOG.md +6 -0
- {tcod-19.2.0 → tcod-19.3.0}/PKG-INFO +1 -1
- {tcod-19.2.0 → tcod-19.3.0}/tcod/sdl/render.py +49 -13
- {tcod-19.2.0 → tcod-19.3.0}/tcod/version.py +2 -2
- {tcod-19.2.0 → tcod-19.3.0}/tcod.egg-info/PKG-INFO +1 -1
- {tcod-19.2.0 → tcod-19.3.0}/CONTRIBUTING.md +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/LICENSE.txt +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/MANIFEST.in +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/README.rst +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/build_libtcod.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/build_sdl.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/CHANGELOG.md +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/CMakeLists.txt +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/CONTRIBUTING.md +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/LIBTCOD-CREDITS.txt +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/LICENSE.txt +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/README.md +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/bresenham.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/bresenham_c.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/bsp.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/bsp_c.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/color.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/color.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/config.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/console.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/console.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/console_drawing.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/console_drawing.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/console_etc.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/console_etc.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/console_init.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/console_init.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/console_printing.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/console_printing.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/console_rexpaint.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/console_rexpaint.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/console_types.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/context.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/context.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/context_init.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/context_init.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/context_viewport.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/context_viewport.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/error.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/error.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/fov.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/fov_c.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/fov_circular_raycasting.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/fov_diamond_raycasting.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/fov_permissive2.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/fov_recursive_shadowcasting.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/fov_restrictive.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/fov_symmetric_shadowcast.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/fov_types.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/globals.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/globals.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/heapq.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/heapq.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/heightmap.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/heightmap_c.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/image.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/image_c.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/lex.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/lex_c.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/libtcod.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/libtcod_int.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/list.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/list_c.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/logging.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/logging.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/mersenne.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/mersenne_c.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/mersenne_types.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/mouse.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/mouse_types.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/namegen.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/namegen_c.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/noise.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/noise_c.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/noise_defaults.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/parser.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/parser_c.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/path.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/path_c.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/pathfinder.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/pathfinder.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/pathfinder_frontier.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/pathfinder_frontier.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/portability.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/random.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/random.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/renderer_sdl2.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/renderer_sdl2.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/renderer_xterm.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/renderer_xterm.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/sdl2/console_grid.glslf +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/sdl2/console_grid.glslv +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/sdl2/event.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/sys.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/sys_c.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/sys_sdl_c.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/sys_sdl_img_bmp.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/sys_sdl_img_png.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/tileset.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/tileset.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/tileset_bdf.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/tileset_bdf.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/tileset_fallback.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/tileset_fallback.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/tileset_render.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/tileset_render.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/tileset_truetype.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/tileset_truetype.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/timer.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/tree.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/tree_c.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/txtfield.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/txtfield_c.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/utility.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/version.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/wrappers.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/wrappers.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/zip.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod/zip_c.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/libtcod_c.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/khrplatform.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/lodepng.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/lodepng.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/stb.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/stb_ds.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/stb_truetype.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/utf8proc/utf8proc.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/utf8proc/utf8proc.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/utf8proc/utf8proc_data.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/zlib/adler32.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/zlib/compress.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/zlib/crc32.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/zlib/crc32.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/zlib/deflate.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/zlib/deflate.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/zlib/gzclose.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/zlib/gzguts.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/zlib/gzlib.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/zlib/gzread.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/zlib/gzwrite.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/zlib/infback.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/zlib/inffast.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/zlib/inffast.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/zlib/inffixed.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/zlib/inflate.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/zlib/inflate.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/zlib/inftrees.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/zlib/inftrees.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/zlib/trees.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/zlib/trees.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/zlib/uncompr.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/zlib/zconf.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/zlib/zlib.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/zlib/zutil.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcod/src/vendor/zlib/zutil.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/libtcodpy.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/pyproject.toml +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/requirements.txt +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/setup.cfg +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/setup.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/__init__.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/__pyinstaller/__init__.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/__pyinstaller/hook-tcod.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/_internal.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/_libtcod.pyi +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/bsp.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/cdef.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/cffi.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/cffi.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/color.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/console.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/constants.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/context.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/event.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/event_constants.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/image.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/libtcodpy.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/los.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/map.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/noise.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/noise.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/noise.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/path.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/path.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/path.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/py.typed +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/random.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/random.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/render.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/sdl/__init__.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/sdl/_internal.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/sdl/audio.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/sdl/constants.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/sdl/joystick.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/sdl/mouse.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/sdl/sys.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/sdl/video.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/tcod.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/tcod.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/tcod.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/tdl.c +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/tdl.h +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod/tileset.py +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod.egg-info/SOURCES.txt +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod.egg-info/dependency_links.txt +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod.egg-info/entry_points.txt +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod.egg-info/requires.txt +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tcod.egg-info/top_level.txt +0 -0
- {tcod-19.2.0 → tcod-19.3.0}/tox.ini +0 -0
|
@@ -6,6 +6,12 @@ This project adheres to [Semantic Versioning](https://semver.org/) since version
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [19.3.0] - 2025-07-26
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- `tcod.sdl.render`: Added `ScaleMode` enum and `Texture.scale_mode` attribute.
|
|
14
|
+
|
|
9
15
|
## [19.2.0] - 2025-07-20
|
|
10
16
|
|
|
11
17
|
### Added
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
from __future__ import annotations
|
|
7
7
|
|
|
8
8
|
import enum
|
|
9
|
-
from collections.abc import Sequence
|
|
10
9
|
from typing import TYPE_CHECKING, Any, Final, Literal
|
|
11
10
|
|
|
12
11
|
import numpy as np
|
|
@@ -18,6 +17,8 @@ from tcod.cffi import ffi, lib
|
|
|
18
17
|
from tcod.sdl._internal import Properties, _check, _check_p
|
|
19
18
|
|
|
20
19
|
if TYPE_CHECKING:
|
|
20
|
+
from collections.abc import Sequence
|
|
21
|
+
|
|
21
22
|
from numpy.typing import NDArray
|
|
22
23
|
|
|
23
24
|
|
|
@@ -140,6 +141,19 @@ class BlendMode(enum.IntEnum):
|
|
|
140
141
|
""""""
|
|
141
142
|
|
|
142
143
|
|
|
144
|
+
class ScaleMode(enum.IntEnum):
|
|
145
|
+
"""Texture scaling modes.
|
|
146
|
+
|
|
147
|
+
.. versionadded:: 19.3
|
|
148
|
+
"""
|
|
149
|
+
|
|
150
|
+
NEAREST = lib.SDL_SCALEMODE_NEAREST
|
|
151
|
+
"""Nearing neighbor."""
|
|
152
|
+
LINEAR = lib.SDL_SCALEMODE_LINEAR
|
|
153
|
+
"""Linier filtering."""
|
|
154
|
+
# PIXELART = lib.SDL_SCALEMODE_PIXELART # Needs SDL 3.4 # noqa: ERA001
|
|
155
|
+
|
|
156
|
+
|
|
143
157
|
def compose_blend_mode( # noqa: PLR0913
|
|
144
158
|
source_color_factor: BlendFactor,
|
|
145
159
|
dest_color_factor: BlendFactor,
|
|
@@ -173,7 +187,7 @@ class Texture:
|
|
|
173
187
|
Create a new texture using :any:`Renderer.new_texture` or :any:`Renderer.upload_texture`.
|
|
174
188
|
"""
|
|
175
189
|
|
|
176
|
-
def __init__(self, sdl_texture_p: Any, sdl_renderer_p: Any = None) -> None:
|
|
190
|
+
def __init__(self, sdl_texture_p: Any, sdl_renderer_p: Any = None) -> None: # noqa: ANN401
|
|
177
191
|
"""Encapsulate an SDL_Texture pointer. This function is private."""
|
|
178
192
|
self.p = sdl_texture_p
|
|
179
193
|
self._sdl_renderer_p = sdl_renderer_p # Keep alive.
|
|
@@ -200,6 +214,10 @@ class Texture:
|
|
|
200
214
|
return bool(self.p == other.p)
|
|
201
215
|
return NotImplemented
|
|
202
216
|
|
|
217
|
+
def __hash__(self) -> int:
|
|
218
|
+
"""Return hash for the owned pointer."""
|
|
219
|
+
return hash(self.p)
|
|
220
|
+
|
|
203
221
|
def update(self, pixels: NDArray[Any], rect: tuple[int, int, int, int] | None = None) -> None:
|
|
204
222
|
"""Update the pixel data of this texture.
|
|
205
223
|
|
|
@@ -249,6 +267,20 @@ class Texture:
|
|
|
249
267
|
def color_mod(self, rgb: tuple[int, int, int]) -> None:
|
|
250
268
|
_check(lib.SDL_SetTextureColorMod(self.p, rgb[0], rgb[1], rgb[2]))
|
|
251
269
|
|
|
270
|
+
@property
|
|
271
|
+
def scale_mode(self) -> ScaleMode:
|
|
272
|
+
"""Get or set this textures :any:`ScaleMode`.
|
|
273
|
+
|
|
274
|
+
..versionadded:: 19.3
|
|
275
|
+
"""
|
|
276
|
+
mode = ffi.new("SDL_ScaleMode*")
|
|
277
|
+
_check(lib.SDL_GetTextureScaleMode(self.p, mode))
|
|
278
|
+
return ScaleMode(mode[0])
|
|
279
|
+
|
|
280
|
+
@scale_mode.setter
|
|
281
|
+
def scale_mode(self, value: ScaleMode, /) -> None:
|
|
282
|
+
_check(lib.SDL_SetTextureScaleMode(self.p, value))
|
|
283
|
+
|
|
252
284
|
|
|
253
285
|
class _RestoreTargetContext:
|
|
254
286
|
"""A context manager which tracks the current render target and restores it on exiting."""
|
|
@@ -267,7 +299,7 @@ class _RestoreTargetContext:
|
|
|
267
299
|
class Renderer:
|
|
268
300
|
"""SDL Renderer."""
|
|
269
301
|
|
|
270
|
-
def __init__(self, sdl_renderer_p: Any) -> None:
|
|
302
|
+
def __init__(self, sdl_renderer_p: Any) -> None: # noqa: ANN401
|
|
271
303
|
"""Encapsulate an SDL_Renderer pointer. This function is private."""
|
|
272
304
|
if ffi.typeof(sdl_renderer_p) is not ffi.typeof("struct SDL_Renderer*"):
|
|
273
305
|
msg = f"Expected a {ffi.typeof('struct SDL_Window*')} type (was {ffi.typeof(sdl_renderer_p)})."
|
|
@@ -283,6 +315,10 @@ class Renderer:
|
|
|
283
315
|
return bool(self.p == other.p)
|
|
284
316
|
return NotImplemented
|
|
285
317
|
|
|
318
|
+
def __hash__(self) -> int:
|
|
319
|
+
"""Return hash for the owned pointer."""
|
|
320
|
+
return hash(self.p)
|
|
321
|
+
|
|
286
322
|
def copy( # noqa: PLR0913
|
|
287
323
|
self,
|
|
288
324
|
texture: Texture,
|
|
@@ -328,7 +364,7 @@ class Renderer:
|
|
|
328
364
|
_check(lib.SDL_SetRenderTarget(self.p, texture.p))
|
|
329
365
|
return restore
|
|
330
366
|
|
|
331
|
-
def new_texture(self, width: int, height: int, *, format: int | None = None, access: int | None = None) -> Texture:
|
|
367
|
+
def new_texture(self, width: int, height: int, *, format: int | None = None, access: int | None = None) -> Texture: # noqa: A002
|
|
332
368
|
"""Allocate and return a new Texture for this renderer.
|
|
333
369
|
|
|
334
370
|
Args:
|
|
@@ -339,13 +375,13 @@ class Renderer:
|
|
|
339
375
|
See :any:`TextureAccess` for more options.
|
|
340
376
|
"""
|
|
341
377
|
if format is None:
|
|
342
|
-
format = 0
|
|
378
|
+
format = 0 # noqa: A001
|
|
343
379
|
if access is None:
|
|
344
380
|
access = int(lib.SDL_TEXTUREACCESS_STATIC)
|
|
345
381
|
texture_p = ffi.gc(lib.SDL_CreateTexture(self.p, format, access, width, height), lib.SDL_DestroyTexture)
|
|
346
382
|
return Texture(texture_p, self.p)
|
|
347
383
|
|
|
348
|
-
def upload_texture(self, pixels: NDArray[Any], *, format: int | None = None, access: int | None = None) -> Texture:
|
|
384
|
+
def upload_texture(self, pixels: NDArray[Any], *, format: int | None = None, access: int | None = None) -> Texture: # noqa: A002
|
|
349
385
|
"""Return a new Texture from an array of pixels.
|
|
350
386
|
|
|
351
387
|
Args:
|
|
@@ -358,9 +394,9 @@ class Renderer:
|
|
|
358
394
|
assert len(pixels.shape) == 3 # noqa: PLR2004
|
|
359
395
|
assert pixels.dtype == np.uint8
|
|
360
396
|
if pixels.shape[2] == 4: # noqa: PLR2004
|
|
361
|
-
format = int(lib.SDL_PIXELFORMAT_RGBA32)
|
|
397
|
+
format = int(lib.SDL_PIXELFORMAT_RGBA32) # noqa: A001
|
|
362
398
|
elif pixels.shape[2] == 3: # noqa: PLR2004
|
|
363
|
-
format = int(lib.SDL_PIXELFORMAT_RGB24)
|
|
399
|
+
format = int(lib.SDL_PIXELFORMAT_RGB24) # noqa: A001
|
|
364
400
|
else:
|
|
365
401
|
msg = f"Can't determine the format required for an array of shape {pixels.shape}."
|
|
366
402
|
raise TypeError(msg)
|
|
@@ -502,7 +538,7 @@ class Renderer:
|
|
|
502
538
|
def viewport(self, rect: tuple[int, int, int, int] | None) -> None:
|
|
503
539
|
_check(lib.SDL_SetRenderViewport(self.p, (rect,)))
|
|
504
540
|
|
|
505
|
-
def set_vsync(self, enable: bool) -> None:
|
|
541
|
+
def set_vsync(self, enable: bool) -> None: # noqa: FBT001
|
|
506
542
|
"""Enable or disable VSync for this renderer.
|
|
507
543
|
|
|
508
544
|
.. versionadded:: 13.5
|
|
@@ -625,7 +661,7 @@ class Renderer:
|
|
|
625
661
|
.. versionadded:: 13.5
|
|
626
662
|
"""
|
|
627
663
|
rects = self._convert_array(rects, item_length=4)
|
|
628
|
-
_check(lib.SDL_RenderFillRects(self.p,
|
|
664
|
+
_check(lib.SDL_RenderFillRects(self.p, ffi.from_buffer("SDL_FRect*", rects), rects.shape[0]))
|
|
629
665
|
|
|
630
666
|
def draw_rects(self, rects: NDArray[np.number] | Sequence[tuple[float, float, float, float]]) -> None:
|
|
631
667
|
"""Draw multiple outlined rectangles from an array.
|
|
@@ -638,7 +674,7 @@ class Renderer:
|
|
|
638
674
|
rects = self._convert_array(rects, item_length=4)
|
|
639
675
|
assert len(rects.shape) == 2 # noqa: PLR2004
|
|
640
676
|
assert rects.shape[1] == 4 # noqa: PLR2004
|
|
641
|
-
_check(lib.SDL_RenderRects(self.p,
|
|
677
|
+
_check(lib.SDL_RenderRects(self.p, ffi.from_buffer("SDL_FRect*", rects), rects.shape[0]))
|
|
642
678
|
|
|
643
679
|
def draw_points(self, points: NDArray[np.number] | Sequence[tuple[float, float]]) -> None:
|
|
644
680
|
"""Draw an array of points.
|
|
@@ -649,7 +685,7 @@ class Renderer:
|
|
|
649
685
|
.. versionadded:: 13.5
|
|
650
686
|
"""
|
|
651
687
|
points = self._convert_array(points, item_length=2)
|
|
652
|
-
_check(lib.SDL_RenderPoints(self.p,
|
|
688
|
+
_check(lib.SDL_RenderPoints(self.p, ffi.from_buffer("SDL_FPoint*", points), points.shape[0]))
|
|
653
689
|
|
|
654
690
|
def draw_lines(self, points: NDArray[np.number] | Sequence[tuple[float, float]]) -> None:
|
|
655
691
|
"""Draw a connected series of lines from an array.
|
|
@@ -660,7 +696,7 @@ class Renderer:
|
|
|
660
696
|
.. versionadded:: 13.5
|
|
661
697
|
"""
|
|
662
698
|
points = self._convert_array(points, item_length=2)
|
|
663
|
-
_check(lib.SDL_RenderLines(self.p,
|
|
699
|
+
_check(lib.SDL_RenderLines(self.p, ffi.from_buffer("SDL_FPoint*", points), points.shape[0]))
|
|
664
700
|
|
|
665
701
|
def geometry(
|
|
666
702
|
self,
|
|
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
|
|
File without changes
|
|
File without changes
|