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:
@@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user