Porytiles
Loading...
Searching...
No Matches
incbin_declaration_appender.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstddef>
4#include <filesystem>
5#include <string>
6
7#include "gsl/pointers"
8
11
12namespace porytiles {
13
30 public:
35 IncbinDeclarationAppender(std::filesystem::path project_root, gsl::not_null<const TextFormatter *> format);
36
60 const std::string &tileset_name, const std::string &bin_path_base, std::size_t num_palettes) const;
61
87 const std::string &tileset_name, const std::string &bin_path_base, std::size_t attribute_bytes) const;
88
98 [[nodiscard]] ChainableResult<void> remove_declarations(const std::string &tileset_name) const;
99
100 private:
101 std::filesystem::path project_root_;
102 const TextFormatter *format_;
103};
104
105} // namespace porytiles
A result type that maintains a chainable sequence of errors for debugging and error reporting.
Appends INCBIN declarations for Porytiles-managed tileset assets.
ChainableResult< void > append_graphics_declarations(const std::string &tileset_name, const std::string &bin_path_base, std::size_t num_palettes) const
Appends INCBIN declarations for a Porytiles-managed tileset to graphics.h.
ChainableResult< void > remove_declarations(const std::string &tileset_name) const
Removes INCBIN declarations for a Porytiles-managed tileset (for restore workflow).
ChainableResult< void > append_metatiles_declarations(const std::string &tileset_name, const std::string &bin_path_base, std::size_t attribute_bytes) const
Appends INCBIN declarations for a Porytiles-managed tileset to metatiles.h.
Abstract base class for applying text styling with context-aware formatting.