2022-09-05 04:24:50 -04:00
|
|
|
//
|
|
|
|
// EuropaTools
|
|
|
|
//
|
2025-01-07 14:17:50 -05:00
|
|
|
// (C) 2021-2025 modeco80 <lily.modeco80@protonmail.ch>
|
2022-09-05 04:24:50 -04:00
|
|
|
//
|
2025-01-07 18:02:27 -05:00
|
|
|
// SPDX-License-Identifier: MIT
|
2022-09-05 04:24:50 -04:00
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef EUROPA_IO_YATFREADER_H
|
|
|
|
#define EUROPA_IO_YATFREADER_H
|
|
|
|
|
2022-09-21 03:59:16 -04:00
|
|
|
#include <europa/structs/Yatf.hpp>
|
2022-09-05 20:59:46 -04:00
|
|
|
#include <iosfwd>
|
|
|
|
|
2025-01-15 23:40:41 -05:00
|
|
|
namespace europa::util {
|
|
|
|
struct ImageSurface;
|
|
|
|
}
|
|
|
|
|
2025-01-15 21:53:34 -05:00
|
|
|
namespace europa::io::yatf {
|
2022-09-05 04:24:50 -04:00
|
|
|
|
2025-01-15 21:53:34 -05:00
|
|
|
/// Reader for PS2 Europa .tex (YATF - Yet Another Texture Format) files.
|
2025-01-19 02:08:43 -05:00
|
|
|
struct Reader {
|
2025-01-15 21:53:34 -05:00
|
|
|
explicit Reader(std::istream& is);
|
2022-09-05 04:24:50 -04:00
|
|
|
|
2025-01-16 01:50:52 -05:00
|
|
|
/// Read image. The image output to [surface] is converted to RGBA8888 implicitly.
|
2025-01-15 23:40:41 -05:00
|
|
|
bool ReadImage(structs::YatfHeader& header, util::ImageSurface& surface);
|
2022-09-05 04:24:50 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::istream& stream;
|
|
|
|
};
|
|
|
|
|
2025-01-15 23:40:41 -05:00
|
|
|
} // namespace europa::io::yatf
|
2022-09-05 04:24:50 -04:00
|
|
|
|
|
|
|
#endif // EUROPA_IO_YATFREADER_H
|