tcod 21.1.0__tar.gz → 21.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tcod-21.1.0 → tcod-21.2.1}/CHANGELOG.md +21 -0
- {tcod-21.1.0 → tcod-21.2.1}/PKG-INFO +1 -1
- {tcod-21.1.0 → tcod-21.2.1}/tcod/context.py +4 -3
- {tcod-21.1.0 → tcod-21.2.1}/tcod/event.py +70 -6
- {tcod-21.1.0 → tcod-21.2.1}/tcod/sdl/joystick.py +19 -11
- {tcod-21.1.0 → tcod-21.2.1}/tcod/version.py +3 -3
- {tcod-21.1.0 → tcod-21.2.1}/tcod.egg-info/PKG-INFO +1 -1
- {tcod-21.1.0 → tcod-21.2.1}/CONTRIBUTING.md +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/LICENSE.txt +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/MANIFEST.in +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/README.rst +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/build_libtcod.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/build_sdl.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/CHANGELOG.md +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/CMakeLists.txt +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/CONTRIBUTING.md +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/LIBTCOD-CREDITS.txt +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/LICENSE.txt +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/README.md +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/bresenham.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/bresenham_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/bsp.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/bsp_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/color.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/color.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/config.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/console.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/console.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/console_drawing.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/console_drawing.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/console_etc.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/console_etc.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/console_init.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/console_init.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/console_printing.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/console_printing.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/console_rexpaint.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/console_rexpaint.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/console_types.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/context.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/context.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/context_init.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/context_init.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/context_viewport.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/context_viewport.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/error.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/error.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/fov.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/fov_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/fov_circular_raycasting.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/fov_diamond_raycasting.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/fov_permissive2.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/fov_recursive_shadowcasting.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/fov_restrictive.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/fov_symmetric_shadowcast.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/fov_types.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/globals.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/globals.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/heapq.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/heapq.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/heightmap.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/heightmap_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/image.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/image_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/lex.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/lex_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/libtcod.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/libtcod_int.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/list.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/list_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/logging.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/logging.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/mersenne.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/mersenne_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/mersenne_types.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/mouse.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/mouse_types.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/namegen.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/namegen_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/noise.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/noise_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/noise_defaults.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/parser.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/parser_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/path.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/path_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/pathfinder.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/pathfinder.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/pathfinder_frontier.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/pathfinder_frontier.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/portability.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/random.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/random.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/renderer_sdl2.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/renderer_sdl2.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/renderer_xterm.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/renderer_xterm.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/sdl2/console_grid.glslf +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/sdl2/console_grid.glslv +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/sdl2/event.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/sys.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/sys_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/sys_sdl_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/sys_sdl_img_bmp.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/sys_sdl_img_png.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/tileset.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/tileset.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/tileset_bdf.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/tileset_bdf.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/tileset_fallback.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/tileset_fallback.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/tileset_render.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/tileset_render.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/tileset_truetype.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/tileset_truetype.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/timer.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/tree.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/tree_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/txtfield.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/txtfield_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/utility.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/version.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/wrappers.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/wrappers.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/zip.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod/zip_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/libtcod_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/khrplatform.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/lodepng.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/lodepng.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/stb.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/stb_ds.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/stb_truetype.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/utf8proc/utf8proc.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/utf8proc/utf8proc.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/utf8proc/utf8proc_data.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/zlib/adler32.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/zlib/compress.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/zlib/crc32.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/zlib/crc32.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/zlib/deflate.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/zlib/deflate.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/zlib/gzclose.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/zlib/gzguts.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/zlib/gzlib.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/zlib/gzread.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/zlib/gzwrite.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/zlib/infback.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/zlib/inffast.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/zlib/inffast.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/zlib/inffixed.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/zlib/inflate.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/zlib/inflate.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/zlib/inftrees.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/zlib/inftrees.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/zlib/trees.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/zlib/trees.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/zlib/uncompr.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/zlib/zconf.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/zlib/zlib.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/zlib/zutil.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcod/src/vendor/zlib/zutil.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/libtcodpy.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/pyproject.toml +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/requirements.txt +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/setup.cfg +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/setup.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/__init__.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/__pyinstaller/__init__.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/__pyinstaller/hook-tcod.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/_internal.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/_libtcod.pyi +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/bsp.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/cdef.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/cffi.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/cffi.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/color.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/console.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/constants.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/event_constants.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/image.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/libtcodpy.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/los.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/map.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/noise.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/noise.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/noise.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/path.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/path.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/path.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/py.typed +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/random.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/random.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/render.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/sdl/__init__.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/sdl/_internal.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/sdl/audio.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/sdl/constants.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/sdl/mouse.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/sdl/render.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/sdl/sys.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/sdl/video.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/tcod.c +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/tcod.h +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/tcod.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod/tileset.py +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod.egg-info/SOURCES.txt +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod.egg-info/dependency_links.txt +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod.egg-info/entry_points.txt +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod.egg-info/requires.txt +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tcod.egg-info/top_level.txt +0 -0
- {tcod-21.1.0 → tcod-21.2.1}/tox.ini +0 -0
|
@@ -6,6 +6,27 @@ This project adheres to [Semantic Versioning](https://semver.org/) since version
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [21.2.1] - 2026-06-04
|
|
10
|
+
|
|
11
|
+
### Deployment
|
|
12
|
+
|
|
13
|
+
- PyPy wheels switched from PyPy 3.10 to PyPy 3.11.
|
|
14
|
+
- Experimental Pyodide wheels are now uploaded to PyPI.
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- `tcod.sdl.joystick.get_joysticks`, `get_controllers`, and related enumeration passed device indices to SDL3 functions expecting instance IDs, so enumeration could fail or open the wrong device after a joystick was reconnected.
|
|
19
|
+
|
|
20
|
+
## [21.2.0] - 2026-04-04
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- `tcod.event.MouseWheel` now has `which`, `window_id`, `position` and `integer_position` attributes.
|
|
25
|
+
|
|
26
|
+
## Fixed
|
|
27
|
+
|
|
28
|
+
- `tcod.event.convert_coordinates_from_window` was not converting all types of mouse events.
|
|
29
|
+
|
|
9
30
|
## [21.1.0] - 2026-04-04
|
|
10
31
|
|
|
11
32
|
### Added
|
|
@@ -255,10 +255,11 @@ class Context:
|
|
|
255
255
|
Now returns a new event with the coordinates converted into tiles.
|
|
256
256
|
"""
|
|
257
257
|
event_copy = copy.copy(event)
|
|
258
|
-
if isinstance(event,
|
|
259
|
-
assert isinstance(event_copy,
|
|
258
|
+
if isinstance(event, tcod.event._MouseEventWithPosition):
|
|
259
|
+
assert isinstance(event_copy, tcod.event._MouseEventWithPosition)
|
|
260
260
|
event_copy.position = tcod.event.Point(*self.pixel_to_tile(event.position[0], event.position[1]))
|
|
261
|
-
event
|
|
261
|
+
if isinstance(event, tcod.event._MouseEventWithTile):
|
|
262
|
+
event._tile = tcod.event.Point(floor(event_copy.position[0]), floor(event_copy.position[1]))
|
|
262
263
|
if isinstance(event, tcod.event.MouseMotion):
|
|
263
264
|
assert isinstance(event_copy, tcod.event.MouseMotion)
|
|
264
265
|
assert event._tile is not None
|
|
@@ -89,7 +89,20 @@ import warnings
|
|
|
89
89
|
from collections.abc import Callable, Iterator, Mapping
|
|
90
90
|
from math import floor
|
|
91
91
|
from pathlib import Path
|
|
92
|
-
from typing import
|
|
92
|
+
from typing import (
|
|
93
|
+
TYPE_CHECKING,
|
|
94
|
+
Any,
|
|
95
|
+
Final,
|
|
96
|
+
Generic,
|
|
97
|
+
Literal,
|
|
98
|
+
NamedTuple,
|
|
99
|
+
Protocol,
|
|
100
|
+
TypeAlias,
|
|
101
|
+
TypedDict,
|
|
102
|
+
TypeVar,
|
|
103
|
+
overload,
|
|
104
|
+
runtime_checkable,
|
|
105
|
+
)
|
|
93
106
|
|
|
94
107
|
import attrs
|
|
95
108
|
import numpy as np
|
|
@@ -630,7 +643,7 @@ class MouseButtonEvent(Event):
|
|
|
630
643
|
"""
|
|
631
644
|
|
|
632
645
|
position: Point[float] = attrs.field(default=Point(0.0, 0.0))
|
|
633
|
-
"""The
|
|
646
|
+
"""The coordinates of the mouse."""
|
|
634
647
|
_tile: Point[int] | None = attrs.field(default=Point(0, 0), alias="tile")
|
|
635
648
|
"""The tile integer coordinates of the mouse on the screen. Deprecated."""
|
|
636
649
|
button: MouseButton
|
|
@@ -709,13 +722,63 @@ class MouseWheel(Event):
|
|
|
709
722
|
"""Vertical scrolling. A positive value means scrolling away from the user."""
|
|
710
723
|
flipped: bool
|
|
711
724
|
"""If True then the values of `x` and `y` are the opposite of their usual values.
|
|
712
|
-
This depends on the
|
|
725
|
+
This depends on the operating system settings.
|
|
726
|
+
"""
|
|
727
|
+
|
|
728
|
+
position: Point[float] = attrs.field(default=Point(0.0, 0.0))
|
|
729
|
+
"""Coordinates of the mouse for this event.
|
|
730
|
+
|
|
731
|
+
.. versionadded:: 21.2
|
|
732
|
+
"""
|
|
733
|
+
|
|
734
|
+
which: int = 0
|
|
735
|
+
"""Mouse device ID for this event.
|
|
736
|
+
|
|
737
|
+
.. versionadded:: 21.2
|
|
738
|
+
"""
|
|
739
|
+
|
|
740
|
+
window_id: int = 0
|
|
741
|
+
"""Window ID with mouse focus.
|
|
742
|
+
|
|
743
|
+
.. versionadded:: 21.2
|
|
713
744
|
"""
|
|
714
745
|
|
|
746
|
+
@property
|
|
747
|
+
def integer_position(self) -> Point[int]:
|
|
748
|
+
"""Integer coordinates of this event.
|
|
749
|
+
|
|
750
|
+
.. versionadded:: 21.2
|
|
751
|
+
"""
|
|
752
|
+
x, y = self.position
|
|
753
|
+
return Point(floor(x), floor(y))
|
|
754
|
+
|
|
715
755
|
@classmethod
|
|
716
756
|
def _from_sdl_event(cls, sdl_event: _C_SDL_Event) -> Self:
|
|
717
757
|
wheel = sdl_event.wheel
|
|
718
|
-
return cls(
|
|
758
|
+
return cls(
|
|
759
|
+
x=int(wheel.integer_x),
|
|
760
|
+
y=int(wheel.integer_y),
|
|
761
|
+
flipped=bool(wheel.direction),
|
|
762
|
+
position=Point(float(wheel.mouse_x), float(wheel.mouse_y)),
|
|
763
|
+
which=int(wheel.which),
|
|
764
|
+
window_id=int(wheel.windowID),
|
|
765
|
+
**_unpack_sdl_event(sdl_event),
|
|
766
|
+
)
|
|
767
|
+
|
|
768
|
+
|
|
769
|
+
@runtime_checkable
|
|
770
|
+
class _MouseEventWithPosition(Protocol):
|
|
771
|
+
"""Mouse event with position. Used internally to handle conversions."""
|
|
772
|
+
|
|
773
|
+
position: Point[float]
|
|
774
|
+
|
|
775
|
+
|
|
776
|
+
@runtime_checkable
|
|
777
|
+
class _MouseEventWithTile(Protocol):
|
|
778
|
+
"""Mouse event with position and deprecated tile attribute. Used internally to handle conversions."""
|
|
779
|
+
|
|
780
|
+
position: Point[float]
|
|
781
|
+
_tile: Point[int] | None
|
|
719
782
|
|
|
720
783
|
|
|
721
784
|
@attrs.define(slots=True, kw_only=True)
|
|
@@ -1742,9 +1805,10 @@ def convert_coordinates_from_window(
|
|
|
1742
1805
|
event._tile_motion = Point(
|
|
1743
1806
|
floor(position[0]) - floor(previous_position[0]), floor(position[1]) - floor(previous_position[1])
|
|
1744
1807
|
)
|
|
1745
|
-
|
|
1808
|
+
elif isinstance(event, _MouseEventWithPosition):
|
|
1746
1809
|
event.position = Point(*convert_coordinates_from_window(event.position, context, console, dest_rect))
|
|
1747
|
-
|
|
1810
|
+
if isinstance(event, _MouseEventWithTile):
|
|
1811
|
+
event._tile = Point(floor(event.position[0]), floor(event.position[1]))
|
|
1748
1812
|
return event
|
|
1749
1813
|
|
|
1750
1814
|
|
|
@@ -126,9 +126,9 @@ class Joystick:
|
|
|
126
126
|
self._by_instance_id[self.id] = self
|
|
127
127
|
|
|
128
128
|
@classmethod
|
|
129
|
-
def _open(cls,
|
|
129
|
+
def _open(cls, instance_id: int) -> Joystick:
|
|
130
130
|
tcod.sdl.sys.init(tcod.sdl.sys.Subsystem.JOYSTICK)
|
|
131
|
-
p = _check_p(ffi.gc(lib.SDL_OpenJoystick(
|
|
131
|
+
p = _check_p(ffi.gc(lib.SDL_OpenJoystick(instance_id), lib.SDL_CloseJoystick))
|
|
132
132
|
return cls(p)
|
|
133
133
|
|
|
134
134
|
@classmethod
|
|
@@ -184,8 +184,8 @@ class GameController:
|
|
|
184
184
|
self._by_instance_id[self.joystick.id] = self
|
|
185
185
|
|
|
186
186
|
@classmethod
|
|
187
|
-
def _open(cls,
|
|
188
|
-
return cls(_check_p(ffi.gc(lib.SDL_OpenGamepad(
|
|
187
|
+
def _open(cls, instance_id: int) -> GameController:
|
|
188
|
+
return cls(_check_p(ffi.gc(lib.SDL_OpenGamepad(instance_id), lib.SDL_CloseGamepad)))
|
|
189
189
|
|
|
190
190
|
@classmethod
|
|
191
191
|
def _from_instance_id(cls, instance_id: int) -> GameController:
|
|
@@ -347,17 +347,22 @@ def init() -> None:
|
|
|
347
347
|
tcod.sdl.sys.init(controller_systems)
|
|
348
348
|
|
|
349
349
|
|
|
350
|
-
def
|
|
351
|
-
"""Return the
|
|
350
|
+
def _get_instance_ids() -> list[int]:
|
|
351
|
+
"""Return the instance IDs of all attached joysticks.
|
|
352
|
+
|
|
353
|
+
SDL3's ``SDL_GetJoysticks`` returns an array of instance IDs, which is what
|
|
354
|
+
``SDL_OpenJoystick``/``SDL_OpenGamepad``/``SDL_IsGamepad`` expect. These are not
|
|
355
|
+
contiguous device indices, so they must not be replaced with ``range``.
|
|
356
|
+
"""
|
|
352
357
|
init()
|
|
353
358
|
count = ffi.new("int*")
|
|
354
|
-
lib.SDL_GetJoysticks(count)
|
|
355
|
-
return int(count[0]
|
|
359
|
+
joysticks_p = _check_p(ffi.gc(lib.SDL_GetJoysticks(count), lib.SDL_free)) # SDL_JoystickID array
|
|
360
|
+
return [int(i) for i in joysticks_p[0 : count[0]]]
|
|
356
361
|
|
|
357
362
|
|
|
358
363
|
def get_joysticks() -> list[Joystick]:
|
|
359
364
|
"""Return a list of all connected joystick devices."""
|
|
360
|
-
return [Joystick._open(
|
|
365
|
+
return [Joystick._open(instance_id) for instance_id in _get_instance_ids()]
|
|
361
366
|
|
|
362
367
|
|
|
363
368
|
def get_controllers() -> list[GameController]:
|
|
@@ -365,7 +370,7 @@ def get_controllers() -> list[GameController]:
|
|
|
365
370
|
|
|
366
371
|
This ignores joysticks without a game controller mapping.
|
|
367
372
|
"""
|
|
368
|
-
return [GameController._open(
|
|
373
|
+
return [GameController._open(instance_id) for instance_id in _get_instance_ids() if lib.SDL_IsGamepad(instance_id)]
|
|
369
374
|
|
|
370
375
|
|
|
371
376
|
def _get_all() -> list[Joystick | GameController]:
|
|
@@ -374,7 +379,10 @@ def _get_all() -> list[Joystick | GameController]:
|
|
|
374
379
|
If the joystick has a controller mapping then it is returned as a :any:`GameController`.
|
|
375
380
|
Otherwise it is returned as a :any:`Joystick`.
|
|
376
381
|
"""
|
|
377
|
-
return [
|
|
382
|
+
return [
|
|
383
|
+
GameController._open(instance_id) if lib.SDL_IsGamepad(instance_id) else Joystick._open(instance_id)
|
|
384
|
+
for instance_id in _get_instance_ids()
|
|
385
|
+
]
|
|
378
386
|
|
|
379
387
|
|
|
380
388
|
def joystick_event_state(new_state: bool | None = None) -> bool: # noqa: FBT001
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '21.1
|
|
22
|
-
__version_tuple__ = version_tuple = (21,
|
|
21
|
+
__version__ = version = '21.2.1'
|
|
22
|
+
__version_tuple__ = version_tuple = (21, 2, 1)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'gf180ef428'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|