Skip to content

Tags: libtcod/python-tcod

Tags

21.0.0

Toggle 21.0.0's commit message

Verified

This tag was signed with the committer’s verified signature.
HexDecimal Kyle Benesch
21.0.0

- `tcod.sdl.video.Window` now accepts an SDL WindowID.
- `tcod.event`:
  - `MouseState.integer_position` and `MouseMotion.integer_motion` to handle cases where integer values are preferred.
  - `ClipboardUpdate` event.
  - `Drop` event.
  - `KeyboardEvent.pressed`, `KeyboardEvent.which`, `KeyboardEvent.window_id` attributes.
  - `WindowEvent.data` and `WindowEvent.window_id` attributes and added missing SDL3 window events.
  - `which` and `window_id` attributes for mouse events.
  - Events now have `Event.timestamp` and `Event.timestamp_ns` which use SDL's timer at `tcod.event.time` and `tcod.event.time_ns`.

- Event classes are now more strict with attribute types
- Event class initializers are keyword-only and no longer take a type parameter, with exceptions.
  Generally event class initialization is an internal process.
- `MouseButtonEvent` no longer a subclass of `MouseState`.
- `tcod.event.Point` is now a generic type containing `int` or `float` values depending on the context.
- When converting mouse events to tiles:
  `MouseState.position` and `MouseMotion.motion` refers to sub-tile coordinates.
  `MouseState.integer_position` and `MouseMotion.integer_motion` refers to integer tile coordinates.

- `Event.type` is deprecated except for special cases such as `ControllerDevice`, `WindowEvent`, etc.
- `MouseButtonEvent.state` is deprecated, replaced by the existing `.button` attribute.

- Fixed incorrect C FFI types inside `tcod.event.get_mouse_state`.
- Fixed regression in mouse event tile coordinates being `float` instead of `int`.
  `convert_coordinates_from_window` can be used if sub-tile coordinates were desired.
- Fixed regression in `libtcodpy.bsp_split_recursive` not accepting `0`.

20.1.0

Toggle 20.1.0's commit message

Verified

This tag was signed with the committer’s verified signature.
HexDecimal Kyle Benesch
20.1.0

- `Tileset` now supports `MutableMapping` semantics.
  Can get, set, or iterate over tiles as if it were a dictionary containing tile glyph arrays.
  Also supports `+`, `|`, `+=`, and `|=` with other tilesets or mappings to merge them into a single Tileset.
- `tcod.tileset.procedural_block_elements` can take a tile shape and return a tileset.

- `Tileset.set_tile(codepoint, tile)` was replaced with `tileset[codepoint] = tile` syntax.
- `Tileset.get_tile(codepoint)` was soft replaced with `tileset[codepoint]` syntax.
- `tcod.tileset.procedural_block_elements` should be used with dictionary semantics instead of passing in a tileset.

20.0.0

Toggle 20.0.0's commit message

Verified

This tag was signed with the committer’s verified signature.
HexDecimal Kyle Benesch
20.0.0

- Now supports free-threaded Python, deploys with `cp314t` wheels.
- Added methods: `Renderer.coordinates_from_window` and `Renderer.coordinates_to_window`
- Added `tcod.event.convert_coordinates_from_window`.

- `Renderer.logical_size` now returns `None` instead of `(0, 0)` when logical size is unset.

19.6.3

Toggle 19.6.3's commit message

Verified

This tag was signed with the committer’s verified signature.
HexDecimal Kyle Benesch
19.6.3

Fix missing deployment

19.6.2

Toggle 19.6.2's commit message

Verified

This tag was signed with the committer’s verified signature.
HexDecimal Kyle Benesch
19.6.2

- Update to libtcod 2.2.2

- Mouse coordinate to tile conversions now support SDL renderer logical size and scaling.

19.6.1

Toggle 19.6.1's commit message

Verified

This tag was signed with the committer’s verified signature.
HexDecimal Kyle Benesch
19.6.1

- `tcod.event.add_watch` was crashing due to a cdef type mismatch.

19.6.0

Toggle 19.6.0's commit message

Verified

This tag was signed with the committer’s verified signature.
HexDecimal Kyle Benesch
19.6.0

- Alternative syntax for number symbols with `KeySym`, can now specify `KeySym["3"]`, etc.
  Only available on Python 3.13 or later.

- Fixed regression with lowercase key symbols with `tcod.event.K_*` and `KeySym.*` constants, these are still deprecated.
  Event constants are only fixed for `tcod.event.K_*`, not the undocumented `tcod.event_constants` module.
  Lowercase `KeySym.*` constants are only available on Python 3.13 or later.
- `BSP.split_recursive` did not accept a `Random` class as the seed. #168

19.5.0

Toggle 19.5.0's commit message

Verified

This tag was signed with the committer’s verified signature.
HexDecimal Kyle Benesch
19.5.0

- Update to libtcod 2.2.1.
- Scaling defaults to nearest, set `os.environ["SDL_RENDER_SCALE_QUALITY"] = "linear"` if linear scaling was preferred.

- `SDL_RENDER_SCALE_QUALITY` is now respected again since the change to SDL3.
- Fixed crash on controller events.

19.4.1

Toggle 19.4.1's commit message

Verified

This tag was signed with the committer’s verified signature.
HexDecimal Kyle Benesch
19.4.1

- Fixed dangling pointer in `Pathfinder.clear` method.
- Fixed hang in `Pathfinder.rebuild_frontier` method.

19.4.0

Toggle 19.4.0's commit message

Verified

This tag was signed with the committer’s verified signature.
HexDecimal Kyle Benesch
19.4.0

- Checking "WindowSizeChanged" was not valid since SDL 3 and was also not valid in previous examples.
  You must no longer check the type of the `WindowResized` event.

- Corrected some inconsistent angle brackets in the `__str__` of Event subclasses. #165
- Fix regression with window events causing them to be `Unknown` and uncheckable.