diff options
author | whiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-10-28 14:05:03 +0000 |
---|---|---|
committer | whiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-10-28 14:05:03 +0000 |
commit | 6948d389f20ee7129af2ed87713d0c7c22bb3d27 (patch) | |
tree | 83800b4d9f5ab74cca1bfce94fc98f59cedb0b51 /Game/Code | |
parent | 36116a91476fbeae5c70e877f67cced72ca05356 (diff) | |
download | usdx-6948d389f20ee7129af2ed87713d0c7c22bb3d27.tar.gz usdx-6948d389f20ee7129af2ed87713d0c7c22bb3d27.tar.xz usdx-6948d389f20ee7129af2ed87713d0c7c22bb3d27.zip |
Single Note Midi Playback by f1fth_freed0m added to 1.01
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.01@538 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code')
-rw-r--r-- | Game/Code/Screens/UScreenEditSub.pas | 57 |
1 files changed, 45 insertions, 12 deletions
diff --git a/Game/Code/Screens/UScreenEditSub.pas b/Game/Code/Screens/UScreenEditSub.pas index ee95906a..2d9f127e 100644 --- a/Game/Code/Screens/UScreenEditSub.pas +++ b/Game/Code/Screens/UScreenEditSub.pas @@ -291,6 +291,7 @@ begin begin
if SDL_ModState = 0 then begin
// Play Sentence
+ PlaySentenceMidi := false;
Click := true;
Music.Stop;
R := GetTimeFromBeat(Czesci[0].Czesc[Czesci[0].Akt].StartNote);
@@ -331,17 +332,50 @@ begin SDLK_SPACE:
begin
- // Play Sentence
- PlaySentenceMidi := false; // stop midi
- PlaySentence := true;
- Click := false;
- Music.Stop;
- Music.MoveTo(GetTimeFromBeat(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Start));
- PlayStopTime := (GetTimeFromBeat(
+ //Thx to f1fth_freed0m for his One Note Midi Playback
+ if SDL_ModState = KMOD_LSHIFT then begin //Play One Notes Midi [Shift + Space]
+ PlaySentenceMidi := true;
+
+ MidiTime := USTime.GetTime;
+ MidiStart := GetTimeFromBeat(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Start);
+ MidiStop := GetTimeFromBeat(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Dlugosc);
+ LastClick := -100;
+ end
+
+ else if SDL_ModState = KMOD_LSHIFT or KMOD_LCTRL then begin
+ //Play One Notes Midi + MP3 [CTRL + Shift + Space]
+ PlaySentenceMidi := true;
+ MidiTime := USTime.GetTime;
+ MidiStart := GetTimeFromBeat(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Start);
+ MidiStop := GetTimeFromBeat(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Dlugosc);
+ LastClick := -100;
+
+ PlaySentence := true;
+ Click := true;
+ Music.Stop;
+ Music.MoveTo(GetTimeFromBeat(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Start));
+ PlayStopTime := (GetTimeFromBeat(
+ Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Start +
+ Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Dlugosc));
+ Music.Play;
+ LastClick := -100;
+ end
+
+ Else
+ begin
+ // Play One Notes MP3 [Space]
+ PlaySentenceMidi := false; // stop midi
+ PlaySentence := true;
+ Click := false;
+ Music.Stop;
+
+ Music.MoveTo(GetTimeFromBeat(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Start));
+ PlayStopTime := (GetTimeFromBeat(
Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Start +
Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Dlugosc));
- Music.Play;
- LastClick := -100;
+ Music.Play;
+ LastClick := -100;
+ end;
end;
SDLK_RETURN:
@@ -521,9 +555,8 @@ begin SDLK_G:
begin
case Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Wartosc of
- 0: Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Wartosc := 2;
- 1: Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Wartosc := 2;
- 2: Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Wartosc := 1;
+ 0, 1: Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Wartosc := 2;
+ 2: Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Wartosc := 1;
end; // case
Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Freestyle := False;
end;
|