|
Porytiles
|
Shared helper for loading animation frames from PNG files. More...
#include <filesystem>#include <string>#include "porytiles/domain/algorithms/tile_extractors.hpp"#include "porytiles/domain/models/anim_frame.hpp"#include "porytiles/domain/models/image.hpp"#include "porytiles/domain/models/palette.hpp"#include "porytiles/domain/models/pixel_tile.hpp"#include "porytiles/domain/models/supports_transparency.hpp"#include "porytiles/utilities/result/chainable_result.hpp"Go to the source code of this file.
Classes | |
| struct | porytiles::FrameLoadResult< PixelType > |
| Result of loading an animation frame from a PNG file. More... | |
Namespaces | |
| namespace | porytiles |
Functions | |
| template<SupportsTransparency PixelType, typename LoaderType > | |
| ChainableResult< FrameLoadResult< PixelType > > | porytiles::load_animation_frame_from_png (const std::filesystem::path &png_path, const std::string &frame_name, const LoaderType &loader) |
| Loads an animation frame from a PNG file. | |
Shared helper for loading animation frames from PNG files.
This header provides load_animation_frame_from_png<>(), a template function that encapsulates the common logic for loading an animation frame PNG file and extracting tiles from it. This is used by both:
The helper handles:
Each caller is responsible for:
Definition in file anim_frame_loader.hpp.