aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb/keypad.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2018-07-09 00:40:03 +0300
committerFilippos Karapetis2018-07-09 00:41:04 +0300
commitf5247457740142385e2d5de229dbe7d1bb57f02b (patch)
tree370c66400e0b1c947f697eb7dcc036b04c599f16 /engines/dreamweb/keypad.cpp
parentfc5261b0c4216885b3f4bb8db2df3fba3fcd8433 (diff)
downloadscummvm-rg350-f5247457740142385e2d5de229dbe7d1bb57f02b.tar.gz
scummvm-rg350-f5247457740142385e2d5de229dbe7d1bb57f02b.tar.bz2
scummvm-rg350-f5247457740142385e2d5de229dbe7d1bb57f02b.zip
DREAMWEB: Simplify the character kerning checks
Diffstat (limited to 'engines/dreamweb/keypad.cpp')
-rw-r--r--engines/dreamweb/keypad.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/engines/dreamweb/keypad.cpp b/engines/dreamweb/keypad.cpp
index 50e452eb82..476e9b5fb7 100644
--- a/engines/dreamweb/keypad.cpp
+++ b/engines/dreamweb/keypad.cpp
@@ -440,18 +440,16 @@ void DreamWebEngine::showLeftPage() {
showFrame(_folderGraphics2, 0, y, 5, 0);
_lineSpacing = 8;
_charShift = 91;
- _kerning = 1;
uint8 pageIndex = _folderPage - 2;
const uint8 *string = getTextInFile1(pageIndex * 2);
y = 48;
for (uint i = 0; i < 2; ++i) {
uint8 lastChar;
do {
- lastChar = printDirect(&string, 2, &y, 140, false);
+ lastChar = printDirect(&string, 2, &y, 140, false, true);
y += _lineSpacing;
} while (lastChar != '\0');
}
- _kerning = 0;
_charShift = 0;
_lineSpacing = 10;
uint8 *bufferToSwap = workspace() + (48*kScreenwidth)+2;
@@ -473,18 +471,16 @@ void DreamWebEngine::showRightPage() {
showFrame(_folderGraphics2, 143, y, 2, 0);
_lineSpacing = 8;
- _kerning = 1;
uint8 pageIndex = _folderPage - 1;
const uint8 *string = getTextInFile1(pageIndex * 2);
y = 48;
for (uint i = 0; i < 2; ++i) {
uint8 lastChar;
do {
- lastChar = printDirect(&string, 152, &y, 140, false);
+ lastChar = printDirect(&string, 152, &y, 140, false, true);
y += _lineSpacing;
} while (lastChar != '\0');
}
- _kerning = 0;
_lineSpacing = 10;
}
@@ -848,17 +844,15 @@ void DreamWebEngine::diaryKeyN() {
void DreamWebEngine::showDiaryPage() {
showFrame(_diaryGraphics, kDiaryx, kDiaryy, 0, 0);
- _kerning = 1;
useTempCharset(&_diaryCharset);
_charShift = 91+91;
const uint8 *string = getTextInFile1(_diaryPage);
uint16 y = kDiaryy + 16;
- printDirect(&string, kDiaryx + 48, &y, 240, 240 & 1);
+ printDirect(&string, kDiaryx + 48, &y, 240, 240 & 1, true);
y = kDiaryy + 16;
- printDirect(&string, kDiaryx + 129, &y, 240, 240 & 1);
+ printDirect(&string, kDiaryx + 129, &y, 240, 240 & 1, true);
y = kDiaryy + 23;
- printDirect(&string, kDiaryx + 48, &y, 240, 240 & 1);
- _kerning = 0;
+ printDirect(&string, kDiaryx + 48, &y, 240, 240 & 1, true);
_charShift = 0;
useCharset1();
}