Quote Originally Posted by Ñuño Martínez View Post
This works also in the other direction? I mean, loading/creating bitmaps with an external library (SDL, for example) and use them as tiles and sprites.
Yes! I wrote the loaders to support Tiled file formats (based on xml and png), but you can implement your own. The API has several functions to build the assets at runtime in memory, actually my standard loaders use those functions internally. Please check the GitHub project, the modules LoadTileset.c and LoadTilemap.c for example. Using them as a reference, you can build yours. Source is C language, but the pascal wrapper is a very thin direct translation of the API, you'll get the point easily.

The website and GitHub project are a bit outdated, but I'm working to push the current updates and download links. Tilengine has now builds for Raspberry Pi and Android, and the new 16 bpp format for mobile GPUs that don't handle well 32 bpp textures. Managing so much target platforms, language wrappers and examples is becoming increasingly difficult!