2019-10-23 23:20:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
// This is a font character that loads a texture and recolors it.
|
2020-05-24 14:32:52 +00:00
|
|
|
class FFontChar1 : public FImageSource
|
2019-10-23 23:20:58 +00:00
|
|
|
{
|
|
|
|
public:
|
2020-05-24 14:32:52 +00:00
|
|
|
FFontChar1 (FImageSource *sourcelump);
|
|
|
|
TArray<uint8_t> CreatePalettedPixels(int conversion) override;
|
2019-10-23 23:20:58 +00:00
|
|
|
void SetSourceRemap(const uint8_t *sourceremap) { SourceRemap = sourceremap; }
|
|
|
|
const uint8_t *ResetSourceRemap() { auto p = SourceRemap; SourceRemap = nullptr; return p; }
|
2020-05-24 14:32:52 +00:00
|
|
|
FImageSource *GetBase() const { return BaseTexture; }
|
2019-10-23 23:20:58 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
2020-05-24 14:32:52 +00:00
|
|
|
FImageSource *BaseTexture;
|
2019-10-23 23:20:58 +00:00
|
|
|
const uint8_t *SourceRemap;
|
|
|
|
};
|
|
|
|
|
|
|
|
// This is a font character that reads RLE compressed data.
|
2020-05-24 14:32:52 +00:00
|
|
|
class FFontChar2 : public FImageSource
|
2019-10-23 23:20:58 +00:00
|
|
|
{
|
|
|
|
public:
|
2020-05-24 14:32:52 +00:00
|
|
|
FFontChar2 (int sourcelump, int sourcepos, int width, int height, int leftofs=0, int topofs=0);
|
2019-10-23 23:20:58 +00:00
|
|
|
|
2020-05-24 14:32:52 +00:00
|
|
|
TArray<uint8_t> CreatePalettedPixels(int conversion) override;
|
2019-10-23 23:20:58 +00:00
|
|
|
void SetSourceRemap(const uint8_t *sourceremap);
|
|
|
|
|
|
|
|
protected:
|
2020-05-24 14:32:52 +00:00
|
|
|
int SourceLump;
|
2019-10-23 23:20:58 +00:00
|
|
|
int SourcePos;
|
|
|
|
const uint8_t *SourceRemap;
|
|
|
|
};
|