hedgewars/uPhysFSLayer.pas
branchqmlfrontend
changeset 11828 a69124eb7ce7
parent 11699 83c40c1eb0e7
parent 11826 7654e2357934
child 11841 6adf27e85cae
equal deleted inserted replaced
11827:8c71c5a1172f 11828:a69124eb7ce7
    41 function  physfsReader(L: Plua_State; f: PFSFile; sz: Psize_t) : PChar; cdecl; external PhyslayerLibName;
    41 function  physfsReader(L: Plua_State; f: PFSFile; sz: Psize_t) : PChar; cdecl; external PhyslayerLibName;
    42 procedure physfsReaderSetBuffer(buf: pointer); cdecl; external PhyslayerLibName;
    42 procedure physfsReaderSetBuffer(buf: pointer); cdecl; external PhyslayerLibName;
    43 procedure hedgewarsMountPackage(filename: PChar); cdecl; external PhyslayerLibName;
    43 procedure hedgewarsMountPackage(filename: PChar); cdecl; external PhyslayerLibName;
    44 
    44 
    45 implementation
    45 implementation
    46 uses uConsts, uUtils, uVariables{$IFNDEF PAS2C}, sysutils{$ELSE}, physfs{$ENDIF};
    46 uses uConsts, uUtils, uVariables{$IFDEF PAS2C}, physfs{$ENDIF};
    47 
    47 
    48 function PHYSFSRWOPS_openRead(fname: PChar): PSDL_RWops; cdecl; external PhyslayerLibName;
    48 function PHYSFSRWOPS_openRead(fname: PChar): PSDL_RWops; cdecl; external PhyslayerLibName;
    49 function PHYSFSRWOPS_openWrite(fname: PChar): PSDL_RWops; cdecl; external PhyslayerLibName;
    49 function PHYSFSRWOPS_openWrite(fname: PChar): PSDL_RWops; cdecl; external PhyslayerLibName;
    50 procedure hedgewarsMountPackages(); cdecl; external PhyslayerLibName;
    50 procedure hedgewarsMountPackages(); cdecl; external PhyslayerLibName;
    51 {$IFNDEF PAS2C}
    51 {$IFNDEF PAS2C}
   203 {$IFNDEF MOBILE}
   203 {$IFNDEF MOBILE}
   204     fp: PChar;
   204     fp: PChar;
   205 {$ENDIF}
   205 {$ENDIF}
   206 begin
   206 begin
   207     //TODO: http://icculus.org/pipermail/physfs/2011-August/001006.html
   207     //TODO: http://icculus.org/pipermail/physfs/2011-August/001006.html
   208     cPhysfsId:= shortstring(GetCurrentDir()) + {$IFDEF DARWIN}{$IFNDEF IPHONEOS}'/Hedgewars.app/Contents/MacOS/' + {$ENDIF}{$ENDIF} ' hedgewars';
   208     cPhysfsId:= {$IFDEF DARWIN}{$IFNDEF IPHONEOS}'/Hedgewars.app/Contents/MacOS/' + {$ENDIF}{$ENDIF} ' hedgewars';
   209 
   209 
   210     i:= PHYSFS_init(Str2PChar(cPhysfsId));
   210     i:= PHYSFS_init(Str2PChar(cPhysfsId));
   211     //AddFileLog('[PhysFS] init: ' + inttostr(i));
   211     //AddFileLog('[PhysFS] init: ' + inttostr(i));
   212 
   212 
   213 {$IFNDEF MOBILE}
   213 {$IFNDEF MOBILE}