2025-05-04 13:32:07 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
2025-12-06 21:23:59 +01:00
|
|
|
#include <ctrff/types.hpp>
|
2025-05-04 13:32:07 +02:00
|
|
|
|
|
|
|
|
namespace ctrff {
|
2025-12-06 21:23:59 +01:00
|
|
|
CTRFF_API void String2U16(ctrff::u16 *res, const std::string &src, size_t max);
|
|
|
|
|
CTRFF_API std::string U16toU8(ctrff::u16 *in, size_t max);
|
2026-01-06 21:51:51 +01:00
|
|
|
CTRFF_API void RGB565toRGBA(std::vector<ctrff::u8> &img, const ctrff::u16 *icon,
|
2025-05-04 13:32:07 +02:00
|
|
|
const int &w, const int &h);
|
|
|
|
|
// Image can only be rgba8888
|
2025-12-06 21:23:59 +01:00
|
|
|
CTRFF_API void RGBA2RGB565(ctrff::u16 *out, const std::vector<ctrff::u8> &img,
|
2025-05-04 13:32:07 +02:00
|
|
|
const int &w, const int &h);
|
2025-12-06 21:23:59 +01:00
|
|
|
CTRFF_API std::vector<ctrff::u8> DownscaleImage(
|
|
|
|
|
const std::vector<ctrff::u8> &img, int w, int h, int scale);
|
2026-01-14 18:25:05 +01:00
|
|
|
CTRFF_API void Flip(std::vector<u8> &buf, int w, int h);
|
2025-12-29 21:38:07 +01:00
|
|
|
CTRFF_API ctrff::u32 TileIndex(const int &x, const int &y, const int &w);
|
2025-05-04 13:32:07 +02:00
|
|
|
} // namespace ctrff
|