Fixed BaseObj and FontAtlas.

This commit is contained in:
Arron David Nelson 2024-01-24 17:38:34 -08:00
parent 897d3b9120
commit b863f59d14
4 changed files with 12 additions and 5 deletions

View File

@ -258,7 +258,7 @@ if (IS_ARCH_AMD64)
target_link_libraries(EHS OpenSSL::SSL OpenSSL::Crypto ZLIB::ZLIB) target_link_libraries(EHS OpenSSL::SSL OpenSSL::Crypto ZLIB::ZLIB)
if (IS_OS_WINDOWS) if (IS_OS_WINDOWS)
target_link_libraries(StrToHash ws2_32 avrt LWE) target_link_libraries(StrToHash ws2_32 avrt EHS)
elseif (IS_OS_LINUX) elseif (IS_OS_LINUX)
#add_compile_definitions(EHS_WOOTING) #add_compile_definitions(EHS_WOOTING)

View File

@ -46,6 +46,8 @@ namespace ehs
UInt_64 GetGlyphScale() const; UInt_64 GetGlyphScale() const;
const Array<Glyph>& GetGlyphs() const;
Glyph GetGlyph(Char_32 code) const; Glyph GetGlyph(Char_32 code) const;
Vec2_u64 GetResolution() const; Vec2_u64 GetResolution() const;

View File

@ -109,22 +109,22 @@ namespace ehs
Type BaseObj::GetType() const Type BaseObj::GetType() const
{ {
return hierarchy[hierarchySize - 1]; return hierarchy[0];
} }
UInt_64 BaseObj::GetTypeIdSize() const UInt_64 BaseObj::GetTypeIdSize() const
{ {
return hierarchy[hierarchySize - 1].GetSize(); return hierarchy[0].GetSize();
} }
const Char_8* BaseObj::GetTypeId() const const Char_8* BaseObj::GetTypeId() const
{ {
return hierarchy[hierarchySize - 1].GetId(); return hierarchy[0].GetId();
} }
UInt_64 BaseObj::GetTypeHashId() const UInt_64 BaseObj::GetTypeHashId() const
{ {
return hierarchy[hierarchySize - 1].GetHashId(); return hierarchy[0].GetHashId();
} }
BaseObj* BaseObj::Clone() const BaseObj* BaseObj::Clone() const

View File

@ -141,6 +141,11 @@ namespace ehs
return glyphScale; return glyphScale;
} }
const Array<Glyph>& FontAtlas::GetGlyphs() const
{
return glyphs;
}
Glyph FontAtlas::GetGlyph(const Char_32 code) const Glyph FontAtlas::GetGlyph(const Char_32 code) const
{ {
for (UInt_32 i = 0; i < glyphs.Size(); ++i) for (UInt_32 i = 0; i < glyphs.Size(); ++i)