Make ctrff usable again

This commit is contained in:
2025-12-06 21:34:19 +01:00
parent b021609c4c
commit bfa6c9e92a
15 changed files with 97 additions and 91 deletions

View File

@@ -39,14 +39,14 @@ CTRFF_API void ctrff::SMDH::Read(std::fstream &f) {
f.read(reinterpret_cast<char *>(&IconLarge), sizeof(IconLarge));
}
CTRFF_API void ctrff::SMDH::SetIcon(const std::vector<PD::u8> &buf) {
CTRFF_API void ctrff::SMDH::SetIcon(const std::vector<ctrff::u8> &buf) {
RGBA2RGB565(IconLarge, buf, 48, 48);
auto small_icon = DownscaleImage(buf, 48, 48, 2);
RGBA2RGB565(IconSmall, small_icon, 24, 24);
}
CTRFF_API std::vector<PD::u8> ctrff::SMDH::GetIcon() {
std::vector<PD::u8> res(48 * 48 * 4);
CTRFF_API std::vector<ctrff::u8> ctrff::SMDH::GetIcon() {
std::vector<ctrff::u8> res(48 * 48 * 4);
ctrff::RGB565toRGBA(res, IconLarge, 48, 48);
return res;
}