aboutsummaryrefslogtreecommitdiffstats
path: root/Game
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-02-05 16:34:22 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-02-05 16:34:22 +0000
commit5df25a794dd5ba29729574560a1622f77f6b7048 (patch)
treeda6e8297340d8263925d3d4cb7aa16792a469667 /Game
parent575a05b31780cc02145e14476d8f5e343b676ad4 (diff)
downloadusdx-5df25a794dd5ba29729574560a1622f77f6b7048.tar.gz
usdx-5df25a794dd5ba29729574560a1622f77f6b7048.tar.xz
usdx-5df25a794dd5ba29729574560a1622f77f6b7048.zip
updated to use the new UConfig.pas
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@825 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game')
-rw-r--r--Game/Code/Classes/Ulazjpeg.pas42
1 files changed, 22 insertions, 20 deletions
diff --git a/Game/Code/Classes/Ulazjpeg.pas b/Game/Code/Classes/Ulazjpeg.pas
index a5271a7e..2414002c 100644
--- a/Game/Code/Classes/Ulazjpeg.pas
+++ b/Game/Code/Classes/Ulazjpeg.pas
@@ -16,13 +16,15 @@
}
unit Ulazjpeg;
-{$mode objfpc}{$H+}
+{$mode delphi}
+
{$I switches.inc}
interface
uses
- SysUtils, Classes, FPImage, IntfGraphics, Graphics, FPReadJPEG, FPWriteJPEG;
+ SysUtils, Classes, FPImage, IntfGraphics, Graphics, FPReadJPEG, FPWriteJPEG,
+ UConfig;
type
TJPEGQualityRange = TFPJPEGCompressionQuality;
@@ -34,17 +36,17 @@ type
FProgressiveEncoding: boolean;
FQuality: TJPEGQualityRange;
protected
-{$IFDEF LAZARUS_V0924}
+{$IF LAZARUS_VERSION >= 000009024} // 0.9.24
procedure InitFPImageReader(IntfImg: TLazIntfImage; ImgReader: TFPCustomImageReader); override;
{$ELSE}
procedure InitFPImageReader(ImgReader: TFPCustomImageReader); override;
-{$ENDIF}
+{$IFEND}
procedure FinalizeFPImageReader(ImgReader: TFPCustomImageReader); override;
-{$IFDEF LAZARUS_V0924}
+{$IF LAZARUS_VERSION >= 000009024} // 0.9.24
procedure InitFPImageWriter(IntfImg: TLazIntfImage; ImgWriter: TFPCustomImageWriter); override;
{$ELSE}
procedure InitFPImageWriter(ImgWriter: TFPCustomImageWriter); override;
-{$ENDIF}
+{$IFEND}
public
constructor Create; override;
class function GetFileExtensions: string; override;
@@ -65,26 +67,26 @@ implementation
{ TJPEGImage }
-{$IFDEF LAZARUS_V0924}
+{$IF LAZARUS_VERSION >= 000009024} // 0.9.24
procedure TJPEGImage.InitFPImageReader(IntfImg: TLazIntfImage; ImgReader: TFPCustomImageReader);
{$ELSE}
procedure TJPEGImage.InitFPImageReader(ImgReader: TFPCustomImageReader);
-{$ENDIF}
+{$IFEND}
var
JPEGReader: TFPReaderJPEG;
begin
if ImgReader is TFPReaderJPEG then begin
JPEGReader:=TFPReaderJPEG(ImgReader);
JPEGReader.Performance:=Performance;
-{$IFDEF LAZARUS_V0924}
- JPEGReader.OnProgress:=@Progress;
-{$ENDIF}
+{$IF LAZARUS_VERSION >= 000009024} // 0.9.24
+ JPEGReader.OnProgress:=Progress;
+{$IFEND}
end;
-{$IFDEF LAZARUS_V0924}
+{$IF LAZARUS_VERSION >= 000009024} // 0.9.24
inherited InitFPImageReader(IntfImg, ImgReader);
{$ELSE}
inherited InitFPImageReader(ImgReader);
-{$ENDIF}
+{$IFEND}
end;
procedure TJPEGImage.FinalizeFPImageReader(ImgReader: TFPCustomImageReader);
@@ -98,11 +100,11 @@ begin
inherited FinalizeFPImageReader(ImgReader);
end;
-{$IFDEF LAZARUS_V0924}
+{$IF LAZARUS_VERSION >= 000009024} // 0.9.24
procedure TJPEGImage.InitFPImageWriter(IntfImg: TLazIntfImage; ImgWriter: TFPCustomImageWriter);
{$ELSE}
procedure TJPEGImage.InitFPImageWriter(ImgWriter: TFPCustomImageWriter);
-{$ENDIF}
+{$IFEND}
var
JPEGWriter: TFPWriterJPEG;
begin
@@ -111,15 +113,15 @@ begin
if JPEGWriter<>nil then ;
JPEGWriter.ProgressiveEncoding:=ProgressiveEncoding;
JPEGWriter.CompressionQuality:=CompressionQuality;
-{$IFDEF LAZARUS_V0924}
- JPEGWriter.OnProgress:=@Progress;
-{$ENDIF}
+{$IF LAZARUS_VERSION >= 000009024} // 0.9.24
+ JPEGWriter.OnProgress:=Progress;
+{$IFEND}
end;
-{$IFDEF LAZARUS_V0924}
+{$IF LAZARUS_VERSION >= 000009024} // 0.9.24
inherited InitFPImageWriter(IntfImg, ImgWriter);
{$ELSE}
inherited InitFPImageWriter(ImgWriter);
-{$ENDIF}
+{$IFEND}
end;
class function TJPEGImage.GetDefaultFPReader: TFPCustomImageReaderClass;