From e3fc5e2c58302159b79e0e25e183aa3e75397a41 Mon Sep 17 00:00:00 2001 From: jaybinks Date: Tue, 18 Sep 2007 11:16:30 +0000 Subject: added switches.inc , which will contain compiler directives used ( at least ) for porting to linux. this file now contains compiler directive UseSerialPort, which is conditionally set depending on the compiler. at this point lazarus will not use the serial port ( LCD or Light ) units. however this functionality should be maintained at this point in delphi. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@390 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/ULight.pas | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Game/Code/Classes/ULight.pas') diff --git a/Game/Code/Classes/ULight.pas b/Game/Code/Classes/ULight.pas index 1fc4aba8..b9c7af9e 100644 --- a/Game/Code/Classes/ULight.pas +++ b/Game/Code/Classes/ULight.pas @@ -1,5 +1,6 @@ unit ULight; interface +{$I switches.inc} type TLight = class @@ -30,7 +31,11 @@ const implementation uses - SysUtils, zlportio, UTime; + SysUtils, + {$IFDEF UseSerialPort} + zlportio, + {$ENDIF} + UTime; constructor TLight.Create; begin @@ -45,8 +50,10 @@ end; procedure TLight.SetState(State: integer); begin + {$IFDEF UseSerialPort} if Enabled then PortWriteB($378, State); + {$ENDIF} end; procedure TLight.AutoSetState; -- cgit v1.2.3