2011
09.07

ascii-animator is now officially shipped with libtcod. Upgrade you svn version and check the ascii-paint/ directory. You can easily export libtcod’s console to either asc or apf file format and as easily import those files into an offscreen console.

Right now, only single layer APF files are supported (in case of multi-layers files, only the last layer will be used). Multi-layers support to come later.

You can export an apf “screenshot” in the C++ sample by pressing Alt-PrintScreen (or Alt-P on Linux). The functions involved are :

TCODConsole::TCODConsole(const char *filename);
bool TCODConsole::loadApf(const char *filename);
bool TCODConsole::saveApf(const char *filename) const;

When using loadApf, the console is resized to fit the apf file dimensions.

Also, the ascii-animator version embedded in libtcod won’t probably evolve as fast as eigenbom’s version but embedding it was the easiest way to ensure compatibility.

[update] in fact, the constructor doesn’t work with apf files yet. To load an apf file into a new offscreen console, you have to create a console first (use 1,1 as dimensions for example), then call loadApf.

2 comments so far

Add Your Comment
  1. Is there a way to still download the ASCII Animator with LIBTCOD support? I can’t seem to find it, if there is.

  2. It’s on bitbucket :
    https://bitbucket.org/jice/ascii-animator-jice
    I don’t use it often, so if something’s broken, let me know