diff options
author | jaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-09-19 11:44:10 +0000 |
---|---|---|
committer | jaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-09-19 11:44:10 +0000 |
commit | 62c82114318ed04ce42617fa9ce2e179834dbda4 (patch) | |
tree | 65bf831fa62613baa778fd1413b3c0220fe951fb /Game/Code/Screens/UScreenEditConvert.pas | |
parent | 433a1b7339e2bf96f3b0bb4c98b8c799c6540027 (diff) | |
download | usdx-62c82114318ed04ce42617fa9ce2e179834dbda4.tar.gz usdx-62c82114318ed04ce42617fa9ce2e179834dbda4.tar.xz usdx-62c82114318ed04ce42617fa9ce2e179834dbda4.zip |
added UCommon ( in classes ) for lazarus...
common functions needed for lazarus ( and others ) can be put in here.
also this now compiles on lazarus..
( dosnt link yet... but I dont get any critical compiler errors )
tested to compile in my delphi, and basic functionality is fine.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@395 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Screens/UScreenEditConvert.pas')
-rw-r--r-- | Game/Code/Screens/UScreenEditConvert.pas | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Game/Code/Screens/UScreenEditConvert.pas b/Game/Code/Screens/UScreenEditConvert.pas index cb6aef6d..762f84c2 100644 --- a/Game/Code/Screens/UScreenEditConvert.pas +++ b/Game/Code/Screens/UScreenEditConvert.pas @@ -2,6 +2,10 @@ unit UScreenEditConvert; interface
+{$IFDEF FPC}
+ {$MODE DELPHI}
+{$ENDIF}
+
{$I switches.inc}
uses UMenu,
@@ -353,11 +357,13 @@ begin if ((ATrack[T].Status div 1) and 1) = 1 then Inc(Result);
end;
+{$IFDEF UseMIDIPort}
procedure TScreenEditConvert.MidiFile1MidiEvent(event: PMidiEvent);
begin
// Log.LogStatus(IntToStr(event.event), 'MIDI');
MidiOut.PutShort(event.event, event.data1, event.data2);
end;
+{$ENDIF}
constructor TScreenEditConvert.Create;
var
@@ -407,6 +413,7 @@ var C: integer; // channel
CN: integer; // channel note
begin
+{$IFDEF UseMIDIPort}
MidiOut := TMidiOutput.Create(nil);
if Ini.Debug = 1 then
MidiOut.ProductName := 'Microsoft GS Wavetable SW Synth'; // for my kxproject without midi table
@@ -486,6 +493,7 @@ begin end;
Interaction := 0;
+{$ENDIF}
end;
function TScreenEditConvert.Draw: boolean;
@@ -552,7 +560,9 @@ begin end;
// playing line
- X := 60+MidiFile.GetCurrentTime/MidiFile.GetTrackLength*730;
+ {$IFDEF UseMIDIPort}
+ X := 60 + MidiFile.GetCurrentTime/MidiFile.GetTrackLength*730;
+ {$ENDIF}
DrawLine(X, Y, X, Bottom, 0.3, 0.3, 0.3);
@@ -560,8 +570,10 @@ end; procedure TScreenEditConvert.onHide;
begin
+{$IFDEF UseMIDIPort}
MidiOut.Close;
MidiOut.Free;
+{$ENDIF}
end;
end.
|