35#ifndef TCOD_CONSOLE_REXPAINT_HPP_
36#define TCOD_CONSOLE_REXPAINT_HPP_
58inline std::vector<tcod::ConsolePtr>
load_xp(
const std::filesystem::path& path) {
59 const auto path_str = path.string();
61 std::vector<TCOD_Console*> tmp(layer_count,
nullptr);
63 return std::vector<tcod::ConsolePtr>(tmp.begin(), tmp.end());
77 const std::vector<const TCOD_Console*>& consoles,
const std::filesystem::path& path,
int compress_level = 9) {
79 TCOD_save_xp(
static_cast<int>(consoles.size()), consoles.data(), path.string().c_str(), compress_level));
C++ types for console functions.
std::vector< tcod::ConsolePtr > load_xp(const std::filesystem::path &path)
Load an array of consoles from a REXPaint file.
Definition console_rexpaint.hpp:58
void save_xp(const std::vector< const TCOD_Console * > &consoles, const std::filesystem::path &path, int compress_level=9)
Save an array of consoles to a REXPaint file.
Definition console_rexpaint.hpp:76
int TCOD_load_xp(const char *path, int n, TCOD_Console **out)
Load an array of consoles from a REXPaint file.
TCOD_Error TCOD_save_xp(int n, const TCOD_Console *const *consoles, const char *path, int compress_level)
Save an array of consoles to a REXPaint file.
The libtcod namespace.
Definition bresenham.hpp:157
int check_throw_error(int error)
Check and throw error messages.
Definition error.hpp:57