diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-07-23 18:28:51 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-07-23 18:28:51 +0000 |
commit | b404f7c3cca3354d4ca6a0b13e10dbaf2b659b7f (patch) | |
tree | d59e90891bf1a3539eb812fdc45bf5aba82eb31f /unicode | |
parent | 6df2a5bd0ac569527dde95eccf69f2ae8b8f7c3f (diff) | |
download | usdx-b404f7c3cca3354d4ca6a0b13e10dbaf2b659b7f.tar.gz usdx-b404f7c3cca3354d4ca6a0b13e10dbaf2b659b7f.tar.xz usdx-b404f7c3cca3354d4ca6a0b13e10dbaf2b659b7f.zip |
THandleStream -> TStream as the THandleStream stuff is not used
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1879 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'unicode')
-rw-r--r-- | unicode/src/base/UFont.pas | 2 | ||||
-rw-r--r-- | unicode/src/base/UImage.pas | 21 |
2 files changed, 11 insertions, 12 deletions
diff --git a/unicode/src/base/UFont.pas b/unicode/src/base/UFont.pas index d91dca59..32764be3 100644 --- a/unicode/src/base/UFont.pas +++ b/unicode/src/base/UFont.pas @@ -2600,7 +2600,7 @@ end; procedure TBitmapFont.LoadFontInfo(const InfoFile: IPath); var - Stream: THandleStream; + Stream: TStream; begin FillChar(fWidths[0], Length(fWidths), 0); diff --git a/unicode/src/base/UImage.pas b/unicode/src/base/UImage.pas index b5d853dd..9efcf9cc 100644 --- a/unicode/src/base/UImage.pas +++ b/unicode/src/base/UImage.pas @@ -284,26 +284,26 @@ end; procedure user_read_data(png_ptr: png_structp; data: png_bytep; length: png_size_t); cdecl; var - inFile: THandleStream; + inFile: TStream; begin - inFile := THandleStream(png_get_io_ptr(png_ptr)); + inFile := TStream(png_get_io_ptr(png_ptr)); inFile.Read(data^, length); end; procedure user_write_data(png_ptr: png_structp; data: png_bytep; length: png_size_t); cdecl; var - outFile: THandleStream; + outFile: TStream; begin - outFile := THandleStream(png_get_io_ptr(png_ptr)); + outFile := TStream(png_get_io_ptr(png_ptr)); outFile.Write(data^, length); end; procedure user_flush_data(png_ptr: png_structp); cdecl; //var -// outFile: TFileStream; +// outFile: TStream; begin // binary files are flushed automatically, Flush() works with Text-files only - //outFile := TFileStream(png_get_io_ptr(png_ptr)); + //outFile := TStream(png_get_io_ptr(png_ptr)); //outFile.Flush(); end; @@ -329,7 +329,7 @@ function WritePNGImage(const FileName: IPath; Surface: PSDL_Surface): boolean; var png_ptr: png_structp; info_ptr: png_infop; - pngFile: THandleStream; + pngFile: TStream; row: integer; rowData: array of png_bytep; // rowStride: integer; @@ -504,7 +504,7 @@ type *) function WriteBMPImage(const FileName: IPath; Surface: PSDL_Surface): boolean; var - bmpFile: THandleStream; + bmpFile: TStream; FileInfo: BITMAPINFOHEADER; FileHeader: BITMAPFILEHEADER; Converted: boolean; @@ -721,7 +721,7 @@ begin try jpgFile := TBinaryFileStream.Create(FileName, fmCreate); except - Log.LogError('Could not open file: "' + FileName + '"', 'WriteJPGImage'); + Log.LogError('Could not open file: "' + FileName.ToNative + '"', 'WriteJPGImage'); Exit; end; @@ -799,8 +799,7 @@ begin try SDLStream := SDLStreamSetup(TBinaryFileStream.Create(FilenameCaseAdj, fmOpenRead)); Result := IMG_Load_RW(SDLStream, 1); - // Note: the TBinaryFileStream is freed by the SDL-stream. The SDL-stream in - // turn is freed automatically by IMG_Load_RW(). + // Note: TBinaryFileStream is freed by SDLStream. SDLStream by IMG_Load_RW(). except Log.LogError('Could not load from file "' + FilenameCaseAdj.ToNative + '"', 'LoadImage'); Exit; |