mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-24 21:21:05 +00:00
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
This commit is contained in:
parent
7755404f52
commit
f4288516e8
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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]);
|
||||
|
@ -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 {
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user