Skip to content

Releases: tomassedovic/tcod-rs

0.15.0

09 Jun 20:08
0ffa434
Compare
Choose a tag to compare

tcod provides Rust bindings to libtcod -- a library for writing roguelikes.

Changes

  • Fixed blank screen with SDL2 on Mojave macOS
  • Added Send and Clone implementations for Map
  • Fixed building issues on Rust 1.35
  • Made Color::new a const fn

Thanks

0.14.0

23 Apr 20:25
90fb48f
Compare
Choose a tag to compare

tcod provides Rust bindings to libtcod -- a library for writing roguelikes.

Changes

  • Add Send trait to console::Offscreen
  • Fixed links and SDL version in README

Thanks

0.13.0

19 Dec 13:35
2197448
Compare
Choose a tag to compare

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 takes tcod::random::Rng by reference instead of by value

Thanks

This release was made possible by the following amazing people:

0.12.1

12 Nov 20:48
Compare
Choose a tag to compare

tcod provides Rust bindings to libtcod -- a library for writing roguelikes.

Changes

  • Fixed the length assert for horizontal and vertical lines

0.12.0

04 Sep 20:11
Compare
Choose a tag to compare

tcod provides Rust bindings to libtcod -- a library for writing roguelikes.

Changes

  • Added the map_*_to_font functions
  • Added an example that uses graphical tiles
  • Updated to Serde 1.0
  • Fixed memory safety issue with print_frame

0.11.0

09 Mar 21:56
Compare
Choose a tag to compare

tcod provides Rust bindings to libtcod -- a library for writing roguelikes.

Breaking change

  • Renamed the serde feature to serialize. This was necessary because we needed two crates under the serde feature -- serde and serde_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 new serialization feature which uses Serde in the background

Other changes

0.10.0

21 Jun 07:00
Compare
Choose a tag to compare
  • 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

24 Feb 17:19
Compare
Choose a tag to compare

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

01 Oct 20:54
Compare
Choose a tag to compare

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 of TCOD_bsp_t in tcod_sys private and added an unsafe method to access it
  • Changed mut * to const * 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 to std::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 }
}

See issue #184 and implementation #187.

0.7.0

15 Jun 21:48
Compare
Choose a tag to compare
  • Functions taking a filesystem path now accept &str, Path and String
  • Added funcitons for drawing rectangles, horizontal and vertical lines, window frame and getting hight of wrapped text
  • Added support for ASCII literals (b'c' and b"hello")
  • Support for non-ASCII values in strings
  • Transparetly dispatch between ASCII and _utf variants of the libtcod printing functions