2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-14 13:26:09 +00:00

Text rendering & CWorldTransManager fixes

This commit is contained in:
2022-05-19 00:57:30 -07:00
parent ef71c009c6
commit 26fd0e2b9f
22 changed files with 132 additions and 244 deletions

View File

@@ -154,11 +154,11 @@ void CRasterFont::DrawString(const CDrawStringOptions& opts, int x, int y, int&
if (renderBuf != nullptr) {
CGraphicsPalette pal(EPaletteFormat::RGB5A3, 4);
pal.Lock();
*reinterpret_cast<u16*>(pal.GetPaletteData() + 0) = bswap16(zeus::CColor(0.f, 0.f, 0.f, 0.f).toRGB5A3());
*reinterpret_cast<u16*>(pal.GetPaletteData() + 2) = bswap16(opts.x4_colors[0].toRGB5A3());
*reinterpret_cast<u16*>(pal.GetPaletteData() + 4) = bswap16(opts.x4_colors[1].toRGB5A3());
*reinterpret_cast<u16*>(pal.GetPaletteData() + 6) = bswap16(zeus::CColor(0.f, 0.f, 0.f, 0.f).toRGB5A3());
u16* data = pal.Lock();
data[0] = bswap16(zeus::CColor(0.f, 0.f, 0.f, 0.f).toRGB5A3());
data[1] = bswap16(opts.x4_colors[0].toRGB5A3());
data[2] = bswap16(opts.x4_colors[1].toRGB5A3());
data[3] = bswap16(zeus::CColor(0.f, 0.f, 0.f, 0.f).toRGB5A3());
pal.UnLock();
renderBuf->AddPaletteChange(pal);
}