diff -r b216953c2617 -r 10b3b93c1f56 hedgewars/uPhysFSLayer.pas --- a/hedgewars/uPhysFSLayer.pas Tue Nov 13 23:21:46 2012 +0400 +++ b/hedgewars/uPhysFSLayer.pas Wed Nov 14 00:41:29 2012 +0400 @@ -1,14 +1,19 @@ unit uPhysFSLayer; {$LINKLIB ../bin/libphysfs.a} +{$LINKLIB ../bin/libphysfsrwops.a} interface +uses SDLh; procedure initModule; procedure freeModule; +function PHYSFSRWOPS_openRead(fname: PChar): PSDL_RWops; cdecl; external; +function PHYSFSRWOPS_openWrite(fname: PChar): PSDL_RWops; cdecl; external; + implementation -uses uUtils; +uses uUtils, uVariables; function PHYSFS_init(argv0: PChar) : LongInt; cdecl; external; function PHYSFS_deinit() : LongInt; cdecl; external; @@ -18,6 +23,9 @@ procedure initModule; begin PHYSFS_init(Str2PChar(ParamStr(0))); + + PHYSFS_mount(Str2PChar(PathPrefix), nil, true); + PHYSFS_mount(Str2PChar(UserPathPrefix), nil, true); end; procedure freeModule;