- Fixed hack: CanPrint must return 0 or it'd signal to the mods that NO FONT can print the text (what Graf said).

This commit is contained in:
drfrag 2019-04-24 20:53:05 +02:00
parent e5f7bf068c
commit 1d77f880a4
3 changed files with 5 additions and 3 deletions

View file

@ -1949,7 +1949,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(FFont, StringWidth, StringWidth)
static int CanPrint(FFont *font, const FString &str) // hack hack
{
return 0;
return 1;
}
DEFINE_ACTION_FUNCTION_NATIVE(FFont, CanPrint, CanPrint)

View file

@ -113,7 +113,7 @@ public:
inline int StringWidth (const char *str) const { return StringWidth ((const uint8_t *)str); }
inline int StringWidth (const FString &str) const { return StringWidth ((const uint8_t *)str.GetChars()); }
inline bool CanPrint(const uint8_t *str) const { return false; } // hack hack
inline bool CanPrint(const uint8_t *str) const { return true; } // hack hack
int GetCharCode(int code, bool needpic) const;
char GetCursor() const { return Cursor; }

View file

@ -90,7 +90,8 @@ struct TexMan
ReturnFirst = 4,
AllowSkins = 8,
ShortNameOnly = 16,
DontCreate = 32
DontCreate = 32,
Localize = 64
};
enum ETexReplaceFlags
@ -111,6 +112,7 @@ struct TexMan
native static Vector2 GetScaledSize(TextureID tex);
native static Vector2 GetScaledOffset(TextureID tex);
native static int CheckRealHeight(TextureID tex);
static bool OkForLocalization(TextureID patch, String textSubstitute) { return false; } // hack hack
native static void SetCameraToTexture(Actor viewpoint, String texture, double fov);
}