Added
- new 'image' toolkit replacing some of the features previously in the 'system' toolkit.
- now windowed mode works even on 16bits desktops
- improved custom font support.
You can now use fonts with characters ordered in rows or columns and with a custom transparent color.
This allows you to use most existing character sets with the doryen library.
Font characters with grayscale are still not supported.
- new time functions:
- `uint32 TCODSystem::getElapsedMilli()`
- `float TCODSystem::getElapsedSeconds()`
- new background blending modes (see the line sample for a demo) :
- TCOD_BKGND_LIGHTEN : newbk = MAX(oldbk,curbk)
- TCOD_BKGND_DARKEN : newbk = MIN(oldbk,curbk)
- TCOD_BKGND_SCREEN : newbk = white - (white - oldbk) * (white - curbk) // inverse of multiply : (1-newbk) = (1-oldbk)*(1-curbk)
- TCOD_BKGND_COLOR_DODGE : newbk = curbk / (white - oldbk)
- TCOD_BKGND_COLOR_BURN : newbk = white - (white - oldbk) / curbk
- TCOD_BKGND_ADD : newbk = oldbk + curbk
- TCOD_BKGND_ADDALPHA(alpha) : newbk = oldbk + alpha * curbk, 0.0<=alpha<=1.0
- TCOD_BKGND_BURN : newbk = oldbk + curbk - white
- TCOD_BKGND_OVERLAY : newbk = curbk <= 0.5 ? 2*curbk*oldbk : white - 2*(white-curbk)*(white-oldbk)
- TCOD_BKGND_ALPHA(alpha) : newbk = (1.0f-alpha)*oldbk + alpha*(curbk-oldbk), 0.0<=alpha<=1.0
- The samples can now use custom bitmap fonts / screen resolution. Use following syntax :
sample_c[pp] [options]
options :
* -fullscreen : start directly in fullscreen mode
* -font <font_filename> (default "terminal.bmp")
* -font-char-size <char_width> <char_height> (default 8 8)
* -font-layout <nb_char_horiz> <nb_char_vertic> (default 16 16)
* -font-in-row : characters in the bitmap are ordered in rows (default : columns)
* -font-key-color <r> <g> <b> : transparent color, r,g,b between 0 and 255. (default 0 0 0)
* -fullscreen-resolution <width> <height> (default 640 400)
Changed
- headers renamed from `tcodlib.h*` to `libtcod.h*`
- on Linux, the library is split into `libtcod.so` and `libtcod++.so`
allowing C developers to use it without installing g++
- the font name is no more a parameter of `TCODConsole::initRoot`
- `TCODConsole::setBitmapFontSize` renamed to `TCODConsole::setCustomFont`
- `TCODConsole::printFrame` is now a variadic function, like the other text output functions
- some background blending flags have been renamed:
- `TCOD_BKGND_NOBK` replaced by `TCOD_BKGND_NONE`
- `TCOD_BKGND_BK` replaced by `TCOD_BKGND_SET`
- the fov toolkit now uses two properties per cell : `transparent`/`walkable`.
This is necessary to fix a fov issue with window cells (transparent, but not walkable).
`void TCODFov::setTransparent(int x,int y, bool isTransparent)` has been replaced by :
`void TCODFov::setProperties(int x,int y, bool isTransparent, bool isWalkable)`
- improved const correctness, added some default parameter values in the C++ API.
Fixed
- fixed the window size when using a custom font size
- fixed `TCODK_PRINTSCREEN` key event not detected
- fixed crash in printing functions if the string length was > 255.
Now they can handle strings of any size.