equal
deleted
inserted
replaced
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} |