mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-20 20:16:40 +00:00
- safety commit
This commit is contained in:
parent
29a4955f79
commit
3dbb8cbb11
16 changed files with 75 additions and 56 deletions
|
@ -355,6 +355,18 @@ DEFINE_ACTION_FUNCTION_NATIVE(FFont, GetCursor, GetCursor)
|
|||
ACTION_RETURN_STRING(FString(self->GetCursor()));
|
||||
}
|
||||
|
||||
static int GetGlyphHeight(FFont* fnt, int code)
|
||||
{
|
||||
auto glyph = fnt->GetChar(code, CR_UNTRANSLATED, nullptr);
|
||||
return glyph ? (int)glyph->GetDisplayHeight() : 0;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(FFont, GetGlyphHeight, GetGlyphHeight)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(FFont);
|
||||
PARAM_INT(code);
|
||||
ACTION_RETURN_INT(GetGlyphHeight(self, code));
|
||||
}
|
||||
//==========================================================================
|
||||
//
|
||||
// file system
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue