mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-06-06 19:53:28 +00:00
Minor CRasterFont tweaks
This commit is contained in:
parent
5b5f3318b0
commit
802cf9d811
@ -68,7 +68,7 @@ CRasterFont::CRasterFont(urde::CInputStream& in, urde::IObjectStore& store)
|
|||||||
{
|
{
|
||||||
char16_t first = in.readUint16Big();
|
char16_t first = in.readUint16Big();
|
||||||
char16_t second = in.readUint16Big();
|
char16_t second = in.readUint16Big();
|
||||||
s32 howMuch = in.readUint32Big();
|
s32 howMuch = in.readInt32Big();
|
||||||
x1c_kerning.emplace_back(first, second, howMuch);
|
x1c_kerning.emplace_back(first, second, howMuch);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,8 +77,7 @@ CRasterFont::CRasterFont(urde::CInputStream& in, urde::IObjectStore& store)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CRasterFont::SinglePassDrawString(const CDrawStringOptions& opts, int x, int y, int& xout, int& yout,
|
void CRasterFont::SinglePassDrawString(const CDrawStringOptions& opts, int x, int y, int& xout, int& yout,
|
||||||
CTextRenderBuffer* renderBuf,
|
CTextRenderBuffer* renderBuf, const char16_t* str, s32 length) const
|
||||||
const char16_t* str, s32 length) const
|
|
||||||
{
|
{
|
||||||
if (!x0_initialized)
|
if (!x0_initialized)
|
||||||
return;
|
return;
|
||||||
|
@ -122,7 +122,7 @@ public:
|
|||||||
s32 GetCarriageAdvance() const { return GetLineMargin() + GetMonoHeight(); }
|
s32 GetCarriageAdvance() const { return GetLineMargin() + GetMonoHeight(); }
|
||||||
|
|
||||||
s32 GetBaseline() const { return x8c_baseline; }
|
s32 GetBaseline() const { return x8c_baseline; }
|
||||||
static s32 KernLookup(const std::vector<CKernPair>& kernTable, s32 kernStart, s32 chr)
|
static s32 KernLookup(const std::vector<CKernPair>& kernTable, s32 kernStart, char16_t chr)
|
||||||
{
|
{
|
||||||
auto iter = kernTable.cbegin() + kernStart;
|
auto iter = kernTable.cbegin() + kernStart;
|
||||||
for (; iter != kernTable.cend() && iter->GetFirst() == kernTable[kernStart].GetFirst() ; ++iter)
|
for (; iter != kernTable.cend() && iter->GetFirst() == kernTable[kernStart].GetFirst() ; ++iter)
|
||||||
@ -136,8 +136,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
void SinglePassDrawString(const CDrawStringOptions&, int x, int y, int& xout, int& yout,
|
void SinglePassDrawString(const CDrawStringOptions&, int x, int y, int& xout, int& yout,
|
||||||
CTextRenderBuffer* renderBuf,
|
CTextRenderBuffer* renderBuf, const char16_t* str, s32 len) const;
|
||||||
const char16_t* str, s32 len) const;
|
|
||||||
void DrawSpace(const CDrawStringOptions& opts, int x, int y, int& xout, int& yout, int len) const;
|
void DrawSpace(const CDrawStringOptions& opts, int x, int y, int& xout, int& yout, int len) const;
|
||||||
void DrawString(const CDrawStringOptions& opts, int x, int y, int& xout, int& yout,
|
void DrawString(const CDrawStringOptions& opts, int x, int y, int& xout, int& yout,
|
||||||
CTextRenderBuffer* renderBuf,
|
CTextRenderBuffer* renderBuf,
|
||||||
|
2
hecl
2
hecl
@ -1 +1 @@
|
|||||||
Subproject commit 373ec1909d30ef1ba14179a0e8681ca3bce9c725
|
Subproject commit 98d5b4f35c8784ce00ab50dace48620dd65e0261
|
Loading…
x
Reference in New Issue
Block a user