--- a/hedgewars/uPhysFSLayer.pas Sun Sep 28 21:33:14 2014 +0400
+++ b/hedgewars/uPhysFSLayer.pas Tue Sep 30 00:54:04 2014 +0400
@@ -28,6 +28,8 @@
procedure pfsReadLnA(f: PFSFile; var s: ansistring);
function pfsBlockRead(f: PFSFile; buf: pointer; size: Int64): Int64;
function pfsEOF(f: PFSFile): boolean;
+function pfsEnumerateFiles(dir: shortstring): PPChar;
+procedure pfsFreeList(list: PPChar);
function pfsExists(fname: shortstring): boolean;
@@ -51,6 +53,8 @@
function PHYSFS_close(f: PFSFile): LongBool; cdecl; external PhysfsLibName;
function PHYSFS_exists(fname: PChar): LongBool; cdecl; external PhysfsLibName;
function PHYSFS_getLastError(): PChar; cdecl; external PhysfsLibName;
+function PHYSFS_enumerateFiles(dir: PChar): PPChar; cdecl; external PhysfsLibName;
+procedure PHYSFS_freeList(list: PPChar); cdecl; external PhysfsLibName;
{$ELSE}
function PHYSFS_readBytes(f: PFSFile; buffer: pointer; len: Int64): Int64;
begin
@@ -88,6 +92,15 @@
exit(PHYSFS_exists(Str2PChar(fname)))
end;
+function pfsEnumerateFiles(dir: shortstring): PPChar;
+begin
+ exit(PHYSFS_enumerateFiles(Str2PChar(dir)))
+end;
+
+procedure pfsFreeList(list: PPChar);
+begin
+ PHYSFS_freeList(list)
+end;
procedure pfsReadLn(f: PFSFile; var s: shortstring);
var c: char;
@@ -169,12 +182,10 @@
pfsMountAtRoot(localPrefix);
pfsMountAtRoot(userPrefix + ansistring('/Data'));
+ pfsMount(userPrefix, PChar('/Config'));
hedgewarsMountPackages;
- // need access to teams and frontend configs (for bindings)
- pfsMountAtRoot(userPrefix);
-
{$IFNDEF PAS2C}
if cTestLua then
begin