[Scummvm-cvs-logs] SF.net SVN: scummvm: [22005] scummvm/trunk/engines/gob

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Tue Apr 18 05:40:02 CEST 2006


Revision: 22005
Author:   drmccoy
Date:     2006-04-18 05:39:02 -0700 (Tue, 18 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22005&view=rev

Log Message:
-----------
- Closed the stub in Draw_v2::printText()
- Added a language field in GameSettings, so that the texts in
  Gob2 work for other languages than EN_GRB as well

Modified Paths:
--------------
    scummvm/trunk/engines/gob/draw_v2.cpp
    scummvm/trunk/engines/gob/gob.cpp
    scummvm/trunk/engines/gob/gob.h
Modified: scummvm/trunk/engines/gob/draw_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/draw_v2.cpp	2006-04-18 11:51:08 UTC (rev 22004)
+++ scummvm/trunk/engines/gob/draw_v2.cpp	2006-04-18 12:39:02 UTC (rev 22005)
@@ -329,14 +329,9 @@
 
 		case 10:
 			// loc_12C93
-			warning("GOB2 Stub! Draw_v2::printText: cmd == 10");
-/*
-WTF:
-			mov     ax, word ptr [bp+ptr]
-			xor     dx, dx
-			sub     ax, word ptr _game_totTextData
-			sbb     dx, 0
-*/
+			str[0] = (char)255;
+			*((int16*)(str+1)) = ptr - (char *)_vm->_game->_totTextData;
+			str[3] = 0;
 			ptr++;
 			i = *ptr++;
 			for (i = *ptr++; i > 0; i--) {

Modified: scummvm/trunk/engines/gob/gob.cpp
===================================================================
--- scummvm/trunk/engines/gob/gob.cpp	2006-04-18 11:51:08 UTC (rev 22004)
+++ scummvm/trunk/engines/gob/gob.cpp	2006-04-18 12:39:02 UTC (rev 22005)
@@ -58,62 +58,63 @@
 	const char *gameid;
 	const char *description;
 	uint32 features;
+	Common::Language lang;
 	const char *md5sum;
 };
 
 static const GameSettings gob_games[] = {
 	// Supplied by Florian Zeitz on scummvm-devel
-	{"gob1", "Gobliiins (DOS EGA)", GF_GOB1 | GF_EGA, "82aea70ef26f41fa963dfae270993e49"},
-	{"gob1", "Gobliiins (DOS EGA)", GF_GOB1 | GF_EGA, "1f499458837008058b8ba6ae07057214"},
-	{"gob1", "Gobliiins (Windows)", GF_GOB1, "8a5e850c49d7cacdba5f5eb1fcc77b89"},
+	{"gob1", "Gobliiins (DOS EGA)", GF_GOB1 | GF_EGA, Common::UNK_LANG, "82aea70ef26f41fa963dfae270993e49"},
+	{"gob1", "Gobliiins (DOS EGA)", GF_GOB1 | GF_EGA, Common::UNK_LANG, "1f499458837008058b8ba6ae07057214"},
+	{"gob1", "Gobliiins (Windows)", GF_GOB1, Common::UNK_LANG, "8a5e850c49d7cacdba5f5eb1fcc77b89"},
 
 	// Supplied by Theruler76 in bug report #1201233
-	{"gob1", "Gobliiins (DOS VGA)", GF_GOB1, "a5e232fcd02733c7dffff107d22d36eb"},
+	{"gob1", "Gobliiins (DOS VGA)", GF_GOB1, Common::UNK_LANG, "a5e232fcd02733c7dffff107d22d36eb"},
 
 	// CD 1.000 version. Multilingual
-	{"gob1", "Gobliiins (CD)", GF_GOB1 | GF_CD, "037db48ebce94bdfe42e2c9510da9211"},
+	{"gob1", "Gobliiins (CD)", GF_GOB1 | GF_CD, Common::UNK_LANG, "037db48ebce94bdfe42e2c9510da9211"},
 	// CD 1.02 version. Multilingual
-	{"gob1", "Gobliiins (CD)", GF_GOB1 | GF_CD, "45f9c1162dd7040fd05fd013ccc176e2"},
+	{"gob1", "Gobliiins (CD)", GF_GOB1 | GF_CD, Common::UNK_LANG, "45f9c1162dd7040fd05fd013ccc176e2"},
 
-	{"gob1", "Gobliiins (Amiga)", GF_GOB1, "d9f8736b7dc0ea891cd06592a72e8a72"},
-	{"gob1", "Gobliiins (Amiga)", GF_GOB1, "69f9ae85252271e7dfa62883e581e5e9"},
-	{"gob1", "Gobliiins (Amiga)", GF_GOB1, "26de406cb09228d902274446a6a2eceb"},
-	{"gob1", "Gobliiins (Amiga)", GF_GOB1, "baf88a95928edb3f51067983f2dffa93"},
+	{"gob1", "Gobliiins (Amiga)", GF_GOB1, Common::UNK_LANG, "d9f8736b7dc0ea891cd06592a72e8a72"},
+	{"gob1", "Gobliiins (Amiga)", GF_GOB1, Common::UNK_LANG, "69f9ae85252271e7dfa62883e581e5e9"},
+	{"gob1", "Gobliiins (Amiga)", GF_GOB1, Common::UNK_LANG, "26de406cb09228d902274446a6a2eceb"},
+	{"gob1", "Gobliiins (Amiga)", GF_GOB1, Common::UNK_LANG, "baf88a95928edb3f51067983f2dffa93"},
 
-	{"gob1", "Gobliiins (Interactive Demo)", GF_GOB1, "4f5bf4b9e4c39ebb93579747fc678e97"},
+	{"gob1", "Gobliiins (Interactive Demo)", GF_GOB1, Common::UNK_LANG, "4f5bf4b9e4c39ebb93579747fc678e97"},
 	
-	{"gob1", "Gobliiins (Mac)", GF_GOB1 | GF_MAC, "4c0e8ce4a2f66ee8226952ad3c6c1155"},
+	{"gob1", "Gobliiins (Mac)", GF_GOB1 | GF_MAC, Common::UNK_LANG, "4c0e8ce4a2f66ee8226952ad3c6c1155"},
 
-	{"gob2", "Gobliins 2 (DOS)", GF_GOB2, "abb5f762f9979d4253002de20f6e7b56"},
-	{"gob2", "Gobliins 2 (DOS)", GF_GOB2, "9b6de65d811c08eebf50391b84fcba92"},
-	{"gob2", "Gobliins 2 (DOS)", GF_GOB2, "54d59c200e3823ad0af11a605a6fd06a"},
-	{"gob2", "Gobliins 2 (DOS Ru)", GF_GOB2, "b6d47494bf88398ae59c1b5656cafce4"},
+	{"gob2", "Gobliins 2 (DOS)", GF_GOB2, Common::FR_FRA, "abb5f762f9979d4253002de20f6e7b56"},
+	{"gob2", "Gobliins 2 (DOS)", GF_GOB2, Common::EN_GRB, "9b6de65d811c08eebf50391b84fcba92"},
+	{"gob2", "Gobliins 2 (DOS)", GF_GOB2, Common::EN_USA, "54d59c200e3823ad0af11a605a6fd06a"},
+	{"gob2", "Gobliins 2 (DOS Ru)", GF_GOB2, Common::RU_RUS, "b6d47494bf88398ae59c1b5656cafce4"},
 	// CD 1.000.
-	{"gob2", "Gobliins 2 (CD)", GF_GOB2, "02bf538fd8003b8da23a3546299c3df4"},
+	{"gob2", "Gobliins 2 (CD)", GF_GOB2, Common::EN_USA, "02bf538fd8003b8da23a3546299c3df4"},
 	// CD 1.01
-	{"gob2", "Gobliins 2 (CD)", GF_GOB2, "410e632682ab11969bc3b3b588066d95"},
-	{"gob2", "Gobliins 2 (Demo)", GF_GOB2, "be8b111191f965ac9b28fe530580d14e"},
+	{"gob2", "Gobliins 2 (CD)", GF_GOB2, Common::UNK_LANG, "410e632682ab11969bc3b3b588066d95"},
+	{"gob2", "Gobliins 2 (Demo)", GF_GOB2, Common::UNK_LANG, "be8b111191f965ac9b28fe530580d14e"},
 
 #if 0
-	{"gob3", "Goblins Quest 3", GF_GOB3, "36d9b4032b39a794c8640e500e98893a"},
-	{"gob3", "Goblins Quest 3", GF_GOB3, "d129f639f6ca8d6b5f0f4e15edb91058"},
-	{"gob3", "Goblins Quest 3", GF_GOB3, "8d17b0abc514b1512fdedc6072acd48b"},
+	{"gob3", "Goblins Quest 3", GF_GOB3, Common::UNK_LANG, "36d9b4032b39a794c8640e500e98893a"},
+	{"gob3", "Goblins Quest 3", GF_GOB3, Common::UNK_LANG, "d129f639f6ca8d6b5f0f4e15edb91058"},
+	{"gob3", "Goblins Quest 3", GF_GOB3, Common::UNK_LANG, "8d17b0abc514b1512fdedc6072acd48b"},
 	// CD 1.000
-	{"gob3", "Goblins Quest 3 (CD)", GF_GOB3, "8d17b0abc514b1512fdedc6072acd48b"},
+	{"gob3", "Goblins Quest 3 (CD)", GF_GOB3, Common::UNK_LANG, "8d17b0abc514b1512fdedc6072acd48b"},
 	// CD 1.02. Spanish "Computer Gaming World"* distribution in Spain
-	{"gob3", "Goblins Quest 3 (CD)", GF_GOB3, "7d7ab9a987be7208b9b685846fbd3e82"},
+	{"gob3", "Goblins Quest 3 (CD)", GF_GOB3, Common::UNK_LANG, "7d7ab9a987be7208b9b685846fbd3e82"},
 
-	{"gob3", "Goblins Quest 3 (Interactive Demo)", GF_GOB3, "4986b44cec309589508d7904f924c217"},
+	{"gob3", "Goblins Quest 3 (Interactive Demo)", GF_GOB3, Common::UNK_LANG, "4986b44cec309589508d7904f924c217"},
 	{"gob3", "Goblins Quest 3 (Demo)", GF_GOB3, "5024e7de8d6377fbbeabbaa92e0452bc"},
-	{"gob3", "Goblins Quest 3 (Interactive Demo)", GF_GOB3, "59ab69dab5fddbbf698c77a84297a5a2"},
+	{"gob3", "Goblins Quest 3 (Interactive Demo)", GF_GOB3, Common::UNK_LANG, "59ab69dab5fddbbf698c77a84297a5a2"},
 
 	// CD 1.0
-	{"woodruff", "The Bizarre Adventures of Woodruff and the Schnibble", GF_WOODRUFF, "c27402cee260d2ff1c4cecb2006a630a"},
+	{"woodruff", "The Bizarre Adventures of Woodruff and the Schnibble", GF_WOODRUFF, Common::UNK_LANG, "c27402cee260d2ff1c4cecb2006a630a"},
 
 	// CD 1.00, German release (INTRO.STRK seems to be multilingual, though?)
-	{"woodruff", "The Bizarre Adventures of Woodruff and the Schnibble", GF_WOODRUFF, "751ba028d215e0db1e0254853de6a7e4"},
+	{"woodruff", "The Bizarre Adventures of Woodruff and the Schnibble", GF_WOODRUFF, Common::UNK_LANG, "751ba028d215e0db1e0254853de6a7e4"},
 #endif
-	{0, 0, 0, 0}
+	{0, 0, 0, Common::UNK_LANG, 0}
 };
 
 // Keep list of different supported games
@@ -126,7 +127,7 @@
 
 #define MAX_TIME_DELTA 100
 
-GobEngine::GobEngine(OSystem * syst, uint32 features)
+GobEngine::GobEngine(OSystem * syst, uint32 features, Common::Language lang)
  : Engine(syst) {
 	// Setup mixer
 	if (!_mixer->isReady()) {
@@ -137,6 +138,7 @@
 	_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
 
 	_features = features;
+	_language = lang;
 	_copyProtection = ConfMan.getBool("copy_protection");
 
 	Common::addSpecialDebugLevel(DEBUG_FUNCOP, "FuncOpcodes", "Script FuncOpcodes debug level");
@@ -243,19 +245,38 @@
 	_global->_useMouse = 1;
 	_global->_soundFlags = 0;
 
-	switch (Common::parseLanguage(ConfMan.get("language"))) {
+	if (ConfMan.hasKey("language"))
+		_language = Common::parseLanguage(ConfMan.get("language"));
+
+	switch (_language) {
 	case Common::FR_FRA:
+	case Common::RU_RUS:
 		_global->_language = 0;
 		break;
 	case Common::DE_DEU:
 		_global->_language = 1;
 		break;
+	case Common::EN_GRB:
+		_global->_language = 2;
+		break;
 	case Common::ES_ESP:
 		_global->_language = 3;
 		break;
 	case Common::IT_ITA:
 		_global->_language = 4;
 		break;
+	case Common::EN_USA:
+		_global->_language = 5;
+		break;
+	case Common::NL_NLD:
+		_global->_language = 6;
+		break;
+	case Common::KO_KOR:
+		_global->_language = 7;
+		break;
+	case Common::HB_ISR:
+		_global->_language = 8;
+		break;
 	default:
 		// Default to English
 		_global->_language = 2;
@@ -382,7 +403,7 @@
 		printf("Unknown MD5 (%s)! Please report the details (language, platform, etc.) of this game to the ScummVM team\n", md5str);
 	}
 
-	return new GobEngine(syst, features);
+	return new GobEngine(syst, features, g->lang);
 }
 
 REGISTER_PLUGIN(GOB, "Gob Engine");

Modified: scummvm/trunk/engines/gob/gob.h
===================================================================
--- scummvm/trunk/engines/gob/gob.h	2006-04-18 11:51:08 UTC (rev 22004)
+++ scummvm/trunk/engines/gob/gob.h	2006-04-18 12:39:02 UTC (rev 22005)
@@ -88,7 +88,7 @@
 	int init();
 
 public:
-	GobEngine(OSystem *syst, uint32 features);
+	GobEngine(OSystem *syst, uint32 features, Common::Language lang);
 	virtual ~GobEngine();
 
 	void shutdown();
@@ -96,6 +96,7 @@
 	Common::RandomSource _rnd;
 
 	int32 _features;
+	Common::Language _language;
 	bool _copyProtection;
 
 	Game *_game;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the Scummvm-git-logs mailing list