mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-04 01:46:42 +00:00
DRAGONS: fixed font mapping
This commit is contained in:
parent
0312e61345
commit
627989e46f
@ -56,12 +56,10 @@ Font::~Font() {
|
||||
free(_pixels);
|
||||
}
|
||||
|
||||
uint16 mapChar(uint16 in) {
|
||||
if (in >= 97) {
|
||||
return in - 0x23;
|
||||
}
|
||||
return in - 0x20;
|
||||
uint16 Font::mapChar(uint16 in) {
|
||||
return _map[in - _map[0x03] + 0x05];
|
||||
}
|
||||
|
||||
Graphics::Surface *Font::render(uint16 *text, uint16 length, byte *palette) {
|
||||
Graphics::Surface *surface = new Graphics::Surface();
|
||||
Graphics::PixelFormat pixelFormat16(2, 5, 5, 5, 1, 10, 5, 0, 15); //TODO move this to a better location.
|
||||
|
@ -43,6 +43,8 @@ public:
|
||||
Font(Common::SeekableReadStream &stream, uint32 mapSize, uint32 pixelOffset, uint32 pixelSize);
|
||||
~Font();
|
||||
Graphics::Surface *render(uint16 *text, uint16 length, byte *palette);
|
||||
private:
|
||||
uint16 mapChar(uint16 in);
|
||||
};
|
||||
|
||||
struct ScreenTextEntry {
|
||||
@ -55,7 +57,7 @@ private:
|
||||
DragonsEngine *_vm;
|
||||
Font *_fonts[3];
|
||||
Screen *_screen;
|
||||
Common::List<ScreenTextEntry*> _screenTexts;
|
||||
Common::List<ScreenTextEntry *> _screenTexts;
|
||||
byte *_palettes;
|
||||
|
||||
public:
|
||||
|
Loading…
x
Reference in New Issue
Block a user