35#ifndef TCOD_CONSOLE_REXPAINT_HPP_
36#define TCOD_CONSOLE_REXPAINT_HPP_
56inline std::vector<tcod::ConsolePtr> load_xp(
const std::filesystem::path& path) {
57 const auto path_str = path.string();
59 std::vector<TCOD_Console*> tmp(layer_count,
nullptr);
61 return std::vector<tcod::ConsolePtr>(tmp.begin(), tmp.end());
73 const std::vector<const TCOD_Console*>& consoles,
const std::filesystem::path& path,
int compress_level = 9) {
75 TCOD_save_xp(
static_cast<int>(consoles.size()), consoles.data(), path.string().c_str(), compress_level));
C++ types for console functions.
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 color.hpp:45
int check_throw_error(int error)
Check and throw error messages.
Definition error.hpp:57