use FTranslationID in the 2D code.

This commit is contained in:
Christoph Oelckers 2023-11-09 22:55:49 +01:00
commit 578a398981
13 changed files with 45 additions and 41 deletions

View file

@ -114,10 +114,10 @@ inline constexpr FTranslationID TRANSLATION(uint8_t a, uint32_t b)
{
return FTranslationID::fromInt((a << TRANSLATION_SHIFT) | b);
}
inline constexpr int MakeLuminosityTranslation(int range, uint8_t min, uint8_t max)
inline constexpr FTranslationID MakeLuminosityTranslation(int range, uint8_t min, uint8_t max)
{
// ensure that the value remains positive.
return ( (1 << 30) | ((range&0x3fff) << 16) | (min << 8) | max );
return FTranslationID::fromInt( (1 << 30) | ((range&0x3fff) << 16) | (min << 8) | max );
}
inline constexpr bool IsLuminosityTranslation(FTranslationID trans)