hedgewars/uStore.pas
branchphysfslayer
changeset 8025 07862ab415c8
parent 8022 10b3b93c1f56
child 8028 dc30104660d3
equal deleted inserted replaced
8022:10b3b93c1f56 8025:07862ab415c8
   308 
   308 
   309 if not reload then
   309 if not reload then
   310     for fi:= Low(THWFont) to High(THWFont) do
   310     for fi:= Low(THWFont) to High(THWFont) do
   311         with Fontz[fi] do
   311         with Fontz[fi] do
   312             begin
   312             begin
   313             s:= UserPathz[ptFonts] + '/' + Name;
   313             s:= cPathz[ptFonts] + '/' + Name;
   314             if not FileExists(s) then
       
   315                 s:= Pathz[ptFonts] + '/' + Name;
       
   316             WriteToConsole(msgLoading + s + ' (' + inttostr(Height) + 'pt)... ');
   314             WriteToConsole(msgLoading + s + ' (' + inttostr(Height) + 'pt)... ');
   317             Handle:= TTF_OpenFont(Str2PChar(s), Height);
   315             Handle:= TTF_OpenFontRW(Str2PChar(s), true, Height);
   318             SDLTry(Handle <> nil, true);
   316             SDLTry(Handle <> nil, true);
   319             TTF_SetFontStyle(Handle, style);
   317             TTF_SetFontStyle(Handle, style);
   320             WriteLnToConsole(msgOK)
   318             WriteLnToConsole(msgOK)
   321             end;
   319             end;
   322 
   320 
   564 begin
   562 begin
   565     LoadImage:= nil;
   563     LoadImage:= nil;
   566     WriteToConsole(msgLoading + filename + '.png [flags: ' + inttostr(imageFlags) + '] ');
   564     WriteToConsole(msgLoading + filename + '.png [flags: ' + inttostr(imageFlags) + '] ');
   567 
   565 
   568     s:= filename + '.png';
   566     s:= filename + '.png';
   569     tmpsurf:= IMG_Load_RW(PHYSFSRWOPS_openRead(Str2PChar(s)), true);
   567     tmpsurf:= IMG_Load_RW(rwopsOpenRead(s), true);
   570 
   568 
   571     if tmpsurf = nil then
   569     if tmpsurf = nil then
   572     begin
   570     begin
   573         OutError(msgFailed, (imageFlags and ifCritical) <> 0);
   571         OutError(msgFailed, (imageFlags and ifCritical) <> 0);
   574         exit;
   572         exit;