hedgewars/uPhysFSLayer.pas
changeset 14946 23fc5022bdea
parent 14860 259840ca77e3
equal deleted inserted replaced
14945:00cf807b7faa 14946:23fc5022bdea
    33 function pfsClose(f: PFSFile): boolean;
    33 function pfsClose(f: PFSFile): boolean;
    34 
    34 
    35 procedure pfsReadLn(f: PFSFile; var s: shortstring);
    35 procedure pfsReadLn(f: PFSFile; var s: shortstring);
    36 procedure pfsReadLnA(f: PFSFile; var s: ansistring);
    36 procedure pfsReadLnA(f: PFSFile; var s: ansistring);
    37 procedure pfsWriteLn(f: PFSFile; s: shortstring);
    37 procedure pfsWriteLn(f: PFSFile; s: shortstring);
       
    38 procedure pfsWriteRaw(f: PFSFile; s: PChar; len: QWord);
    38 function pfsBlockRead(f: PFSFile; buf: pointer; size: Int64): Int64;
    39 function pfsBlockRead(f: PFSFile; buf: pointer; size: Int64): Int64;
    39 function pfsEOF(f: PFSFile): boolean;
    40 function pfsEOF(f: PFSFile): boolean;
    40 
    41 
    41 function pfsExists(fname: shortstring): boolean;
    42 function pfsExists(fname: shortstring): boolean;
    42 function pfsMakeDir(path: shortstring): boolean;
    43 function pfsMakeDir(path: shortstring): boolean;
   177     c:= #10;
   178     c:= #10;
   178     PHYSFS_writeBytes(f, @s[1], byte(s[0]));
   179     PHYSFS_writeBytes(f, @s[1], byte(s[0]));
   179     PHYSFS_writeBytes(f, @c, 1);
   180     PHYSFS_writeBytes(f, @c, 1);
   180 end;
   181 end;
   181 
   182 
       
   183 procedure pfsWriteRaw(f: PFSFile; s: PChar; len: QWord);
       
   184 begin
       
   185     PHYSFS_writeBytes(f, s, len);
       
   186 end;
       
   187 
   182 function pfsBlockRead(f: PFSFile; buf: pointer; size: Int64): Int64;
   188 function pfsBlockRead(f: PFSFile; buf: pointer; size: Int64): Int64;
   183 var r: Int64;
   189 var r: Int64;
   184 begin
   190 begin
   185     r:= PHYSFS_readBytes(f, buf, size);
   191     r:= PHYSFS_readBytes(f, buf, size);
   186 
   192