Releases: libtcod/python-tcod
Releases · libtcod/python-tcod
19.5.0
19.4.1
Fixed
- Fixed dangling pointer in
Pathfinder.clear
method. - Fixed hang in
Pathfinder.rebuild_frontier
method.
19.4.0
Changed
- Checking "WindowSizeChanged" was not valid since SDL 3 and was also not valid in previous examples.
You must no longer check the type of theWindowResized
event.
Fixed
- Corrected some inconsistent angle brackets in the
__str__
of Event subclasses. #165 - Fix regression with window events causing them to be
Unknown
and uncheckable.
19.3.1
Solved a deprecation warning which was internal to tcod and no doubt annoyed many devs.
Thanks to jmccardle for forcing me to resolve this.
Fixed
- Silenced internal deprecation warnings within
Context.convert_event
.
19.3.0
Added
tcod.sdl.render
: AddedScaleMode
enum andTexture.scale_mode
attribute.
19.2.0
Added
tcod.noise.grid
now has theoffset
parameter for easier sampling of noise chunks.
19.1.0
Added
- Added text input support to
tcod.sdl.video.Window
which was missing since the SDL3 update.
After creating a context useassert context.sdl_window
orif context.sdl_window:
to verify that an SDL window exists then usecontext.sdl_window.start_text_input
to enable text input events.
Keep in mind that this can open an on-screen keyboard.
19.0.2
Resolve wheel deployment issue.
19.0.1
Fixed
Console.print
methods usingstring
keyword were marked as invalid instead of deprecated.
19.0.0
Finished port to SDL3, this has caused several breaking changes from SDL such as lowercase key constants now being uppercase and mouse events returning float
instead of int
.
Be sure to run Mypy on your projects to catch any issues from this update.
Changed
- Updated libtcod to 2.1.1
- Updated SDL to 3.2.16
This will cause several breaking changes such as the names of keyboard constants and other SDL enums. tcod.sdl.video.Window.grab
has been split into.mouse_grab
and.keyboard_grab
attributes.tcod.event.KeySym
single letter symbols are now all uppercase.- Relative mouse mode is set via
tcod.sdl.video.Window.relative_mouse_mode
instead oftcod.sdl.mouse.set_relative_mode
. tcod.sdl.render.new_renderer
: Removedsoftware
andtarget_textures
parameters,vsync
takesint
,driver
takesstr
instead ofint
.tcod.sdl.render.Renderer
:integer_scaling
andlogical_size
are now set withset_logical_presentation
method.tcod.sdl.render.Renderer.geometry
now takes float values forcolor
instead of 8-bit integers.tcod.event.Point
and other mouse/tile coordinate types now usefloat
instead ofint
.
SDL3 has decided that mouse events have subpixel precision.
If you see any usualfloat
types in your code then this is why.tcod.sdl.audio
has been affected by major changes to SDL3.tcod.sdl.audio.open
has new behavior due to SDL3 and should be avoided.- Callbacks which were assigned to
AudioDevice
's must now be applied toAudioStream
's instead. AudioDevice
's are now opened using references to existing devices.- Sound queueing methods were moved from
AudioDevice
to a newAudioStream
class. BasicMixer
may require manually specifyingfrequency
andchannels
to replicate old behavior.get_devices
andget_capture_devices
now returndict[str, AudioDevice]
.
TextInput
events are no longer enabled by default.
Deprecated
tcod.sdl.audio.open
was replaced with a newer API, get a default device withtcod.sdl.audio.get_default_playback().open()
.tcod.sdl.audio.BasicMixer
should be replaced withAudioStream
's.- Should no longer use
tcod.sdl.audio.AudioDevice
in a context, usecontextlib.closing
for the old behavior.
Removed
- Support dropped for Python 3.8 and 3.9.
- Removed
Joystick.get_current_power
due to SDL3 changes. WindowFlags.FULLSCREEN_DESKTOP
is now justWindowFlags.FULLSCREEN
tcod.sdl.render.Renderer.integer_scaling
removed.- Removed
callback
,spec
,queued_samples
,queue_audio
, anddequeue_audio
attributes fromtcod.sdl.audio.AudioDevice
.
Fixed
Joystick.get_ball
was broken.