use FTranslationID in all places where strict type checking is needed.

This means all properties in serializable classes now use this wrapper type. The backend hasn't been changed yet
This commit is contained in:
Christoph Oelckers 2023-11-09 19:20:04 +01:00
commit 8c5eb2c807
42 changed files with 189 additions and 139 deletions

View file

@ -747,8 +747,8 @@ DEFINE_PROPERTY(translation, L, Actor)
for(int i = 1; i < PROP_PARM_COUNT; i++)
{
PROP_STRING_PARM(str, i);
int tnum;
if (i== 1 && PROP_PARM_COUNT == 2 && (tnum = R_FindCustomTranslation(str)) != -1)
FTranslationID tnum;
if (i== 1 && PROP_PARM_COUNT == 2 && (tnum = R_FindCustomTranslation(str)) != INVALID_TRANSLATION)
{
defaults->Translation = tnum;
return;
@ -789,7 +789,7 @@ DEFINE_PROPERTY(bloodcolor, C, Actor)
defaults->BloodColor = color;
defaults->BloodColor.a = 255; // a should not be 0.
defaults->BloodTranslation = TRANSLATION(TRANSLATION_Blood, CreateBloodTranslation(color));
defaults->BloodTranslation = CreateBloodTranslation(color);
}
//==========================================================================