/libtcod-sdl-callback

A simple libtcod example of rendering custom graphics on top of the root console

Primary LanguageC++MIT LicenseMIT

Libtcod-SDL-callback

A simple example of drawing custom graphics in libtcod written in C++17 and released under the MIT License

The purpose of this code snippet to show how to display custom graphics (using SDL2) in a libtcod (https://github.com/libtcod/libtcod/) truecolour console most often used for Roguelike development. On the left is an image drawn using libtcod's conventional subcell blit2x method. On the right is the same image using the SDL callback described here (http://roguecentral.org/doryen/data/libtcod/doc/1.5.2/html2/system_sdlcbk.html)

Included is a Codeblocks project usable under Ubuntu Linux. It uses libtcod 1.11.1 (but I think it works as far back as libtcod 1.6).

To compile in other editors/IDEs include libtcod, SDL2, and SDL2_image libraries.

Comments and criticisms and more info e-mail me at davemoore22@gmail.com

Imgur