[Scummvm-git-logs] scummvm master -> 92f6d5bb4597d48992853b623937b02005c4bdee

mduggan mgithub at guarana.org
Sat Aug 29 09:11:23 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
92f6d5bb45 ULTIMA8: Fix some U8 Japanese text


Commit: 92f6d5bb4597d48992853b623937b02005c4bdee
    https://github.com/scummvm/scummvm/commit/92f6d5bb4597d48992853b623937b02005c4bdee
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2020-08-29T18:11:13+09:00

Commit Message:
ULTIMA8: Fix some U8 Japanese text

Changed paths:
    devtools/create_ultima/files/ultima8/u8japanese.ini
    engines/ultima/ultima8/gumps/quit_gump.cpp


diff --git a/devtools/create_ultima/files/ultima8/u8japanese.ini b/devtools/create_ultima/files/ultima8/u8japanese.ini
index 628c12f91c..8bf59d711b 100644
--- a/devtools/create_ultima/files/ultima8/u8japanese.ini
+++ b/devtools/create_ultima/files/ultima8/u8japanese.ini
@@ -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:=–¼‘O‚ð“ü—Í‚µ‚ĉº‚³‚¢
+HERE LIES*THE AVATAR*REST IN PEACE=HERE LIES*THE AVATAR*REST IN PEACE%ƒAƒoƒ^[ƒ‹AˆÀ‚ç‚©‚É–°‚é
+Quit the game?=ƒQ[ƒ€‚ðI—¹‚µ‚Ü‚·‚©?
+
+[gumps]
+# quit confirmation is text-only in Japanese game
+18,0=0,0
+
 [jpfonts]
 0=16,0xC0C0FF
 5=16,0xFFAE00
diff --git a/engines/ultima/ultima8/gumps/quit_gump.cpp b/engines/ultima/ultima8/gumps/quit_gump.cpp
index 5bac84ed3a..6316243fea 100644
--- a/engines/ultima/ultima8/gumps/quit_gump.cpp
+++ b/engines/ultima/ultima8/gumps/quit_gump.cpp
@@ -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);
-
-		Gump *ask = new Gump(0, 0, sf->_width, sf->_height);
-		ask->SetShape(askShape, askshape._frameNum);
-		ask->InitGump(this);
-		ask->setRelativePosition(TOP_CENTER, 0, 5);
+		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);
+		}
 	}
 
 	FrameID yesbutton_up(GameData::GUMPS, _yesShape, 0);




More information about the Scummvm-git-logs mailing list