[Scummvm-cvs-logs] SF.net SVN: scummvm: [28563] scummvm/trunk/engines/parallaction

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Sun Aug 12 15:47:19 CEST 2007


Revision: 28563
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28563&view=rev
Author:   peres001
Date:     2007-08-12 06:47:19 -0700 (Sun, 12 Aug 2007)

Log Message:
-----------
Added more resource loading.

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/disk.h
    scummvm/trunk/engines/parallaction/disk_br.cpp

Modified: scummvm/trunk/engines/parallaction/disk.h
===================================================================
--- scummvm/trunk/engines/parallaction/disk.h	2007-08-12 13:27:48 UTC (rev 28562)
+++ scummvm/trunk/engines/parallaction/disk.h	2007-08-12 13:47:19 UTC (rev 28563)
@@ -201,6 +201,7 @@
 protected:
 	Parallaction 	*_vm;
 	char			_partPath[PATH_LEN];
+	char			_languageDir[2];
 
 protected:
 	void errorFileNotFound(const char *s);

Modified: scummvm/trunk/engines/parallaction/disk_br.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/disk_br.cpp	2007-08-12 13:27:48 UTC (rev 28562)
+++ scummvm/trunk/engines/parallaction/disk_br.cpp	2007-08-12 13:47:19 UTC (rev 28563)
@@ -46,6 +46,28 @@
 void DosDisk_br::setLanguage(uint16 language) {
 	debugC(5, kDebugDisk, "DosDisk_br::setLanguage");
 
+	switch (language) {
+	case 0:
+		strcpy(_languageDir, "it");
+		break;
+
+	case 1:
+		strcpy(_languageDir, "fr");
+		break;
+
+	case 2:
+		strcpy(_languageDir, "en");
+		break;
+
+	case 3:
+		strcpy(_languageDir, "ge");
+		break;
+
+	default:
+		error("unknown language");
+
+	}
+
 	return;
 }
 
@@ -64,7 +86,17 @@
 
 Script* DosDisk_br::loadLocation(const char *name) {
 	debugC(5, kDebugDisk, "DosDisk_br::loadLocation");
-	return 0;
+
+	char path[PATH_LEN];
+	sprintf(path, "%s/%s/%s.loc", _partPath, _languageDir, name);
+
+	debugC(3, kDebugDisk, "DosDisk_br::loadLocation(%s): trying '%s'", name, path);
+
+	Common::File stream;
+	if (!stream.open(path))
+		errorFileNotFound(path);
+
+	return new Script(&stream, false);
 }
 
 Script* DosDisk_br::loadScript(const char* name) {


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