I am trying to add graphical tiles to my roguelike using the tcod-rs library.
The root console's put_char_ex
function (or the C version, TCOD_putwchar
) both take only char
s. To use tiles, as per the Python tutorial, you must use tile numbers higher than 256 because the default bitmap font has 256 characters. char
cannot represent these high numbers, so I'm stuck. How should I do this?
The
Console::put_char_ex
method indeed takeschar
. However, Rust'schar
is not the same as C's:You should be able to fit whatever numeric value you need.
Note that
put_char_ex
actually callsffi::TCOD_console_put_char_ex
; I'm not sure whereTCOD_putwchar
came from.