ULTIMA8: Fix some U8 Japanese text

This commit is contained in:
Matthew Duggan 2020-08-29 18:11:13 +09:00
parent d6855a6691
commit 92f6d5bb45
2 changed files with 27 additions and 7 deletions

View File

@ -1,3 +1,14 @@
# Note: these strings are not utf, they are set to match data in U8 Japanese so
# they can be rendered with the same code
[text]
Give thy name:=名前を入力して下さい
HERE LIES*THE AVATAR*REST IN PEACE=HERE LIES*THE AVATAR*REST IN PEACE%アバタール、安らかに眠る
Quit the game?=ゲームを終了しますか?
[gumps]
# quit confirmation is text-only in Japanese game
18,0=0,0
[jpfonts]
0=16,0xC0C0FF
5=16,0xFFAE00

View File

@ -102,14 +102,23 @@ void QuitGump::InitGump(Gump *newparent, bool take_focus) {
FrameID askshape(GameData::GUMPS, _askShape, 0);
askshape = _TL_SHP_(askshape);
Shape *askShape = GameData::get_instance()->getShape(askshape);
const ShapeFrame *sf = askShape->getFrame(askshape._frameNum);
assert(sf);
if (askshape._shapeNum == 0) {
// In JP U8, the ask gump is replaced with text
// confirming quit
Std::string askstr = _TL_("Quit the game?");
Gump *widget = new TextWidget(0, 0, askstr, true, 6); // CONSTANT!
widget->InitGump(this, false);
widget->setRelativePosition(TOP_CENTER, 0, 13);
} else {
Shape *askShape = GameData::get_instance()->getShape(askshape);
const ShapeFrame *sf = askShape->getFrame(askshape._frameNum);
assert(sf);
Gump *ask = new Gump(0, 0, sf->_width, sf->_height);
ask->SetShape(askShape, askshape._frameNum);
ask->InitGump(this);
ask->setRelativePosition(TOP_CENTER, 0, 5);
Gump *ask = new Gump(0, 0, sf->_width, sf->_height);
ask->SetShape(askShape, askshape._frameNum);
ask->InitGump(this);
ask->setRelativePosition(TOP_CENTER, 0, 5);
}
}
FrameID yesbutton_up(GameData::GUMPS, _yesShape, 0);