Releases: tomassedovic/tcod-rs
0.15.0
tcod
provides Rust bindings to libtcod -- a library for writing roguelikes.
Changes
- Fixed blank screen with SDL2 on Mojave macOS
- Added
Send
andClone
implementations forMap
- Fixed building issues on Rust 1.35
- Made
Color::new
aconst fn
Thanks
0.14.0
0.13.0
tcod
provides Rust bindings to libtcod -- a library for writing roguelikes.
Changes
- Switched to libtcod 1.6.3
- Linux: build libtcod as a static library by default (use the
tcod_sys/dynlib
feature to create a dynamic library instead) tcod::bsp::Bsp::split_recursive
now takestcod::random::Rng
by reference instead of by value
Thanks
This release was made possible by the following amazing people:
- @Gustorn
- @L3nn0x
- @laanwj
- @lucanLepus
- @Tyruiop
0.12.1
0.12.0
0.11.0
tcod
provides Rust bindings to libtcod -- a library for writing roguelikes.
Breaking change
- Renamed the
serde
feature toserialize
. This was necessary because we needed two crates under the serde feature --serde
andserde_derive
. But because a Cargo feature cannot have the same name as an existing dependency, we could not create a "serde" feature that would pull in both dependencies. Hence the rename.
Deprecation notice
- The
rustc-serialize
feature is now deprecated and will be removed from the next release. To update, change your code to using the newserialization
feature which uses Serde in the background
Other changes
- Added Console::get_default_background
- Fixed the width and height asserts in Console::rect
- Added Map::clear
- Fixed compilation issue with MSVC
- Updated to the latest Serve versions
0.10.0
- Fixed visibility issues with newer Rust
- Updated libc use on newer Rust
- Added missing asserts to the FOV functions
- Fixed the SDL linking issue on pc-windows-gnu
0.9.0
Minor fixes and a new build script based on the GCC crate.
We now support OSX and the 32 and 64 bit versions of Linux, Windows with MinGW and Windows with Visual Studio.
Nothing should break but since the build process is entirely new, we've bumped the major version of tcod_sys and the minor version of tcod.
0.8.0
Huge thanks to Gustorm and tomob! We're almost on parity with libtcod. Unfortunately, we've introduced some breaking changes.
Breaking changes
- Made the
tree
field ofTCOD_bsp_t
in tcod_sys private and added an unsafe method to access it - Changed
mut *
toconst *
in signatures of various BSP methods in tcod_sys - Changed the
tcod::input::Key
struct to allow handling special keys such as$
and#
. - Replaced
time::Duration
from the third-party time tostd::time::Duration
available in Rust 1.3 and newer
See the bottom of the notes for guides on how to port your code over.
Other changes
- Dijkstra pathfinding now passes Valgrind
- Implemented rustc-serialize for Color
- Implemented serde for Color
- Added the pseudorandom number generator bindings
- Added the name generator bindings
- Added the image toolkit bindings
- Added the line toolkit bindings
- Added the noise bindings
- Addeb the BSP toolkit bindings
- Ported the C++ libtcod samples code to Rust (see the
samples
example) - Implemented the Default and Debug traits to various structs
- implemented operator overloading traits for
std::colors::Color
- Added non-consuming iterators for pathfinding
Migrating from tcod 0.7.x
to 0.8.0
Rust 1.3
First and foremost, you will need to update to Rust 1.3 or newer because we use the newly-stabilised std::time::Duration. In general, tcod-rs tracks the stable track of Rust rather than any specific version. We aren't going to require the newest versions frivolously, but when there is a language feature or a stdlib utility we want to adopt, we will do so once it becomes stable.
Duration
Currently, std::time::Duration
has fewer utility methods. If you want to operate with the values returned by get_elapsed_time etc. you will have to either do it yourself or convert it to time::Duration
if you want that dependency.
Keyboard handling
The previous keyboard handling didn't allow handling of certain special characters and we had to change the layout of the tcod::input::Key struct to fix it.
In general, you'll need to modify your keyboard handling from:
match keypress.key {
Special(Enter) if keypress.left_alt => { // fullscreen }
Special(Escape) => { // exit game }
Key::Printable('>') => { // descend }
}
to:
match keypress {
Key { code: Enter, alt: true, .. } => { // fullscreen }
Key { code: Escape, .. } => { // exit game }
Key { printable: '>', .. } => { // descend }
}
0.7.0
- Functions taking a filesystem path now accept
&str
,Path
andString
- Added funcitons for drawing rectangles, horizontal and vertical lines, window frame and getting hight of wrapped text
- Added support for ASCII literals (
b'c'
andb"hello"
) - Support for non-ASCII values in strings
- Transparetly dispatch between ASCII and
_utf
variants of the libtcod printing functions