Changes relevant to the users of python-tcod are documented here.
This project adheres to Semantic Versioning since version 2.0.0
.
EventDispatch
's on event methods are now defined as positional parameters, so renaming theevent
parameter is now valid in subclasses.
- Keyboard bitmask modifiers
tcod.event.KMOD_*
have been replaced bytcod.event.Modifier
.
- Suppressed internal
mouse.tile_motion
deprecation warning.
- Fixed access violation when events are polled before SDL is initialized.
- Fixed access violation when libtcod images fail to load.
- Verify input files exist when calling
libtcodpy.parser_run
,libtcodpy.namegen_parse
,tcod.image.load
.
- Ignore the locale when encoding file paths outside of Windows.
- Fix performance when calling joystick functions.
- Fixed errors loading files on Windows where their paths are non-ASCII and the locale is not UTF-8.
- Renamed
gauss
methods to fix typos.
- Added an empty
__slots__
toEventDispatch
. - Bundle
SDL 2.28.1
on Windows and MacOS.
- Fixed "SDL failed to get a vertex buffer for this Direct3D 9 rendering batch!" #131
- Dropped support for Python 3.7.
- Added the enums
tcod.event.MouseButton
andtcod.event.MouseButtonMask
.
- Using
libtcod 1.24.0
.
- Mouse button and mask constants have been replaced by enums.
WindowResized
literal annotations were in the wrong case.
- Enabled logging for libtcod and SDL.
- Deprecated using
tcod
as an implicit alias forlibtcodpy
. You should usefrom tcod import libtcodpy
if you want to access this module. - Deprecated constants being held directly in
tcod
, get these fromtcod.libtcodpy
instead. - Deprecated
tcod.Console
which should be accessed fromtcod.console.Console
instead.
- Joystick/controller device events would raise
RuntimeError
when accessed after removal.
AudioDevice.stopped
was inverted.- Fixed the audio mixer stop and fadeout methods.
- Exceptions raised in the audio mixer callback no longer cause a messy crash, they now go to
sys.unraisablehook
.
- Added PathLike support to more libtcodpy functions.
- New
tcod.sdl.mouse.show
function for querying or setting mouse visibility. - New class method
tcod.image.Image.from_file
to load images with. This replacestcod.image_load
. tcod.sdl.audio.AudioDevice
is now a context manager.
- SDL audio conversion will now pass unconvertible floating types as float32 instead of raising.
- Deprecated the libtcodpy functions for images and noise generators.
tcod.console_set_custom_font
can no longer take bytes as the file path.
- Fix
tcod.sdl.mouse.warp_in_window
function. - Fix
TypeError: '_AudioCallbackUserdata' object is not callable
when using an SDL audio device callback. #128
- Deprecated all libtcod color constants. Replace these with your own manually defined colors. Using a color will tell you the color values of the deprecated color in the warning.
- Deprecated older scancode and keysym constants. These were replaced with the Scancode and KeySym enums.
- DLL loader could fail to load
SDL2.dll
when other tcod namespace packages were installed.
- Added support for
tcod.sdl
namespace packages.
Renderer.read_pixels
method was completely broken.
- Modified the letter case of window event types to match their type annotations.
This may cause regressions. Run Mypy to check for
[comparison-overlap]
errors. - Mouse event attributes have been changed
.pixel -> .position
and.pixel_motion -> .motion
. Context.convert_event
now returns copies of events with mouse coordinates converted into tile positions.
- Mouse event pixel and tile attributes have been deprecated.
- Added explicit support for namespace packages.
- Using
libtcod 1.23.1
. - Bundle
SDL 2.26.0
on Windows and MacOS. - Code Page 437: Character 0x7F is now assigned to 0x2302 (HOUSE).
- Forced all renderers to
RENDERER_SDL2
to fix rare graphical artifacts with OpenGL.
- The
renderer
parameter of new contexts is now deprecated.
EventDispatch
was missing new event names.
- Ported SDL2 joystick handing as
tcod.sdl.joystick
. - New joystick related events.
- Using
libtcod 1.22.3
. - Bundle
SDL 2.24.0
on Windows and MacOS.
- Renderers other than
tcod.RENDERER_SDL2
are now discouraged.
- Fixed double present bug in non-context flush functions. This was affecting performance and also caused a screen flicker whenever the global fade color was active.
- Fixed the parsing of SDL 2.24.0 headers on Windows.
- You can new use
SDLConsoleRender.atlas
to access theSDLTilesetAtlas
used to create it. #121
- Fixed the parsing of SDL 2.0.22 headers. Specifically
SDL_FLT_EPSILON
.
- SDL renderers were ignoring tiles where only the background red channel was changed.
- The SDL2 renderer has had a major performance update when compiled with SDL 2.0.18.
- SDL2 is now the default renderer to avoid rare issues with the OpenGL 2 renderer.
BasicMixer
andChannel
classes added totcod.sdl.audio
. These handle simple audio mixing.AudioDevice.convert
added to handle simple conversions to the active devices format.tcod.sdl.audio.convert_audio
added to handle any other conversions needed.
tcod.sdl.audio
, a new module exposing SDL audio devices. This does not include an audio mixer yet.tcod.sdl.mouse
, for SDL mouse and cursor handing.Context.sdl_atlas
, which provides the relevantSDLTilesetAtlas
when one is being used by the context.- Several missing features were added to
tcod.sdl.render
. Window.mouse_rect
added to SDL windows to set the mouse confinement area.
Texture.access
andTexture.blend_mode
properties now return enum instances. You can still setblend_mode
withint
but Mypy will complain.
- Adds
sdl_window
andsdl_renderer
properties to tcod contexts. - Adds
tcod.event.add_watch
andtcod.event.remove_watch
to handle SDL events via callback. - Adds the
tcod.sdl.video
module to handle SDL windows. - Adds the
tcod.sdl.render
module to handle SDL renderers. - Adds the
tcod.render
module which gives more control over the rendering of consoles and tilesets.
- Fixed handling of non-Path PathLike parameters and filepath encodings.
- New experimental renderer
tcod.context.RENDERER_XTERM
.
- Using
libtcod 1.20.1
.
- Functions accepting
Path
-like parameters now accept the more correctos.PathLike
type. - BDF files with blank lines no longer fail to load with an "Unknown keyword" error.
- New
console
parameter intcod.context.new
which sets parameters from an existing Console.
- Using
libtcod 1.20.0
.
- Fixed segfault when an OpenGL2 context fails to load.
- Gaussian number generation no longer affects the results of unrelated RNG's.
- Gaussian number generation is now reentrant and thread-safe.
- Fixed potential crash in PNG image loading.
- Added the
tcod.tileset.procedural_block_elements
function.
- Python 3.6 is no longer supported.
- Console print and drawing functions now always use absolute coordinates for negative numbers.
tcod.console_is_key_pressed
was replaced withtcod.event.get_keyboard_state
.tcod.console_from_file
is deprecated.- The
.asc
and.apf
formats are no longer actively supported.
- Fixed the parsing of SDL 2.0.16 headers.
- Scancode and KeySym enums no longer crash when SDL returns an unexpected value.
- Started uploading wheels for ARM64 macOS.
- tcod.image and tcod.tileset now support pathlib.
- Wheels for 32-bit Windows now deploy again.
- Git is no longer required to install from source.
- Fixed version mismatch when building from sources.
- Added the decoration parameter to Console.draw_frame. You may use this parameter to designate custom glyphs as the frame border.
- The handling of negative indexes given to console drawing and printing functions will be changed to be used as absolute coordinates in the future.
- The setup script should no longer fail silently when cffi is unavailable.
KeyboardEvent
's 'scancode
,sym
, andmod
attributes now use their respective enums.
- Added modernized REXPaint saving/loading functions.
tcod.console.load_xp
tcod.console.save_xp
- Using
libtcod 1.18.1
. tcod.event.KeySym
andtcod.event.Scancode
can now be hashed.
- Using
libtcod 1.17.1
.
- Fixed regression with loading PNG images.
- Fix Windows deployment.
- New keyboard enums:
tcod.event.KeySym
tcod.event.Scancode
tcod.event.Modifier
- New functions:
tcod.event.get_keyboard_state
tcod.event.get_modifier_state
- Added
tcod.console.rgb_graphic
andtcod.console.rgba_graphic
dtypes. - Another name for the Console array attributes:
Console.rgb
andConsole.rgba
.
- Using
libtcod 1.17.0
.
Console_tiles_rgb
is being renamed toConsole.rgb
.Console_tiles
being renamed toConsole.rgba
.
- Contexts now give a more useful error when pickled.
- Fixed regressions with
tcod.console_print_frame
andConsole.print_frame
when given empty strings as the banner.
- Added
tcod.noise.Algorithm
andtcod.noise.Implementation
enums. - Added
tcod.noise.grid
helper function.
- The non-enum noise implementation names have been deprecated.
- Indexing Noise classes now works with the FBM implementation.
- Added package-level PyInstaller hook.
- Using
libtcod 1.16.7
. tcod.path.dijkstra2d
now returns the output and accepts anout
parameter.
- In the future
tcod.path.dijkstra2d
will no longer modify the input by default. Until then anout
parameter must be given.
- Fixed crashes from loading tilesets with non-square tile sizes.
- Tilesets with a size of 0 should no longer crash when used.
- Prevent division by zero from recommended-console-size functions.
- Now includes PyInstaller hooks within the package itself.
- The Random class will now warn if the seed it's given will not used deterministically. It will no longer accept non-integer seeds in the future.
- Now bundles SDL 2.0.14 for MacOS.
tcod.event
can now detect and will warn about uninitialized tile attributes on mouse events.
- Python 3.5 is no longer supported.
- The
tdl
module has been dropped.
- Some wheels had broken version metadata.
- Now bundles SDL 2.0.10 for MacOS and SDL 2.0.14 for Windows.
- MacOS wheels were failing to bundle dependencies for SDL2.
- MacOS wheels failed to deploy for the previous version.
- Added the important
order
parameter toContext.new_console
.
- Now bundles SDL 2.0.14 for Windows/MacOS.
- Support for Python 3.5 will be dropped.
tcod.console_load_xp
has been deprecated,tcod.console_from_xp
can load these files without modifying an existing console.
tcod.console_from_xp
now has better error handling (instead of crashing.)- Can now compile with SDL 2.0.14 headers.
- Fixed missing
tcod.FOV_SYMMETRIC_SHADOWCAST
constant. - Fixed regression in
tcod.sys_get_current_resolution
behavior. This function now returns the monitor resolution as was previously expected.
- Code points from the Private Use Area will now print correctly.
- New context method
Context.new_console
.
- Using
libtcod 1.16.0-alpha.15
.
- New FOV implementation:
tcod.FOV_SYMMETRIC_SHADOWCAST
.
- Using
libtcod 1.16.0-alpha.14
.
- Changed context deprecations to PendingDeprecationWarning to reduce mass panic from tutorial followers.
- Fixed garbled titles and crashing on some platforms.
- Added
tcod.context.new
function. - Contexts now support a CLI.
- You can now provide the window x,y position when making contexts.
tcod.noise.Noise
instances can now be indexed to generate noise maps.
- Using
libtcod 1.16.0-alpha.13
. - The OpenGL 2 renderer can now use
SDL_HINT_RENDER_SCALE_QUALITY
to determine the tileset upscaling filter. - Improved performance of the FOV_BASIC algorithm.
tcod.context.new_window
andtcod.context.new_terminal
have been replaced bytcod.context.new
.
- Pathfinders will now work with boolean arrays.
- Console blits now ignore alpha compositing which would result in division by zero.
tcod.console_is_key_pressed
should work even if libtcod events are ignored.- The
TCOD_RENDERER
andTCOD_VSYNC
environment variables should work now. FOV_PERMISSIVE
algorithm is now reentrant.
tcod.tileset.Tileset.remap
, codepoint and index were swapped.
tcod.path.dijkstra2d
, fixed corrupted output with int8 arrays.
tcod.event.EventDispatch
now uses the absolute names for event type hints so that IDE's can better auto-complete method overrides.
- Fixed libtcodpy heightmap data alignment issues on non-square maps.
tcod.path.SimpleGraph
for pathfinding on simple 2D arrays.
tcod.path.CustomGraph
now accepts anorder
parameter.
- New
tcod.los
module for NumPy-based line-of-sight algorithms. Includestcod.los.bresenham
.
tcod.line_where
andtcod.line_iter
have been deprecated.
console_init_root
andconsole_set_custom_font
have been replaced by the modern API.- All functions which handle SDL windows without a context are deprecated.
- All functions which modify a globally active tileset are deprecated.
tcod.map.Map
is deprecated, NumPy arrays should be passed to functions directly instead of through this class.
- Install requirements will no longer try to downgrade
cffi
.
cffi
requirement has been updated to version1.13.0
. The older versions raise TypeError's.
- SDL related errors during package installation are now more readable.
tcod.event.EventDispatch
:ev_*
methods now allowOptional[T]
return types.
tcod.path
: NewPathfinder
andCustomGraph
classes.
- Added
edge_map
parameter totcod.path.dijkstra2d
andtcod.path.hillclimb2d
.
- tcod.console_init_root` and context initializing functions were not raising exceptions on failure.
- Prevent adding non-existent 2nd halves to potential double-wide charterers.
- Added
tcod.context
module. You now have more options for making libtcod controlled contexts. tcod.tileset.load_tilesheet
: Load a simple tilesheet as a Tileset.Tileset.remap
: Reassign codepoints to tiles on a Tileset.tcod.tileset.CHARMAP_CP437
: Character mapping forload_tilesheet
.tcod.tileset.CHARMAP_TCOD
: Older libtcod layout.
EventDispatch.dispatch
can now return the values returned by theev_*
methods. The class is now generic to support type checking these values.- Event mouse coordinates are now strictly int types.
- Submodules are now implicitly imported.
- Using
libtcod 1.16.0-alpha.10
.
- Fixed characters being dropped when color codes were used.
- Using
libtcod 1.16.0-alpha.9
.
FOV_DIAMOND
andFOV_RESTRICTIVE
algorithms are now reentrant. libtcod#48- The
TCOD_VSYNC
environment variable was being ignored.
- Using
libtcod 1.16.0-alpha.8
.
- Changing the active tileset now redraws tiles correctly on the next frame.
- Added
Console.close
as a more obvious way to close the active window of a root console.
- GCC is no longer needed to compile the library on Windows.
- Using
libtcod 1.16.0-alpha.7
. tcod.console_flush
will now accept an RGB tuple as aclear_color
.
- Changing the active tileset will now properly show it on the next render.
- Added
tcod.tileset.load_bdf
, you can now load BDF fonts. tcod.tileset.set_default
andtcod.tileset.get_default
are now stable.
- Using
libtcod 1.16.0-alpha.6
.
- The
snap_to_integer
parameter intcod.console_flush
has been deprecated since it can cause minor scaling issues which don't exist when usinginteger_scaling
instead.
- Fixed segfault after the Tileset returned by
tcod.tileset.get_default
goes out of scope.
- Using
libtcod 1.16.0-alpha.5
. - Mouse tile coordinates are now always zero before the first call to
tcod.console_flush
.
- New method
Tileset.render
renders an RGBA NumPy array from a tileset and a console.
- Prevent KeyError when representing unusual keyboard symbol constants.
- Using
libtcod 1.16.0-alpha.4
.
- Mouse tile coordinates are now correct on any resized window.
- Added
tcod.console.recommended_size
for when you want to change your main console size at runtime. - Added
Console.tiles_rgb
as a replacement forConsole.tiles2
.
- Using
libtcod 1.16.0-alpha.3
. - Added parameters to
tcod.console_flush
, you can now manually provide a console and adjust how it is presented.
Console.tiles2
is deprecated in favour ofConsole.tiles_rgb
.Console.buffer
is now deprecated in favour ofConsole.tiles
, instead of the other way around.
- Fixed keyboard state and mouse state functions losing state when events were flushed.
- Fixed regression in
tcod.console_clear
.
- Fixed regression in
Console.draw_frame
. - The wavelet noise generator now excludes -1.0f and 1.0f as return values.
- Fixed console fading color regression.
- Using
libtcod 1.16.0-alpha.2
. - When a renderer fails to load it will now fallback to a different one. The order is: OPENGL2 -> OPENGL -> SDL2.
- The default renderer is now SDL2.
- The SDL and OPENGL renderers are no longer deprecated, but they now point to slightly different backward compatible implementations.
- The use of
libtcod.cfg
andterminal.png
is deprecated.
tcod.sys_update_char
now works with the newer renderers.- Fixed buffer overflow in name generator.
tcod.image_from_console
now works with the newer renderers.- New renderers now auto-load fonts from
libtcod.cfg
orterminal.png
.
- Console blit operations now perform per-cell alpha transparency.
- Python 3.8 wheels failed to deploy.
- Quarter block elements are now rendered using Unicode instead of a custom encoding.
OPENGL
andGLSL
renderers were not properly clearing space characters.
- Uploaded Python 3.8 wheels to PyPI.
- Added
__array_interface__
to the Image class. - Added
Console.draw_semigraphics
as a replacement for blit_2x functions.draw_semigraphics
can handle array-like objects. Image.from_array
class method creates an Image from an array-like object.tcod.image.load
loads a PNG file as an RGBA array.
Console.tiles
is now namedConsole.buffer
.
- New attribute
Console.tiles2
is similar toConsole.tiles
but without an alpha channel.
- Fixed a regression preventing PyInstaller distributions from loading SDL2.
tcod.path.dijkstra2d
: Computes Dijkstra from an arbitrary initial state.tcod.path.hillclimb2d
: Returns a path from a distance array.tcod.path.maxarray
: Creates arrays filled with maximum finite values.
- Changing the tiles of an active tileset on OPENGL2 will no longer leave temporary artifact tiles.
- It's now harder to accidentally import tcod's internal modules.
- Now bundles SDL 2.0.10 for Windows/MacOS.
- Can now parse SDL 2.0.10 headers during installation without crashing.
- Using an out-of-bounds index for field-of-view operations now raises a warning, which will later become an error.
- Changing the tiles of an active tileset will now work correctly.
- You can now set the
TCOD_RENDERER
andTCOD_VSYNC
environment variables to force specific options to be used. Example:TCOD_RENDERER=sdl2 TCOD_VSYNC=1
tcod.sys_set_renderer
now raises an exception if it fails.
tcod.console_map_ascii_code_to_font
functions will now work when called beforetcod.console_init_root
.
- You no longer need OpenGL to build python-tcod.
- Better runtime checks for Windows dependencies should now give distinct errors depending on if the issue is SDL2 or missing redistributables.
- Changed NumPy type hints from
np.array
tonp.ndarray
which should resolve issues.
tcod.map.compute_fov
now takes a 2-item tuple instead of separatex
andy
parameters. This causes less confusion over how axes are aligned.
- Better string representations for
tcod.event.Event
subclasses.
- Fixed regressions in text alignment for non-rectangle print functions.
tcod.console_init_root
now has an optionalvsync
parameter.
- Fixed shader compilation issues in the OPENGL2 renderer.
- Fallback fonts should fail less on Linux.
- Now depends on cffi 0.12 or later.
tcod.console_init_root
andtcod.console_set_custom_font
will raise exceptions instead of terminating.- Fixed issues preventing
tcod.event
from working on 32-bit Windows.
- Corrected bounding box issues with the
Console.print_box
method.
- Resolved Color warnings when importing tcod.
- When compiling, fixed a name conflict with endianness macros on FreeBSD.
- Fixed horizontal alignment for TrueType fonts.
- Fixed taking screenshots with the older SDL renderer.
- New
Console.tiles
array attribute.
Console.DTYPE
changed to add alpha to its color types.
- Console printing was ignoring color codes at the beginning of a string.
- The SDL2/OPENGL2 renderers can potentially use a fall-back font when none are provided.
- New function
tcod.event.get_mouse_state
. - New function
tcod.map.compute_fov
lets you get a visibility array directly from a transparency array.
- The following functions and classes have been deprecated.
tcod.Key
tcod.Mouse
tcod.mouse_get_status
tcod.console_is_window_closed
tcod.console_check_for_keypress
tcod.console_wait_for_keypress
tcod.console_delete
tcod.sys_check_for_event
tcod.sys_wait_for_event
- The SDL, OPENGL, and GLSL renderers have been deprecated.
- Many libtcodpy functions have been marked with PendingDeprecationWarning's.
- To be more compatible with libtcodpy
tcod.console_init_root
will default to the SDL render, but will raise warnings when an old renderer is used.
- Fixed
tcod.namegen_generate_custom
.
- The
tcod
package is has been marked as typed and will now work with MyPy.
- The behavior for negative indexes on the new print functions may change in the future.
- Methods and functionality preventing
tcod.Color
from behaving like a tuple have been deprecated.
Console.print_box
wasn't setting the background color by default.
tcod.sys_get_char_size
fixed on the new renderers.
- New
tcod.console.get_height_rect
function, which can be used to get the height of a print call without an existing console. - New
tcod.tileset
module, with aset_truetype_font
function.
- The new print methods now handle alignment according to how they were documented.
SDL2
andOPENGL2
now support screenshots.- Windows and MacOS builds now restrict exported SDL2 symbols to only SDL 2.0.5; This will avoid hard to debug import errors when the wrong version of SDL is dynamically linked.
- The root console now starts with a white foreground.
- Added the
tcod.random.MULTIPLY_WITH_CARRY
constant.
- The overhead for warnings has been reduced when running Python with the
optimize
-O
flag. tcod.random.Random
now provides a default algorithm.
- New console methods now default to an
fg
andbg
of None instead of white-on-black.
tcod.console.Console
now supportsstr
andrepr
.- Added new Console methods which are independent from the console defaults.
- You can now give an array when initializing a
tcod.console.Console
instance. Console.clear
can now takech
,fg
, andbg
parameters.
- Updated libtcod to 1.10.6
- Printing generates more compact layouts.
- Most libtcodpy console functions have been replaced by the tcod.console module.
- Deprecated the
set_key_color
functions. You can pass key colors toConsole.blit
instead. Console.clear
should be given the colors to clear with as parameters, rather than by usingdefault_fg
ordefault_bg
.- Most functions which depend on console default values have been deprecated. The new deprecation warnings will give details on how to make default values explicit.
tcod.console.Console.blit
was ignoring the key color set byConsole.set_key_color
.- The
SDL2
andOPENGL2
renders can now large numbers of tiles.
- Updated libtcod to 1.10.5
- The SDL2/OPENGL2 renderers will now auto-detect a custom fonts key-color.
- The tdl module has been deprecated.
- The libtcodpy parser functions have been deprecated.
tcod.image_is_pixel_transparent
andtcod.image_get_alpha
now return values.Console.print_frame
was clearing tiles outside if its bounds.- The
FONT_LAYOUT_CP437
layout was incorrect.
- Window event types were not upper-case.
- Fixed regression where libtcodpy mouse wheel events unset mouse coordinates.
- Added tcod.event module, based off of the sdlevent.py shim.
- Updated libtcod to 1.10.3
- Fixed libtcodpy
struct_add_value_list
function. - Use correct math for tile-based delta in mouse events.
- New renderers now support tile-based mouse coordinates.
- SDL2 renderer will now properly refresh after the window is resized.
- Fixed rare access violations for some functions which took strings as
parameters, such as
tcod.console_init_root
.
- libtcodpy key and mouse functions will no longer accept the wrong types.
- The
new_struct
method was not being called for libtcodpy's custom parsers.
- Added BSP traversal methods in tcod.bsp for parity with libtcodpy.
- Already deprecated bsp functions are now even more deprecated.
- New layout
tcod.FONT_LAYOUT_CP437
.
- Updated libtcod to 1.10.2
tcod.console_print_frame
andConsole.print_frame
now support Unicode strings.
- Deprecated using bytes strings for all printing functions.
- Console objects are now initialized with spaces. This fixes some blit operations.
- Unicode code-points above U+FFFF will now work on all platforms.
- Printing a frame with an empty string no longer displays a title bar.
- Heightmap functions now support 'F_CONTIGUOUS' arrays.
tcod.heightmap_new
now has anorder
parameter.- Updated SDL to 2.0.9
- Deprecated heightmap functions which sample noise grids, this can be done
using the
Noise.sample_ogrid
method.
- The default renderer can now be anything if not set manually.
- Better error message for when a font file isn't found.
- Building from source was failing because
console_2tris.glsl*
was missing from source distributions.
- New
RENDERER_SDL2
andRENDERER_OPENGL2
renderers.
- Updated libtcod to 1.9.0
- Now requires SDL 2.0.5, which is not trivially installable on Ubuntu 16.04 LTS.
- Dropped support for Python versions before 3.5
- Dropped support for MacOS versions before 10.9 Mavericks.
- The root console no longer loses track of buffers and console defaults on a renderer change.
- Replaced missing wheels for older and 32-bit versions of MacOS.
- Resolved CDefError error during source installs.
- tcod.Key right-hand modifiers are now set independently at initialization, instead of mirroring the left-hand modifier value.
- tcod.Key and tcod.Mouse no longer ignore initiation parameters.
- Fixed color constants missing at build-time.
- Source distributions were missing C++ source files.
- Project renamed to tcod on PyPI.
- Passing bytes strings to libtcodpy print functions is deprecated.
- Fixed libtcodpy print functions not accepting bytes strings.
- libtcod constants are now generated at build-time fixing static analysis tools.
- tdl.event no longer crashes with StopIteration on Python 3.7
- tcod.path: all classes now use
shape
instead ofwidth
andheight
. - tcod.path now respects NumPy array shape, instead of assuming that arrays
need to be transposed from C memory order. From now on
x
andy
mean 1st and 2nd axis. This doesn't affect non-NumPy code. - tcod.path now has full support of non-contiguous memory.
- New function
tcod.line_where
for indexing NumPy arrays using a Bresenham line.
- Python 2.7 support will be dropped in the near future.
- New wheels for Python3.7 on Windows.
- Arrays from
tcod.heightmap_new
are now properly zeroed out.
- Deprecated all libtcodpy map functions.
tcod.map_copy
could break thetcod.map.Map
class.tcod.map_clear
transparent
andwalkable
parameters were reversed.- When multiple SDL2 headers were installed, the wrong ones would be used when the library is built.
- Fails to build via pip unless Numpy is installed first.
- Updated libtcod to v1.7.0
- Updated SDL to v2.0.8
- Error messages when failing to create an SDL window should be a less vague.
- You no longer need to initialize libtcod before you can print to an off-screen console.
- Avoid crashes if the root console has a character code higher than expected.
- No more debug output when loading fonts.
- Added the libtcodpy module as an alias for tcod. Actual use of it is deprecated, it exists primarily for backward compatibility.
- Adding missing libtcodpy functions
console_has_mouse_focus
andconsole_is_active
.
- Updated libtcod to v1.6.6
- Deprecated the use of falsy console parameters with libtcodpy functions.
- Fixed libtcodpy image functions not supporting falsy console parameters.
- Fixed tdl
Window.get_char
method. (Kaczor2704)
- Fixed cffi.api.FFIError "unsupported expression: expected a simple numeric constant" error when building on platforms with an older cffi module and newer SDL headers.
- tcod/tdl Map and Console objects were not saving stride data when pickled.
- You can now set the numpy memory order on tcod.console.Console, tcod.map.Map, and tdl.map.Map objects well as from the tcod.console_init_root function.
- The
console_init_root
title
parameter is now optional.
- OpenGL renderer alpha blending is now consistent with all other render modes.
- Fixed setup.py regression that could prevent building outside of the git repository.
- The Windows dynamic linker will now prefer the bundled version of SDL. This fixes: "ImportError: DLL load failed: The specified procedure could not be found."
key.c
is no longer set whenkey.vk == KEY_TEXT
, this fixes a regression which was causing events to be heard twice in the libtcod/Python tutorial.
- Updated libtcod backend to v1.6.4
- Updated SDL to v2.0.7 for Windows/MacOS.
- Source distributions no longer include tests, examples, or fonts. Find these on GitHub.
- Fixed "final link failed: Nonrepresentable section on output" error when compiling for Linux.
tcod.console_init_root
defaults to the SDL renderer, other renderers cause issues with mouse movement events.
- Fixed
ConsoleBuffer.blit
regression. - Console defaults corrected, the root console's blend mode and alignment is the default value for newly made Console's.
- You can give a byte string as a filename to load parsers.
- tdl Map class can now be pickled.
- Added protection to the
transparent
,walkable
, andfov
attributes in tcod and tdl Map classes, to prevent them from being accidentally overridden. - tcod and tdl Map classes now use numpy arrays as their attributes.
- tdl: Fixed NameError in
set_fps
.
- tcod.bsp:
BSP.split_recursive
parameterrandom
is nowseed
. - tcod.console:
Console.blit
parameters have been rearranged. Most of the parameters are now optional. - tcod.noise:
Noise.__init__
parameterrand
is now namedseed
. - tdl: Changed
set_fps
parameter name tofps
.
- tcod.bsp: Corrected spelling of max_vertical_ratio.
- Merged libtcod-cffi dependency with TDL.
- Fixed boolean related crashes with Key 'text' events.
- tdl.noise: Fixed crash when given a negative seed. As well as cases where an instance could lose its seed being pickled.
- You can now pass tdl Console instances as parameters to libtcod-cffi functions expecting a tcod Console.
- Dependencies updated:
libtcod-cffi>=2.5.0,<3
- The
Console.tcod_console
attribute is being renamed toConsole.console_c
.
- The tdl.noise and tdl.map modules will be deprecated in the future.
- Resolved crash-on-exit issues for Windows platforms.
- Dependencies updated:
libtcod-cffi>=2.4.3,<3
- You can now create Console instances before a call to
tdl.init
.
- Dropped support for Python 3.3
- Resolved issues with MacOS builds.
- 'OpenGL' and 'GLSL' renderers work again.
KeyEvent
's withtext
now have all their modifier keys set to False.
- Undefined behavior in text events caused crashes on 32-bit builds.
KeyEvent
supports libtcod text and meta keys.
KeyEvent
parameters have been moved.- This version requires
libtcod-cffi>=2.3.0
.
KeyEvent
camel capped attribute names are deprecated.
- Crashes with key-codes undefined by libtcod.
tdl.map
typedef issues with libtcod-cffi.
tdl.init
renderer was defaulted to OpenGL which is not supported in the current version of libtcod.
- Dependencies updated, tdl now requires libtcod-cffi 2.x.x
- Some event behaviors have changed with SDL2, event keys might be different than what you expect.
- Key repeat functions were removed from SDL2.
set_key_repeat
is now stubbed, and does nothing.
- Console.blit methods can now take fg_alpha and bg_alpha parameters.
- set_font no longer crashes when loading a file without the implied font size in its name
- Fixed non-square Map instances
- Fixed errors with Unicode and non-Unicode literals on Python 2
- Fixed attribute error in compute_fov
- python-tdl distributions are now universal builds
- New Map class
- map.bresenham now returns a list
- This release will require libtcod-cffi v0.2.3 or later
- The DLL's have been moved into another library which you can find at https://github.com/HexDecimal/libtcod-cffi You can use this library to have some raw access to libtcod if you want. Plus it can be used alongside TDL.
- The libtcod console objects in Console instances have been made public.
- Added tdl.event.wait function. This function can called with a timeout and can automatically call tdl.flush.
- Fixed pathfinding regressions.
- Updated backend to use python-cffi instead of ctypes. This gives decent boost to speed in CPython and a drastic to boost in speed in PyPy.
- The setcolors method now changes the default colors used by the draw* methods. You can use Python's Ellipsis to explicitly select default colors this way.
- Functions and Methods renamed to match Python's style-guide PEP 8, the old function names still exist and are depreciated.
- The fgcolor and bgcolor parameters have been shortened to fg and bg.
- Noise generator now seeds properly.
- The OS event queue will now be handled during a call to tdl.flush. This prevents a common newbie programmer hang where events are handled infrequently during long animations, simulations, or early development.
- Fixed a major bug that would cause a crash in later versions of Python 3
- Fixed a race condition when importing on some platforms.
- Fixed a type issue with quickFOV on Linux.
- Added a bresenham function to the tdl.map module.
- A for loop can iterate over all coordinates of a Console.
- drawStr can be configured to scroll or raise an error.
- You can now configure or disable key repeating with tdl.event.setKeyRepeat
- Typewriter class removed, use a Window instance for the same functionality.
- setColors method fixed.
- Merged the Typewriter and MetaConsole classes, You now have a virtual cursor with Console and Window objects.
- Fixed the clear method on the Window class.
- Fixed screenshot function.
- Fixed some drawing operations with unchanging backgrounds.
- Instances of Console and Noise can be pickled and copied.
- Added KeyEvent.keychar
- Fixed event.keyWait, and now converts window closed events into Alt+F4.
- Some of the setFont parameters were incorrectly labeled and documented.
- setFont can auto-detect tilesets if the font sizes are in the filenames.
- Added some X11 unicode tilesets, including Unifont.
- Window title now defaults to the running scripts filename.
- Fixed incorrect deltaTime for App.update
- App will no longer call tdl.flush on its own, you'll need to call this yourself.
- tdl.noise module added.
- clear method now defaults to black on black.
- Map submodule added with AStar class and quickFOV function.
- New Typewriter class.
- Most console functions can use Python-style negative indexes now.
- New App.runOnce method.
- Rectangle geometry is less strict.
- KeyEvent.keyname is now KeyEvent.key
- MouseButtonEvent.button now behaves like KeyEvent.keyname does.
- event.App class added.
- Drawing methods no longer have a default for the character parameter.
- KeyEvent.ctrl is now KeyEvent.control
- No longer works in Python 2.5 but now works in 3.x and has been partly tested.
- Many bug fixes.
- Got rid of setuptools dependency, this will make it much more compatible with Python 3.x
- Fixed a typo with the MacOS library import.
- All constant colors (C_*) have been removed, they may be put back in later.
- Made some type assertion failures show the value they received to help in general debugging. Still working on it.
- Added MacOS and 64-bit Linux support.
- First public release.