2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 14:27:42 +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

@@ -1,4 +1,5 @@
#include "CFontImageDef.hpp"
#include "Graphics/CTexture.hpp"
namespace urde
{
@@ -26,4 +27,17 @@ bool CFontImageDef::IsLoaded() const
return true;
}
s32 CFontImageDef::CalculateBaseline() const
{
const CTexture* tex = x4_texs.front().GetObj();
return s32(tex->GetHeight() * x14_pointsPerTexel.y) * 2.5f / 3.f;
}
s32 CFontImageDef::CalculateHeight() const
{
const CTexture* tex = x4_texs.front().GetObj();
s32 scaledH = tex->GetHeight() * x14_pointsPerTexel.y;
return scaledH - (scaledH - CalculateBaseline());
}
}