aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes
diff options
context:
space:
mode:
Diffstat (limited to 'Game/Code/Classes')
-rw-r--r--Game/Code/Classes/ULCD.pas18
-rw-r--r--Game/Code/Classes/ULight.pas9
-rw-r--r--Game/Code/Classes/UMain.pas14
3 files changed, 35 insertions, 6 deletions
diff --git a/Game/Code/Classes/ULCD.pas b/Game/Code/Classes/ULCD.pas
index a3cdac73..52b0f96a 100644
--- a/Game/Code/Classes/ULCD.pas
+++ b/Game/Code/Classes/ULCD.pas
@@ -1,6 +1,7 @@
unit ULCD;
interface
+{$I switches.inc}
type
TLCD = class
@@ -41,16 +42,24 @@ const
implementation
uses
- SysUtils, zlportio, UTime;
+ SysUtils,
+ {$IFDEF UseSerialPort}
+ zlportio,
+ {$ENDIF}
+ UTime;
procedure TLCD.WriteCommand(B: Byte);
// Wysylanie komend sterujacych
begin
- if not HalfInterface then begin
+{$IFDEF UseSerialPort}
+ if not HalfInterface then
+ begin
zlioportwrite(Control, 0, $02);
zlioportwrite(Data, 0, B);
zlioportwrite(Control, 0, $03);
- end else begin
+ end
+ else
+ begin
zlioportwrite(Control, 0, $02);
zlioportwrite(Data, 0, B and $F0);
zlioportwrite(Control, 0, $03);
@@ -66,11 +75,13 @@ begin
Sleep(2)
else
TimeSleep(0.1);
+{$ENDIF}
end;
procedure TLCD.WriteData(B: Byte);
// Wysylanie danych
begin
+{$IFDEF UseSerialPort}
if not HalfInterface then begin
zlioportwrite(Control, 0, $06);
zlioportwrite(Data, 0, B);
@@ -89,6 +100,7 @@ begin
TimeSleep(0.1);
Inc(Position);
+{$ENDIF}
end;
procedure TLCD.WriteString(S: string);
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;
diff --git a/Game/Code/Classes/UMain.pas b/Game/Code/Classes/UMain.pas
index 43010bde..e89b4785 100644
--- a/Game/Code/Classes/UMain.pas
+++ b/Game/Code/Classes/UMain.pas
@@ -1,8 +1,16 @@
unit UMain;
interface
+{$I switches.inc}
+
uses SDL, UGraphic, UMusic, URecord, UTime, SysUtils, UDisplay, UIni, ULog, ULyrics, UScreenSing,
- OpenGL12, zlportio {you can disable it and all PortWriteB calls}, ULCD, ULight, UThemes{, UScreenPopup};
+ OpenGL12,
+
+ {$IFDEF UseSerialPort}
+ zlportio {you can disable it and all PortWriteB calls},
+ {$ENDIF}
+
+ ULCD, ULight, UThemes{, UScreenPopup};
type
TPlayer = record
@@ -512,7 +520,9 @@ begin
if (TempBeat mod 4 <> 0) then Music.PlayHihat;*)
end;
- //PortWriteB($378, LPT_1 + LPT_2 * 2); // 0 zapala
+ {$IFDEF UseSerialPort}
+ // PortWriteB($378, LPT_1 + LPT_2 * 2); // 0 zapala
+ {$ENDIF}
end;
procedure NewBeatD(Sender: TScreenSing);