[Smipl-devel] SF.net SVN: smipl:[38] smipl-devel
Brought to you by:
the_student
From: <the...@us...> - 2009-08-15 18:55:17
|
Revision: 38 http://smipl.svn.sourceforge.net/smipl/?rev=38&view=rev Author: the_student Date: 2009-08-15 18:55:10 +0000 (Sat, 15 Aug 2009) Log Message: ----------- * Modified FS_init to enable use of PHYSFS_mount, instead of PHYSFS_addToSearchPath. * You can now mount, for example documentation in an alternative language by adding the lines "international/NO-nb/Help /Help", and "international/NO-nb/About /About" without the quotes, which would replace the original files in /About and /Help, without mounting everything in international/NO-nb/. * Updated FS.zip Modified Paths: -------------- smipl-devel/FS.zip smipl-devel/PartList.lst smipl-devel/src/FS/FS.h Added Paths: ----------- smipl-devel/FS/Library/ Modified: smipl-devel/FS.zip =================================================================== (Binary files differ) Modified: smipl-devel/PartList.lst =================================================================== --- smipl-devel/PartList.lst 2009-08-10 14:52:48 UTC (rev 37) +++ smipl-devel/PartList.lst 2009-08-15 18:55:10 UTC (rev 38) @@ -1 +1,6 @@ -FS.zip \ No newline at end of file +FS.zip +FS/About /About +FS/Console /Console +FS/Help /Help +FS/Script /Script +FS/Library /Library Modified: smipl-devel/src/FS/FS.h =================================================================== --- smipl-devel/src/FS/FS.h 2009-08-10 14:52:48 UTC (rev 37) +++ smipl-devel/src/FS/FS.h 2009-08-15 18:55:10 UTC (rev 38) @@ -60,15 +60,22 @@ bool FS_init() { - char Name[255]; + SMIPL_String Part; fstream PartList("partlist.lst"); if(PartList.is_open()) { while(!PartList.eof()){ - PartList.getline(Name,255); - if(strlen(Name)==0) continue; - cout<<"Loading "<<Name<<" - "; - if(!PHYSFS_addToSearchPath(Name,0)) {SetLastSysError((char*)PHYSFS_getLastError());return false;} + PartList.getline(Part.str,255); + if(strlen(Part.str)==0) continue; + cout<<"Loading "<<Part.str<<" - "; + Part.Split(); + if(Part.argc==1) { + if(!PHYSFS_mount(Part.argv[0], "/", 0)) {SetLastSysError((char*)PHYSFS_getLastError());return false;} else cout<<"OK"<<endl; + } + else { + if(!PHYSFS_mount(Part.argv[0], Part.argv[1], 0)) {SetLastSysError((char*)PHYSFS_getLastError());return false;} + else cout<<"OK"<<endl; + } } PartList.close(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |