AGI: overwrite save restore dialog font character

Overwrite it, to make sure that original save/restore dialogs
look properly.
This commit is contained in:
Martin Kiewitz 2016-01-29 17:14:49 +01:00
parent 614884ed39
commit 72161adf1c
2 changed files with 13 additions and 3 deletions

View File

@ -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

View File

@ -38,6 +38,8 @@ public:
const byte *getFontData();
private:
void overwriteSaveRestoreDialogCharacter();
void loadFontScummVMFile(Common::String fontFilename);
void loadFontMickey();
void loadFontAmigaPseudoTopaz();