hedgewars/uPhysFSLayer.pas
branchios-revival
changeset 11139 4f4e97eb52fd
parent 11087 99578075df24
child 11155 a10143c3d87d
equal deleted inserted replaced
11138:05853b1df2a2 11139:4f4e97eb52fd
   149 end;
   149 end;
   150 
   150 
   151 procedure initModule;
   151 procedure initModule;
   152 var i: LongInt;
   152 var i: LongInt;
   153     cPhysfsId: shortstring;
   153     cPhysfsId: shortstring;
       
   154 {$IFNDEF MOBILE}
   154     fp: PChar;
   155     fp: PChar;
       
   156 {$ENDIF MOBILE}
   155 begin
   157 begin
   156 {$IFDEF HWLIBRARY}
   158 {$IFDEF HWLIBRARY}
   157     //TODO: http://icculus.org/pipermail/physfs/2011-August/001006.html
   159     //TODO: http://icculus.org/pipermail/physfs/2011-August/001006.html
   158     cPhysfsId:= GetCurrentDir() + {$IFDEF DARWIN}{$IFNDEF IPHONEOS}'/Hedgewars.app/Contents/MacOS/' + {$ENDIF}{$ENDIF} ' hedgewars';
   160     cPhysfsId:= GetCurrentDir() + {$IFDEF DARWIN}{$IFNDEF IPHONEOS}'/Hedgewars.app/Contents/MacOS/' + {$ENDIF}{$ENDIF} ' hedgewars';
   159 {$ELSE}
   161 {$ELSE}
   160     cPhysfsId:= ParamStr(0);
   162     cPhysfsId:= ParamStr(0);
   161 {$ENDIF}
   163 {$ENDIF}
   162 
   164 
   163     i:= PHYSFS_init(Str2PChar(cPhysfsId));
   165     i:= PHYSFS_init(Str2PChar(cPhysfsId));
   164     AddFileLog('[PhysFS] init: ' + inttostr(i));
   166     AddFileLog('[PhysFS] init: ' + inttostr(i));
   165 (*
   167 
       
   168 {$IFNDEF MOBILE}
   166     // mount system fonts paths first
   169     // mount system fonts paths first
   167     for i:= low(cFontsPaths) to high(cFontsPaths) do
   170     for i:= low(cFontsPaths) to high(cFontsPaths) do
   168         begin
   171         begin
   169             fp := cFontsPaths[i];
   172             fp := cFontsPaths[i];
   170             if fp <> nil then
   173             if fp <> nil then
   171                 pfsMount(ansistring(fp), PChar('/Fonts'));
   174                 pfsMount(ansistring(fp), PChar('/Fonts'));
   172         end;
   175         end;
   173 *)
   176 {$ENDIF MOBILE}
       
   177 
   174     pfsMountAtRoot(PathPrefix);
   178     pfsMountAtRoot(PathPrefix);
   175     pfsMountAtRoot(UserPathPrefix + ansistring('/Data'));
   179     pfsMountAtRoot(UserPathPrefix + ansistring('/Data'));
   176 
   180 
   177     hedgewarsMountPackages;
   181     hedgewarsMountPackages;
   178 
   182