aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2009-10-11 12:51:13 +0000
committerJohannes Schickel2009-10-11 12:51:13 +0000
commitf4288516e80ec64aa262ccd8fcf61b1f8ce3fa09 (patch)
tree0f58fc2296e9915b93878763b32a443b6b519928
parent7755404f52b022d52d9c6bb0120973acb50d2bd6 (diff)
downloadscummvm-rg350-f4288516e80ec64aa262ccd8fcf61b1f8ce3fa09.tar.gz
scummvm-rg350-f4288516e80ec64aa262ccd8fcf61b1f8ce3fa09.tar.bz2
scummvm-rg350-f4288516e80ec64aa262ccd8fcf61b1f8ce3fa09.zip
Revert commits r44912 and r44905, seems like the original FM-Towns/PC98 games did only allow ASCII input, thus they didn't use the SJIS font in the save/load menus.
svn-id: r44916
-rw-r--r--engines/kyra/gui.cpp14
-rw-r--r--engines/kyra/gui_lok.cpp6
-rw-r--r--engines/kyra/gui_lol.cpp6
-rw-r--r--engines/kyra/gui_v2.cpp8
4 files changed, 31 insertions, 3 deletions
diff --git a/engines/kyra/gui.cpp b/engines/kyra/gui.cpp
index 5517e68ea8..f5fe417c0d 100644
--- a/engines/kyra/gui.cpp
+++ b/engines/kyra/gui.cpp
@@ -143,6 +143,10 @@ void GUI::initMenu(Menu &menu) {
else
printMenuText(getMenuItemTitle(menu.item[i]), textX, textY, menu.item[i].textColor, 0, 8);
} else {
+ Screen::FontId of = _screen->_currentFont;
+ if (menu.item[i].saveSlot > 0)
+ _screen->setFont(Screen::FID_8_FNT);
+
if (_vm->gameFlags().platform != Common::kPlatformAmiga)
printMenuText(getMenuItemTitle(menu.item[i]), textX - 1, textY + 1, defaultColor1(), 0, 0);
@@ -150,6 +154,8 @@ void GUI::initMenu(Menu &menu) {
printMenuText(getMenuItemTitle(menu.item[i]), textX, textY, menu.item[i].highlightColor, 0, 0);
else
printMenuText(getMenuItemTitle(menu.item[i]), textX, textY, menu.item[i].textColor, 0, 0);
+
+ _screen->setFont(of);
}
}
}
@@ -258,9 +264,13 @@ void GUI::redrawText(const Menu &menu) {
textY++;
printMenuText(getMenuItemTitle(menu.item[i]), textX, textY, menu.item[i].textColor, 0, 8);
} else {
+ Screen::FontId of = _screen->_currentFont;
+ if (menu.item[i].saveSlot > 0)
+ _screen->setFont(Screen::FID_8_FNT);
if (_vm->gameFlags().platform != Common::kPlatformAmiga)
printMenuText(getMenuItemTitle(menu.item[i]), textX - 1, textY + 1, defaultColor1(), 0, 0);
printMenuText(getMenuItemTitle(menu.item[i]), textX, textY, menu.item[i].textColor, 0, 0);
+ _screen->setFont(of);
}
}
@@ -284,9 +294,13 @@ void GUI::redrawHighlight(const Menu &menu) {
textY++;
printMenuText(getMenuItemTitle(menu.item[i]), textX, textY, menu.item[i].highlightColor, 0, 8);
} else {
+ Screen::FontId of = _screen->_currentFont;
+ if (menu.item[i].saveSlot > 0)
+ _screen->setFont(Screen::FID_8_FNT);
if (_vm->gameFlags().platform != Common::kPlatformAmiga)
printMenuText(getMenuItemTitle(menu.item[i]), textX - 1, textY + 1, defaultColor1(), 0, 0);
printMenuText(getMenuItemTitle(menu.item[i]), textX, textY, menu.item[i].highlightColor, 0, 0);
+ _screen->setFont(of);
}
}
diff --git a/engines/kyra/gui_lok.cpp b/engines/kyra/gui_lok.cpp
index 8e47a47d92..a7646fcd96 100644
--- a/engines/kyra/gui_lok.cpp
+++ b/engines/kyra/gui_lok.cpp
@@ -682,15 +682,17 @@ int GUI_LoK::loadGameMenu(Button *button) {
}
void GUI_LoK::redrawTextfield() {
+ Screen::FontId of = _screen->setFont(Screen::FID_8_FNT);
_screen->fillRect(38, 91, 287, 102, _vm->gameFlags().platform == Common::kPlatformAmiga ? 18 : 250);
_text->printText(_savegameName, 38, 92, 253, 0, 0);
-
+
_screen->_charWidth = -2;
int width = _screen->getTextWidth(_savegameName);
_screen->fillRect(39 + width, 93, 45 + width, 100, _vm->gameFlags().platform == Common::kPlatformAmiga ? 31 : 254);
_screen->_charWidth = 0;
_screen->updateScreen();
+ _screen->setFont(of);
}
void GUI_LoK::updateSavegameString() {
@@ -749,7 +751,7 @@ int GUI_LoK::saveGame(Button *button) {
}
redrawTextfield();
- while (_displaySubMenu && !_vm->shouldQuit()) {
+ while (_displaySubMenu && !_vm->shouldQuit()) {
checkTextfieldInput();
updateSavegameString();
processHighlights(_menu[3]);
diff --git a/engines/kyra/gui_lol.cpp b/engines/kyra/gui_lol.cpp
index f26c0d6576..04c597a534 100644
--- a/engines/kyra/gui_lol.cpp
+++ b/engines/kyra/gui_lol.cpp
@@ -2457,6 +2457,7 @@ int GUI_LoL::runMenu(Menu &menu) {
textCursorTimer = 0;
textCursorStatus = 0;
+ Screen::FontId f = _screen->setFont(Screen::FID_9_FNT);
fC = _screen->getTextWidth(_saveDescription);
while (fC >= fW) {
_saveDescription[strlen(_saveDescription) - 1] = 0;
@@ -2464,6 +2465,7 @@ int GUI_LoL::runMenu(Menu &menu) {
}
_screen->fprintString("%s", (d->sx << 3), d->sy + 2, d->unk8, d->unkA, 0, _saveDescription);
+ f = _screen->setFont(f);
_screen->fillRect((d->sx << 3) + fC, d->sy, (d->sx << 3) + fC + wW, d->sy + d->h - (_vm->gameFlags().use16ColorMode ? 2 : 1), d->unk8, 0);
_screen->setCurPage(pg);
}
@@ -2473,17 +2475,20 @@ int GUI_LoL::runMenu(Menu &menu) {
if (_currentMenu == &_savenameMenu) {
if (textCursorTimer <= _vm->_system->getMillis()) {
+ Screen::FontId f = _screen->setFont(Screen::FID_9_FNT);
fC = _screen->getTextWidth(_saveDescription);
textCursorStatus ^= 1;
textCursorTimer = _vm->_system->getMillis() + 20 * _vm->_tickLength;
_screen->fillRect((d->sx << 3) + fC, d->sy, (d->sx << 3) + fC + wW, d->sy + d->h - (_vm->gameFlags().use16ColorMode ? 2 : 1), textCursorStatus ? d->unk8 : d->unkA, 0);
_screen->updateScreen();
+ f = _screen->setFont(f);
}
}
if (getInput()) {
if (!_newMenu) {
if (_currentMenu == &_savenameMenu) {
+ Screen::FontId f = _screen->setFont(Screen::FID_9_FNT);
_screen->fillRect((d->sx << 3) + fC, d->sy, (d->sx << 3) + fC + wW, d->sy + d->h - (_vm->gameFlags().use16ColorMode ? 2 : 1), d->unkA, 0);
fC = _screen->getTextWidth(_saveDescription);
while (fC >= fW) {
@@ -2492,6 +2497,7 @@ int GUI_LoL::runMenu(Menu &menu) {
}
_screen->fprintString("%s", (d->sx << 3), d->sy + 2, d->unk8, d->unkA, 0, _saveDescription);
_screen->fillRect((d->sx << 3) + fC, d->sy, (d->sx << 3) + fC + wW, d->sy + d->h - (_vm->gameFlags().use16ColorMode ? 2 : 1), textCursorStatus ? d->unk8 : d->unkA, 0);
+ f = _screen->setFont(f);
textCursorTimer = 0;
textCursorStatus = 0;
} else {
diff --git a/engines/kyra/gui_v2.cpp b/engines/kyra/gui_v2.cpp
index c5e5bab2d3..cf9ccfc0d3 100644
--- a/engines/kyra/gui_v2.cpp
+++ b/engines/kyra/gui_v2.cpp
@@ -746,17 +746,21 @@ const char *GUI_v2::nameInputProcess(char *buffer, int x, int y, uint8 c1, uint8
int curPos = strlen(buffer);
int x2 = x, y2 = y;
+ Screen::FontId of = _screen->setFont(Screen::FID_8_FNT);
_text->printText(buffer, x, y, c1, c2, c2);
-
+
for (int i = 0; i < curPos; ++i)
x2 += getCharWidth(buffer[i]);
drawTextfieldBlock(x2, y2, c3);
+ _screen->setFont(of);
_keyPressed.reset();
_cancelNameInput = _finishNameInput = false;
while (running && !_vm->shouldQuit()) {
+ of = _screen->setFont(Screen::FID_8_FNT);
checkTextfieldInput();
+ _screen->setFont(of);
processHighlights(_savenameMenu);
char inputKey = _keyPressed.ascii;
@@ -780,6 +784,7 @@ const char *GUI_v2::nameInputProcess(char *buffer, int x, int y, uint8 c1, uint8
_screen->updateScreen();
_lastScreenUpdate = _vm->_system->getMillis();
} else if ((uint8)inputKey > 31 && (uint8)inputKey < (_vm->gameFlags().lang == Common::JA_JPN ? 128 : 226) && curPos < bufferSize) {
+ of = _screen->setFont(Screen::FID_8_FNT);
if (x2 + getCharWidth(inputKey) + 7 < 0x11F) {
buffer[curPos] = inputKey;
const char text[2] = { buffer[curPos], 0 };
@@ -790,6 +795,7 @@ const char *GUI_v2::nameInputProcess(char *buffer, int x, int y, uint8 c1, uint8
_screen->updateScreen();
_lastScreenUpdate = _vm->_system->getMillis();
}
+ _screen->setFont(of);
}
_keyPressed.reset();