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

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Sun Aug 12 15:21:45 CEST 2007


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

Log Message:
-----------
Disk can now load tables for BRA.

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:10:04 UTC (rev 28560)
+++ scummvm/trunk/engines/parallaction/disk.h	2007-08-12 13:21:45 UTC (rev 28561)
@@ -200,6 +200,7 @@
 
 protected:
 	Parallaction 	*_vm;
+	char			_partPath[PATH_LEN];
 
 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:10:04 UTC (rev 28560)
+++ scummvm/trunk/engines/parallaction/disk_br.cpp	2007-08-12 13:21:45 UTC (rev 28561)
@@ -36,7 +36,11 @@
 
 Common::String DosDisk_br::selectArchive(const Common::String& name) {
 	debugC(5, kDebugDisk, "DosDisk_br::selectArchive");
-	return "";
+
+	Common::String oldPath(_partPath);
+	strcpy(_partPath, name.c_str());
+
+	return oldPath;
 }
 
 void DosDisk_br::setLanguage(uint16 language) {
@@ -175,6 +179,24 @@
 
 Table* DosDisk_br::loadTable(const char* name) {
 	debugC(5, kDebugDisk, "DosDisk_br::loadTable");
+
+	char path[PATH_LEN];
+	sprintf(path, "%s/%s.tab", _partPath, name);
+
+	Common::File	stream;
+	if (!stream.open(path))
+		errorFileNotFound(path);
+
+	Table *t = new Table(100);
+
+	fillBuffers(stream);
+	while (scumm_stricmp(_tokens[0], "ENDTABLE")) {
+		t->addData(_tokens[0]);
+		fillBuffers(stream);
+	}
+
+	stream.close();
+
 	return 0;
 }
 


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