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

FRME bug fixes and shader adjustments

This commit is contained in:
Jack Andersen
2017-01-29 18:16:20 -10:00
parent 1fbd08b7c6
commit 83176b41a9
39 changed files with 424 additions and 179 deletions

View File

@@ -103,7 +103,7 @@ void CRasterFont::SinglePassDrawString(const CDrawStringOptions& opts, int x, in
{
left += x;
top += y - glyph->GetBaseline();
renderBuf->AddCharacter(zeus::CVector2i(left, top), *chr, opts.x4_colors[0]);
renderBuf->AddCharacter(zeus::CVector2i(left, top), *chr, opts.x4_colors[2]);
}
x += glyph->GetRightPadding() + glyph->GetAdvance();
}
@@ -138,7 +138,6 @@ void CRasterFont::DrawString(const CDrawStringOptions& opts, int x, int y, int&
if (renderBuf)
{
/* TODO: Implement this */
/* CGraphicsPalette pal = CGraphicsPalette::CGraphcisPalette(2, 4); */
/* zeus::CColor color = zeus::CColor(0.f, 0.f, 0.f, 0.f) */
/* tmp = color.ToRGB5A3(); */
@@ -148,6 +147,7 @@ void CRasterFont::DrawString(const CDrawStringOptions& opts, int x, int y, int&
/* tmp5 = tmp4.ToRGBA5A3(); */
/* pal.UnLock(); */
/* renderBuf->AddPaletteChange(pal); */
renderBuf->AddPaletteChange(opts.x4_colors[0], opts.x4_colors[1]);
}
SinglePassDrawString(opts, x, y, xout, yout, renderBuf, str, len);
@@ -194,6 +194,13 @@ void CRasterFont::GetSize(const CDrawStringOptions& opts, int& width, int& heigh
}
}
bool CRasterFont::IsFinishedLoading() const
{
if (!x80_texture || !x80_texture.IsLoaded())
return false;
return true;
}
std::unique_ptr<IObj> FRasterFontFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms,
CObjectReference* selfRef)
{