diff options
author | Martin Kiewitz | 2016-01-29 17:14:49 +0100 |
---|---|---|
committer | Martin Kiewitz | 2016-01-29 17:14:49 +0100 |
commit | 72161adf1c7eec7f1ca889fb5ed9017029e6e6da (patch) | |
tree | 2cfa0023322fbc553d53535289f80e4557f5a5c3 | |
parent | 614884ed39d011c91291c1a3307e82f853dcfe78 (diff) | |
download | scummvm-rg350-72161adf1c7eec7f1ca889fb5ed9017029e6e6da.tar.gz scummvm-rg350-72161adf1c7eec7f1ca889fb5ed9017029e6e6da.tar.bz2 scummvm-rg350-72161adf1c7eec7f1ca889fb5ed9017029e6e6da.zip |
AGI: overwrite save restore dialog font character
Overwrite it, to make sure that original save/restore dialogs
look properly.
-rw-r--r-- | engines/agi/font.cpp | 14 | ||||
-rw-r--r-- | engines/agi/font.h | 2 |
2 files changed, 13 insertions, 3 deletions
diff --git a/engines/agi/font.cpp b/engines/agi/font.cpp index b3547c27b1..b9a7795c0b 100644 --- a/engines/agi/font.cpp +++ b/engines/agi/font.cpp @@ -1062,6 +1062,12 @@ const byte *GfxFont::getFontData() { return _fontData; } +void GfxFont::overwriteSaveRestoreDialogCharacter() { + // overwrite character 0x1A with the standard Sierra arrow to the right character + // required for the original save/restore dialogs + memcpy(_fontDataAllocated + (0x1A * 8), fontData_ArrowRightCharacter, sizeof(fontData_ArrowRightCharacter)); +} + // This code loads a ScummVM-specific user-supplied binary font file // It's assumed that it's a plain binary file, that contains 256 characters. 8 bytes per character. // 8x8 pixels per character. File size 2048 bytes. @@ -1096,6 +1102,8 @@ void GfxFont::loadFontScummVMFile(Common::String fontFilename) { // read font data, is already in the format that we need (plain bitmap 8x8) fontFile.read(_fontDataAllocated, 256 * 8); fontFile.close(); + + overwriteSaveRestoreDialogCharacter(); } // We load the Mickey Mouse font from MICKEY.EXE @@ -1198,6 +1206,8 @@ void GfxFont::loadFontAmigaPseudoTopaz() { fontData += 8; } } + + overwriteSaveRestoreDialogCharacter(); } void GfxFont::loadFontAppleIIgs() { @@ -1385,9 +1395,7 @@ void GfxFont::loadFontAppleIIgs() { free(locationTablePtr); free(strikeDataPtr); - // overwrite character 0x1A with the standard Sierra arrow to the right character - // required for the original save/restore dialogs - memcpy(_fontDataAllocated + (0x1A * 8), fontData_ArrowRightCharacter, sizeof(fontData_ArrowRightCharacter)); + overwriteSaveRestoreDialogCharacter(); } } // End of namespace Agi diff --git a/engines/agi/font.h b/engines/agi/font.h index 791b1b0217..bff02f968d 100644 --- a/engines/agi/font.h +++ b/engines/agi/font.h @@ -38,6 +38,8 @@ public: const byte *getFontData(); private: + void overwriteSaveRestoreDialogCharacter(); + void loadFontScummVMFile(Common::String fontFilename); void loadFontMickey(); void loadFontAmigaPseudoTopaz(); |