- use translation slot 0 for reserved content, like font translations.

This commit is contained in:
Christoph Oelckers 2020-04-11 19:11:20 +02:00
parent 2dcf63c57d
commit 32300f7d26
5 changed files with 11 additions and 7 deletions

View File

@ -6,6 +6,12 @@
class FileReader;
enum
{
TRANSLATION_Internal = 0
};
struct FRemapTable
{
FRemapTable(int count = 256) { NumEntries = count; }
@ -84,9 +90,10 @@ public:
FRemapTable IceMap; // This is used by the texture compositor so it must be globally accessible.
uint8_t GrayMap[256];
TArray<FRemapTable*> uniqueRemaps;
private:
FMemArena remapArena;
TArray<FRemapTable*> uniqueRemaps;
TArray<TAutoGrowArray<FRemapTablePtr, FRemapTable*>> TranslationTables;
public:
void Init(int numslots); // This cannot be a constructor!!!

View File

@ -664,7 +664,7 @@ void FFont::SetDefaultTranslation(uint32_t *othercolors)
}
}
}
Translations[CR_UNTRANSLATED] = GPalette.StoreTranslation(TRANSLATION_Font, &remap);
Translations[CR_UNTRANSLATED] = GPalette.StoreTranslation(TRANSLATION_Internal, &remap);
forceremap = true;
}

View File

@ -418,7 +418,7 @@ public:
}
}
}
Translations[CR_UNTRANSLATED] = GPalette.StoreTranslation(TRANSLATION_Font, &remap);
Translations[CR_UNTRANSLATED] = GPalette.StoreTranslation(TRANSLATION_Internal, &remap);
forceremap = true;
}

View File

@ -9,8 +9,7 @@ class FSerializer;
enum
{
TRANSLATION_Invalid,
TRANSLATION_Players,
TRANSLATION_Players = 1,
TRANSLATION_PlayersExtra,
TRANSLATION_Standard,
TRANSLATION_LevelScripted,
@ -20,7 +19,6 @@ enum
TRANSLATION_Blood,
TRANSLATION_RainPillar,
TRANSLATION_Custom,
TRANSLATION_Font,
NUM_TRANSLATION_TABLES
};

View File

@ -1047,7 +1047,6 @@ enum ETranslationTable
TRANSLATION_Blood,
TRANSLATION_RainPillar,
TRANSLATION_Custom,
TRANSLATION_Font,
};
enum EFindFloorCeiling