aboutsummaryrefslogtreecommitdiffstats
path: root/Game
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Game/Code/Classes/UDraw.pas78
-rw-r--r--Game/Code/Classes/UFiles.pas32
-rw-r--r--Game/Code/Classes/ULyrics.pas18
-rw-r--r--Game/Code/Classes/ULyrics_bak.pas8
-rw-r--r--Game/Code/Classes/UMain.pas140
-rw-r--r--Game/Code/Classes/UMusic.pas18
-rw-r--r--Game/Code/Classes/USong.pas110
-rw-r--r--Game/Code/Screens/UScreenEditConvert.pas112
-rw-r--r--Game/Code/Screens/UScreenEditSub.pas582
-rw-r--r--Game/Code/Screens/UScreenSing.pas18
-rw-r--r--Game/Code/Screens/UScreenSingModi.pas62
11 files changed, 589 insertions, 589 deletions
diff --git a/Game/Code/Classes/UDraw.pas b/Game/Code/Classes/UDraw.pas
index 479226b3..986c3ea8 100644
--- a/Game/Code/Classes/UDraw.pas
+++ b/Game/Code/Classes/UDraw.pas
@@ -202,16 +202,16 @@ var
Pet: integer;
TempR: real;
begin
- TempR := (Right-Left) / (Czesci[NrCzesci].Czesc[Czesci[NrCzesci].Akt].Koniec - Czesci[NrCzesci].Czesc[Czesci[NrCzesci].Akt].StartNote);
+ TempR := (Right-Left) / (Lines[NrCzesci].Line[Lines[NrCzesci].Akt].Koniec - Lines[NrCzesci].Line[Lines[NrCzesci].Akt].StartNote);
glEnable(GL_BLEND);
glBegin(GL_LINES);
- for Pet := Czesci[NrCzesci].Czesc[Czesci[NrCzesci].Akt].StartNote to Czesci[NrCzesci].Czesc[Czesci[NrCzesci].Akt].Koniec do begin
- if (Pet mod Czesci[NrCzesci].Resolution) = Czesci[NrCzesci].NotesGAP then
+ for Pet := Lines[NrCzesci].Line[Lines[NrCzesci].Akt].StartNote to Lines[NrCzesci].Line[Lines[NrCzesci].Akt].Koniec do begin
+ if (Pet mod Lines[NrCzesci].Resolution) = Lines[NrCzesci].NotesGAP then
glColor4f(0, 0, 0, 1)
else
glColor4f(0, 0, 0, 0.3);
- glVertex2f(Left + TempR * (Pet - Czesci[NrCzesci].Czesc[Czesci[NrCzesci].Akt].StartNote), Top);
- glVertex2f(Left + TempR * (Pet - Czesci[NrCzesci].Czesc[Czesci[NrCzesci].Akt].StartNote), Top + 135);
+ glVertex2f(Left + TempR * (Pet - Lines[NrCzesci].Line[Lines[NrCzesci].Akt].StartNote), Top);
+ glVertex2f(Left + TempR * (Pet - Lines[NrCzesci].Line[Lines[NrCzesci].Akt].StartNote), Top + 135);
end;
glEnd;
glDisable(GL_BLEND);
@@ -248,7 +248,7 @@ begin
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
lTmpA := (Right-Left);
- lTmpB := (Czesci[NrCzesci].Czesc[Czesci[NrCzesci].Akt].Koniec - Czesci[NrCzesci].Czesc[Czesci[NrCzesci].Akt].StartNote);
+ lTmpB := (Lines[NrCzesci].Line[Lines[NrCzesci].Akt].Koniec - Lines[NrCzesci].Line[Lines[NrCzesci].Akt].StartNote);
{$IFDEF LAZARUS}
(*
@@ -269,9 +269,9 @@ begin
end;
- with Czesci[NrCzesci].Czesc[Czesci[NrCzesci].Akt] do begin
- for Pet := 0 to HighNut do begin
- with Nuta[Pet] do begin
+ with Lines[NrCzesci].Line[Lines[NrCzesci].Akt] do begin
+ for Pet := 0 to HighNote do begin
+ with Note[Pet] do begin
if not FreeStyle then begin
@@ -287,7 +287,7 @@ begin
glColor4f(1, 1, 1, 1); // We set alpha to 1, cause we can control the transparency through the png itself
// Czesci == teil, element == piece, element | koniec == ende, schluss
// lewa czesc - left part
- Rec.Left := (Start-Czesci[NrCzesci].Czesc[Czesci[NrCzesci].Akt].StartNote) * TempR + Left + 0.5 + 10*ScreenX;
+ Rec.Left := (Start-Lines[NrCzesci].Line[Lines[NrCzesci].Akt].StartNote) * TempR + Left + 0.5 + 10*ScreenX;
Rec.Right := Rec.Left + NotesW;
Rec.Top := Top - (Ton-BaseNote)*Space/2 - NotesH;
Rec.Bottom := Rec.Top + 2 * NotesH;
@@ -305,7 +305,7 @@ begin
// srodkowa czesc - middle part
Rec.Left := Rec.Right;
- Rec.Right := (Start+Dlugosc-Czesci[NrCzesci].Czesc[Czesci[NrCzesci].Akt].StartNote) * TempR + Left - NotesW - 0.5 + 10*ScreenX; // Dlugosc == länge
+ Rec.Right := (Start+Dlugosc-Lines[NrCzesci].Line[Lines[NrCzesci].Akt].StartNote) * TempR + Left - NotesW - 0.5 + 10*ScreenX; // Dlugosc == länge
glBindTexture(GL_TEXTURE_2D, Tex_plain_Mid[PlayerNumber].TexNum);
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT );
@@ -373,13 +373,13 @@ var
//// if Player[NrGracza].IlNut > 0 then
begin
- TempR := W / (Czesci[0].Czesc[Czesci[0].Akt].Koniec - Czesci[0].Czesc[Czesci[0].Akt].StartNote);
+ TempR := W / (Lines[0].Line[Lines[0].Akt].Koniec - Lines[0].Line[Lines[0].Akt].StartNote);
for N := 0 to Player[NrGracza].HighNut do
begin
- with Player[NrGracza].Nuta[N] do
+ with Player[NrGracza].Note[N] do
begin
// Left part of note
- Rec.Left := X + (Start-Czesci[0].Czesc[Czesci[0].Akt].StartNote) * TempR + 0.5 + 10*ScreenX;
+ Rec.Left := X + (Start-Lines[0].Line[Lines[0].Akt].StartNote) * TempR + 0.5 + 10*ScreenX;
Rec.Right := Rec.Left + NotesW;
// Draw it in half size, if not hit
@@ -392,7 +392,7 @@ var
NotesH2 := int(NotesH * 0.65);
end;
- Rec.Top := Y - (Ton-Czesci[0].Czesc[Czesci[0].Akt].BaseNote)*Space/2 - NotesH2;
+ Rec.Top := Y - (Ton-Lines[0].Line[Lines[0].Akt].BaseNote)*Space/2 - NotesH2;
Rec.Bottom := Rec.Top + 2 *NotesH2;
// draw the left part
@@ -407,7 +407,7 @@ var
// Middle part of the note
Rec.Left := Rec.Right;
- Rec.Right := X + (Start+Dlugosc-Czesci[0].Czesc[Czesci[0].Akt].StartNote) * TempR - NotesW - 0.5 + 10*ScreenX;
+ Rec.Right := X + (Start+Dlugosc-Lines[0].Line[Lines[0].Akt].StartNote) * TempR - NotesW - 0.5 + 10*ScreenX;
// (nowe) - dunno
if (Start+Dlugosc-1 = Czas.AktBeatD) then
@@ -484,7 +484,7 @@ begin
lTmpA := (Right-Left);
- lTmpB := (Czesci[NrCzesci].Czesc[Czesci[NrCzesci].Akt].Koniec - Czesci[NrCzesci].Czesc[Czesci[NrCzesci].Akt].StartNote);
+ lTmpB := (Lines[NrCzesci].Line[Lines[NrCzesci].Akt].Koniec - Lines[NrCzesci].Line[Lines[NrCzesci].Akt].StartNote);
if ( lTmpA > 0 ) AND
@@ -497,19 +497,19 @@ begin
TempR := 0;
end;
- with Czesci[NrCzesci].Czesc[Czesci[NrCzesci].Akt] do begin
- for Pet := 0 to HighNut do begin
- with Nuta[Pet] do begin
+ with Lines[NrCzesci].Line[Lines[NrCzesci].Akt] do begin
+ for Pet := 0 to HighNote do begin
+ with Note[Pet] do begin
if not FreeStyle then begin
// begin: 14, 20
// easy: 6, 11
W := NotesW * 2 + 2;
H := NotesH * 1.5 + 3.5;
- X2 := (Start-Czesci[NrCzesci].Czesc[Czesci[NrCzesci].Akt].StartNote) * TempR + Left + 0.5 + 10*ScreenX + 4; // wciecie
+ X2 := (Start-Lines[NrCzesci].Line[Lines[NrCzesci].Akt].StartNote) * TempR + Left + 0.5 + 10*ScreenX + 4; // wciecie
X1 := X2-W;
- X3 := (Start+Dlugosc-Czesci[NrCzesci].Czesc[Czesci[NrCzesci].Akt].StartNote) * TempR + Left - 0.5 + 10*ScreenX - 4; // wciecie
+ X3 := (Start+Dlugosc-Lines[NrCzesci].Line[Lines[NrCzesci].Akt].StartNote) * TempR + Left - 0.5 + 10*ScreenX - 4; // wciecie
X4 := X3+W;
// left
@@ -622,14 +622,14 @@ begin
// todo: Lyrics
{ // rysuje pasek, podpowiadajacy poczatek spiwania w scenie
FS := 1.3;
- BarFrom := Czesci[0].Czesc[Czesci[0].Akt].StartNote - Czesci[0].Czesc[Czesci[0].Akt].Start;
+ BarFrom := Lines[0].Line[Lines[0].Akt].StartNote - Lines[0].Line[Lines[0].Akt].Start;
if BarFrom > 40 then BarFrom := 40;
- if (Czesci[0].Czesc[Czesci[0].Akt].StartNote - Czesci[0].Czesc[Czesci[0].Akt].Start > 8) and // dluga przerwa //16->12 for more help bars and then 12->8 for even more
- (Czesci[0].Czesc[Czesci[0].Akt].StartNote - Czas.MidBeat > 0) and // przed tekstem
- (Czesci[0].Czesc[Czesci[0].Akt].StartNote - Czas.MidBeat < 40) then begin // ale nie za wczesnie
- BarWspol := (Czas.MidBeat - (Czesci[0].Czesc[Czesci[0].Akt].StartNote - BarFrom)) / BarFrom;
+ if (Lines[0].Line[Lines[0].Akt].StartNote - Lines[0].Line[Lines[0].Akt].Start > 8) and // dluga przerwa //16->12 for more help bars and then 12->8 for even more
+ (Lines[0].Line[Lines[0].Akt].StartNote - Czas.MidBeat > 0) and // przed tekstem
+ (Lines[0].Line[Lines[0].Akt].StartNote - Czas.MidBeat < 40) then begin // ale nie za wczesnie
+ BarWspol := (Czas.MidBeat - (Lines[0].Line[Lines[0].Akt].StartNote - BarFrom)) / BarFrom;
Rec.Left := NR.Left + BarWspol *
-// (NR.WMid - Czesci[0].Czesc[Czesci[0].Akt].LyricWidth / 2 * FS - 50);
+// (NR.WMid - Lines[0].Line[Lines[0].Akt].LyricWidth / 2 * FS - 50);
(ScreenSing.LyricMain.ClientX - NR.Left - 50) + 10*ScreenX;
Rec.Right := Rec.Left + 50;
Rec.Top := Skin_LyricsT + 3;
@@ -879,12 +879,12 @@ begin
// todo: Lyrics
{ // rysuje pasek, podpowiadajacy poczatek spiwania w scenie
FS := 1.3;
- BarFrom := Czesci[0].Czesc[Czesci[0].Akt].StartNote - Czesci[0].Czesc[Czesci[0].Akt].Start;
+ BarFrom := Lines[0].Line[Lines[0].Akt].StartNote - Lines[0].Line[Lines[0].Akt].Start;
if BarFrom > 40 then BarFrom := 40;
- if (Czesci[0].Czesc[Czesci[0].Akt].StartNote - Czesci[0].Czesc[Czesci[0].Akt].Start > 8) and // dluga przerwa //16->12 for more help bars and then 12->8 for even more
- (Czesci[0].Czesc[Czesci[0].Akt].StartNote - Czas.MidBeat > 0) and // przed tekstem
- (Czesci[0].Czesc[Czesci[0].Akt].StartNote - Czas.MidBeat < 40) then begin // ale nie za wczesnie
- BarWspol := (Czas.MidBeat - (Czesci[0].Czesc[Czesci[0].Akt].StartNote - BarFrom)) / BarFrom;
+ if (Lines[0].Line[Lines[0].Akt].StartNote - Lines[0].Line[Lines[0].Akt].Start > 8) and // dluga przerwa //16->12 for more help bars and then 12->8 for even more
+ (Lines[0].Line[Lines[0].Akt].StartNote - Czas.MidBeat > 0) and // przed tekstem
+ (Lines[0].Line[Lines[0].Akt].StartNote - Czas.MidBeat < 40) then begin // ale nie za wczesnie
+ BarWspol := (Czas.MidBeat - (Lines[0].Line[Lines[0].Akt].StartNote - BarFrom)) / BarFrom;
Rec.Left := NR.Left + BarWspol * (ScreenSingModi.LyricMain.ClientX - NR.Left - 50) + 10*ScreenX;
Rec.Right := Rec.Left + 50;
Rec.Top := Skin_LyricsT + 3;
@@ -1239,10 +1239,10 @@ begin
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- TempR := (Right-Left) / (Czesci[NrCzesci].Czesc[Czesci[NrCzesci].Akt].Koniec - Czesci[NrCzesci].Czesc[Czesci[NrCzesci].Akt].StartNote);
- with Czesci[NrCzesci].Czesc[Czesci[NrCzesci].Akt] do begin
- for Pet := 0 to HighNut do begin
- with Nuta[Pet] do begin
+ TempR := (Right-Left) / (Lines[NrCzesci].Line[Lines[NrCzesci].Akt].Koniec - Lines[NrCzesci].Line[Lines[NrCzesci].Akt].StartNote);
+ with Lines[NrCzesci].Line[Lines[NrCzesci].Akt] do begin
+ for Pet := 0 to HighNote do begin
+ with Note[Pet] do begin
// Golden Note Patch
case Wartosc of
@@ -1254,7 +1254,7 @@ begin
// lewa czesc - left part
- Rec.Left := (Start-Czesci[NrCzesci].Czesc[Czesci[NrCzesci].Akt].StartNote) * TempR + Left + 0.5 + 10*ScreenX;
+ Rec.Left := (Start-Lines[NrCzesci].Line[Lines[NrCzesci].Akt].StartNote) * TempR + Left + 0.5 + 10*ScreenX;
Rec.Right := Rec.Left + NotesW;
Rec.Top := Top - (Ton-BaseNote)*Space/2 - NotesH;
Rec.Bottom := Rec.Top + 2 * NotesH;
@@ -1268,7 +1268,7 @@ begin
// srodkowa czesc - middle part
Rec.Left := Rec.Right;
- Rec.Right := (Start+Dlugosc-Czesci[NrCzesci].Czesc[Czesci[NrCzesci].Akt].StartNote) * TempR + Left - NotesW - 0.5 + 10*ScreenX;
+ Rec.Right := (Start+Dlugosc-Lines[NrCzesci].Line[Lines[NrCzesci].Akt].StartNote) * TempR + Left - NotesW - 0.5 + 10*ScreenX;
glBindTexture(GL_TEXTURE_2D, Tex_Mid[Color].TexNum);
glBegin(GL_QUADS);
diff --git a/Game/Code/Classes/UFiles.pas b/Game/Code/Classes/UFiles.pas
index 495e8a4a..09cc57ec 100644
--- a/Game/Code/Classes/UFiles.pas
+++ b/Game/Code/Classes/UFiles.pas
@@ -14,7 +14,7 @@ uses SysUtils,
USong;
procedure ResetSingTemp;
-function SaveSong(Song: TSong; Czesc: TCzesci; Name: string; Relative: boolean): boolean;
+function SaveSong(Song: TSong; Lines: TLines; Name: string; Relative: boolean): boolean;
var
SongFile: TextFile; // all procedures in this unit operates on this file
@@ -40,12 +40,12 @@ procedure ResetSingTemp;
var
Pet: integer;
begin
- SetLength(Czesci, Length(Player));
+ SetLength(Lines, Length(Player));
for Pet := 0 to High(Player) do begin
- SetLength(Czesci[Pet].Czesc, 1);
- SetLength(Czesci[Pet].Czesc[0].Nuta, 0);
- Czesci[Pet].Czesc[0].Lyric := '';
- Czesci[Pet].Czesc[0].LyricWidth := 0;
+ SetLength(Lines[Pet].Line, 1);
+ SetLength(Lines[Pet].Line[0].Note, 0);
+ Lines[Pet].Line[0].Lyric := '';
+ Lines[Pet].Line[0].LyricWidth := 0;
Player[pet].Score := 0;
Player[pet].IlNut := 0;
Player[pet].HighNut := -1;
@@ -68,7 +68,7 @@ end;
//--------------------
// Saves a Song
//--------------------
-function SaveSong(Song: TSong; Czesc: TCzesci; Name: string; Relative: boolean): boolean;
+function SaveSong(Song: TSong; Lines: TLines; Name: string; Relative: boolean): boolean;
var
C: integer;
N: integer;
@@ -109,13 +109,13 @@ begin
for B := 1 to High(CurrentSong.BPM) do
WriteLn(SongFile, 'B ' + FloatToStr(CurrentSong.BPM[B].StartBeat) + ' ' + FloatToStr(CurrentSong.BPM[B].BPM/4));
- for C := 0 to Czesc.High do begin
- for N := 0 to Czesc.Czesc[C].HighNut do begin
- with Czesc.Czesc[C].Nuta[N] do begin
+ for C := 0 to Lines.High do begin
+ for N := 0 to Lines.Line[C].HighNote do begin
+ with Lines.Line[C].Note[N] do begin
//Golden + Freestyle Note Patch
- case Czesc.Czesc[C].Nuta[N].Wartosc of
+ case Lines.Line[C].Note[N].Wartosc of
0: NoteState := 'F ';
1: NoteState := ': ';
2: NoteState := '* ';
@@ -127,13 +127,13 @@ begin
end; // with
end; // N
- if C < Czesc.High then begin // don't write end of last sentence
+ if C < Lines.High then begin // don't write end of last sentence
if not Relative then
- S := '- ' + IntToStr(Czesc.Czesc[C+1].Start)
+ S := '- ' + IntToStr(Lines.Line[C+1].Start)
else begin
- S := '- ' + IntToStr(Czesc.Czesc[C+1].Start - RelativeSubTime) +
- ' ' + IntToStr(Czesc.Czesc[C+1].Start - RelativeSubTime);
- RelativeSubTime := Czesc.Czesc[C+1].Start;
+ S := '- ' + IntToStr(Lines.Line[C+1].Start - RelativeSubTime) +
+ ' ' + IntToStr(Lines.Line[C+1].Start - RelativeSubTime);
+ RelativeSubTime := Lines.Line[C+1].Start;
end;
WriteLn(SongFile, S);
end;
diff --git a/Game/Code/Classes/ULyrics.pas b/Game/Code/Classes/ULyrics.pas
index f76e822e..fb57220c 100644
--- a/Game/Code/Classes/ULyrics.pas
+++ b/Game/Code/Classes/ULyrics.pas
@@ -304,12 +304,12 @@ begin
end;
//Check if Sentence has Notes
- If (Length(Line.Nuta) > 0) then
+ If (Length(Line.Note) > 0) then
begin
//Copy Values from SongLine to LyricLine
- CountNotes := high(Line.Nuta);
- LyricLine.Start := Line.Nuta[0].Start;
- LyricLine.Length := Line.Nuta[CountNotes].Start + Line.Nuta[CountNotes].Dlugosc - LyricLine.Start;
+ CountNotes := high(Line.Note);
+ LyricLine.Start := Line.Note[0].Start;
+ LyricLine.Length := Line.Note[CountNotes].Start + Line.Note[CountNotes].Dlugosc - LyricLine.Start;
LyricLine.Freestyle := True; //is set by And Notes Freestyle while copying Notes
LyricLine.Text := ''; //Also Set while copying Notes
LyricLine.Players := 127; //All Players for now, no Duett Mode available
@@ -318,11 +318,11 @@ begin
SetLength(LyricLine.Words, CountNotes + 1);
For I := 0 to CountNotes do
begin
- LyricLine.Freestyle := LyricLine.Freestyle AND Line.Nuta[I].FreeStyle;
- LyricLine.Words[I].Start := Line.Nuta[I].Start;
- LyricLine.Words[I].Length := Line.Nuta[I].Dlugosc;
- LyricLine.Words[I].Text := Line.Nuta[I].Tekst;
- LyricLine.Words[I].Freestyle := Line.Nuta[I].FreeStyle;
+ LyricLine.Freestyle := LyricLine.Freestyle AND Line.Note[I].FreeStyle;
+ LyricLine.Words[I].Start := Line.Note[I].Start;
+ LyricLine.Words[I].Length := Line.Note[I].Dlugosc;
+ LyricLine.Words[I].Text := Line.Note[I].Tekst;
+ LyricLine.Words[I].Freestyle := Line.Note[I].FreeStyle;
LyricLine.Text := LyricLine.Text + LyricLine.Words[I].Text
end;
diff --git a/Game/Code/Classes/ULyrics_bak.pas b/Game/Code/Classes/ULyrics_bak.pas
index 703ee270..86a69959 100644
--- a/Game/Code/Classes/ULyrics_bak.pas
+++ b/Game/Code/Classes/ULyrics_bak.pas
@@ -264,10 +264,10 @@ var
N: integer;
begin
Clear;
- for N := 0 to Czesci[0].Czesc[NrCzesci].HighNut do begin
- Italic := Czesci[0].Czesc[NrCzesci].Nuta[N].FreeStyle;
- AddWord(Czesci[0].Czesc[NrCzesci].Nuta[N].Tekst);
- Text := Text + Czesci[0].Czesc[NrCzesci].Nuta[N].Tekst;
+ for N := 0 to Lines[0].Line[NrCzesci].HighNote do begin
+ Italic := Lines[0].Line[NrCzesci].Note[N].FreeStyle;
+ AddWord(Lines[0].Line[NrCzesci].Note[N].Tekst);
+ Text := Text + Lines[0].Line[NrCzesci].Note[N].Tekst;
end;
Selected := -1;
end;
diff --git a/Game/Code/Classes/UMain.pas b/Game/Code/Classes/UMain.pas
index 2d744a4f..c6c1f8e1 100644
--- a/Game/Code/Classes/UMain.pas
+++ b/Game/Code/Classes/UMain.pas
@@ -57,7 +57,7 @@ type
HighNut: integer;
IlNut: integer;
- Nuta: array of record
+ Note: array of record
Start: integer;
Dlugosc: integer;
Detekt: real; // accurate place, detected in the note
@@ -699,18 +699,18 @@ begin
begin;
CP := PetGr;
// ustawianie starej parts
- Czas.OldCzesc := Czesci[CP].Akt;
+ Czas.OldCzesc := Lines[CP].Akt;
// wybieranie aktualnej parts
- for Pet := 0 to Czesci[CP].High do
+ for Pet := 0 to Lines[CP].High do
begin
- if Czas.AktBeat >= Czesci[CP].Czesc[Pet].Start then
- Czesci[CP].Akt := Pet;
+ if Czas.AktBeat >= Lines[CP].Line[Pet].Start then
+ Lines[CP].Akt := Pet;
end;
// czysczenie nut gracza, gdy to jest nowa plansza
// (optymizacja raz na halfbeat jest zla)
- if Czesci[CP].Akt <> Czas.OldCzesc then
+ if Lines[CP].Akt <> Czas.OldCzesc then
NewSentence(Sender);
end; // for PetGr
@@ -733,21 +733,21 @@ begin
// plynnie przesuwa text
Done := 1;
- for N := 0 to Czesci[0].Czesc[Czesci[0].Akt].HighNut do
+ for N := 0 to Lines[0].Line[Lines[0].Akt].HighNote do
begin
- if (Czesci[0].Czesc[Czesci[0].Akt].Nuta[N].Start <= Czas.MidBeat) and
- (Czesci[0].Czesc[Czesci[0].Akt].Nuta[N].Start + Czesci[0].Czesc[Czesci[0].Akt].Nuta[N].Dlugosc >= Czas.MidBeat) then
+ if (Lines[0].Line[Lines[0].Akt].Note[N].Start <= Czas.MidBeat) and
+ (Lines[0].Line[Lines[0].Akt].Note[N].Start + Lines[0].Line[Lines[0].Akt].Note[N].Dlugosc >= Czas.MidBeat) then
begin
- Done := (Czas.MidBeat - Czesci[0].Czesc[Czesci[0].Akt].Nuta[N].Start) / (Czesci[0].Czesc[Czesci[0].Akt].Nuta[N].Dlugosc);
+ Done := (Czas.MidBeat - Lines[0].Line[Lines[0].Akt].Note[N].Start) / (Lines[0].Line[Lines[0].Akt].Note[N].Dlugosc);
end;
end;
- N := Czesci[0].Czesc[Czesci[0].Akt].HighNut;
+ N := Lines[0].Line[Lines[0].Akt].HighNote;
// wylacza ostatnia nute po przejsciu
{// todo: Lyrics
if (Ini.LyricsEffect = 1) and (Done = 1) and
- (Czas.MidBeat > Czesci[0].Czesc[Czesci[0].Akt].Nuta[N].Start + Czesci[0].Czesc[Czesci[0].Akt].Nuta[N].Dlugosc)
+ (Czas.MidBeat > Lines[0].Line[Lines[0].Akt].Note[N].Start + Lines[0].Line[Lines[0].Akt].Note[N].Dlugosc)
then Sender.LyricMain.Selected := -1;
if Done > 1 then Done := 1;
@@ -773,25 +773,25 @@ begin
begin
Player[G].IlNut := 0;
Player[G].HighNut := -1;
- SetLength(Player[G].Nuta, 0);
+ SetLength(Player[G].Note, 0);
end;
// Add Words to Lyrics
with Sender do
begin
- {LyricMain.AddCzesc(Czesci[0].Akt);
- if Czesci[0].Akt < Czesci[0].High then
- LyricSub.AddCzesc(Czesci[0].Akt+1)
+ {LyricMain.AddCzesc(Lines[0].Akt);
+ if Lines[0].Akt < Lines[0].High then
+ LyricSub.AddCzesc(Lines[0].Akt+1)
else
LyricSub.Clear;}
- while (not Lyrics.LineinQueue) and (Lyrics.LineCounter <= High(Czesci[0].Czesc)) do
- Lyrics.AddLine(@Czesci[0].Czesc[Lyrics.LineCounter]);
+ while (not Lyrics.LineinQueue) and (Lyrics.LineCounter <= High(Lines[0].Line)) do
+ Lyrics.AddLine(@Lines[0].Line[Lyrics.LineCounter]);
end;
Sender.UpdateLCD;
//On Sentence Change...
- Sender.onSentenceChange(Czesci[0].Akt);
+ Sender.onSentenceChange(Lines[0].Akt);
end;
procedure NewBeat(Sender: TScreenSing);
@@ -801,8 +801,8 @@ var
begin
// ustawia zaznaczenie tekstu
// SingScreen.LyricMain.Selected := -1;
- for Pet := 0 to Czesci[0].Czesc[Czesci[0].Akt].HighNut do
- if (Czesci[0].Czesc[Czesci[0].Akt].Nuta[Pet].Start = Czas.AktBeat) then
+ for Pet := 0 to Lines[0].Line[Lines[0].Akt].HighNote do
+ if (Lines[0].Line[Lines[0].Akt].Note[Pet].Start = Czas.AktBeat) then
begin
// operates on currently beated note
//Todo: Lyrics
@@ -826,11 +826,11 @@ begin
// LPT_2 := 1;
// beat click
- if (Ini.BeatClick = 1) and ((Czas.AktBeatC + Czesci[0].Resolution + Czesci[0].NotesGAP) mod Czesci[0].Resolution = 0) then
+ if (Ini.BeatClick = 1) and ((Czas.AktBeatC + Lines[0].Resolution + Lines[0].NotesGAP) mod Lines[0].Resolution = 0) then
AudioPlayback.PlaySound(SoundLib.Click);
// debug system on LPT
- if ((Czas.AktBeatC + Czesci[0].Resolution + Czesci[0].NotesGAP) mod Czesci[0].Resolution = 0) then
+ if ((Czas.AktBeatC + Lines[0].Resolution + Lines[0].NotesGAP) mod Lines[0].Resolution = 0) then
begin
//LPT_1 := 0;
// Light.LightOne(0, 150);
@@ -840,15 +840,15 @@ begin
Light.LightOne(0, 200); // beat light
-{ if ((Czas.AktBeatC + Czesci[0].Resolution + Czesci[0].NotesGAP) mod (Czesci[0].Resolution * 2) = 0) then
+{ if ((Czas.AktBeatC + Lines[0].Resolution + Lines[0].NotesGAP) mod (Lines[0].Resolution * 2) = 0) then
Light.LightOne(0, 150)
else
Light.LightOne(1, 150)}
end;
- for Pet := 0 to Czesci[0].Czesc[Czesci[0].Akt].HighNut do
+ for Pet := 0 to Lines[0].Line[Lines[0].Akt].HighNote do
begin
- if (Czesci[0].Czesc[Czesci[0].Akt].Nuta[Pet].Start = Czas.AktBeatC) then
+ if (Lines[0].Line[Lines[0].Akt].Note[Pet].Start = Czas.AktBeatC) then
begin
// click assist
if Ini.ClickAssist = 1 then
@@ -915,22 +915,22 @@ begin
//Czas.Ton := Czas.Ton + Round(Random(3)) - 1;
// count min and max sentence range for checking (detection is delayed to the notes we see on the screen)
- SMin := Czesci[0].Akt-1;
+ SMin := Lines[0].Akt-1;
if SMin < 0 then
SMin := 0;
- SMax := Czesci[0].Akt;
+ SMax := Lines[0].Akt;
// check if we can add new note
Mozna := false;
SDet:=SMin;
for S := SMin to SMax do
begin
- for Pet := 0 to Czesci[0].Czesc[S].HighNut do
+ for Pet := 0 to Lines[0].Line[S].HighNote do
begin
- if ((Czesci[0].Czesc[S].Nuta[Pet].Start <= Czas.AktBeatD)
- and (Czesci[0].Czesc[S].Nuta[Pet].Start + Czesci[0].Czesc[S].Nuta[Pet].Dlugosc - 1 >= Czas.AktBeatD))
- and (not Czesci[0].Czesc[S].Nuta[Pet].FreeStyle) // but don't allow when it's FreeStyle note
- and (Czesci[0].Czesc[S].Nuta[Pet].Dlugosc > 0) then // and make sure the note lenghts is at least 1
+ if ((Lines[0].Line[S].Note[Pet].Start <= Czas.AktBeatD)
+ and (Lines[0].Line[S].Note[Pet].Start + Lines[0].Line[S].Note[Pet].Dlugosc - 1 >= Czas.AktBeatD))
+ and (not Lines[0].Line[S].Note[Pet].FreeStyle) // but don't allow when it's FreeStyle note
+ and (Lines[0].Line[S].Note[Pet].Dlugosc > 0) then // and make sure the note lenghts is at least 1
begin
SDet := S;
Mozna := true;
@@ -948,19 +948,19 @@ begin
if (AudioInputProcessor.Sound[CP].ToneValid) and (Mozna) then
begin
// operowanie na ostatniej nucie
- for Pet := 0 to Czesci[0].Czesc[S].HighNut do
+ for Pet := 0 to Lines[0].Line[S].HighNote do
begin
- if (Czesci[0].Czesc[S].Nuta[Pet].Start <= Czas.OldBeatD+1) and
- (Czesci[0].Czesc[S].Nuta[Pet].Start +
- Czesci[0].Czesc[S].Nuta[Pet].Dlugosc > Czas.OldBeatD+1) then
+ if (Lines[0].Line[S].Note[Pet].Start <= Czas.OldBeatD+1) and
+ (Lines[0].Line[S].Note[Pet].Start +
+ Lines[0].Line[S].Note[Pet].Dlugosc > Czas.OldBeatD+1) then
begin
// to robi, tylko dla pary nut (oryginalnej i gracza)
// przesuwanie tonu w odpowiednia game
- while (AudioInputProcessor.Sound[CP].Tone - Czesci[0].Czesc[S].Nuta[Pet].Ton > 6) do
+ while (AudioInputProcessor.Sound[CP].Tone - Lines[0].Line[S].Note[Pet].Ton > 6) do
AudioInputProcessor.Sound[CP].Tone := AudioInputProcessor.Sound[CP].Tone - 12;
- while (AudioInputProcessor.Sound[CP].Tone - Czesci[0].Czesc[S].Nuta[Pet].Ton < -6) do
+ while (AudioInputProcessor.Sound[CP].Tone - Lines[0].Line[S].Note[Pet].Ton < -6) do
AudioInputProcessor.Sound[CP].Tone := AudioInputProcessor.Sound[CP].Tone + 12;
// Half size Notes Patch
@@ -971,9 +971,9 @@ begin
//if Ini.Difficulty = 2 then Range := 0;
Range := 2 - Ini.Difficulty;
- if abs(Czesci[0].Czesc[S].Nuta[Pet].Ton - AudioInputProcessor.Sound[CP].Tone) <= Range then
+ if abs(Lines[0].Line[S].Note[Pet].Ton - AudioInputProcessor.Sound[CP].Tone) <= Range then
begin
- AudioInputProcessor.Sound[CP].Tone := Czesci[0].Czesc[S].Nuta[Pet].Ton;
+ AudioInputProcessor.Sound[CP].Tone := Lines[0].Line[S].Note[Pet].Ton;
// Half size Notes Patch
NoteHit := true;
@@ -981,21 +981,21 @@ begin
if (Ini.LineBonus = 0) then
begin
// add points without LineBonus
- case Czesci[0].Czesc[S].Nuta[Pet].Wartosc of
- 1: Player[CP].Score := Player[CP].Score + 10000 / Czesci[0].Wartosc *
- Czesci[0].Czesc[S].Nuta[Pet].Wartosc;
- 2: Player[CP].ScoreGolden := Player[CP].ScoreGolden + 10000 / Czesci[0].Wartosc *
- Czesci[0].Czesc[S].Nuta[Pet].Wartosc;
+ case Lines[0].Line[S].Note[Pet].Wartosc of
+ 1: Player[CP].Score := Player[CP].Score + 10000 / Lines[0].Wartosc *
+ Lines[0].Line[S].Note[Pet].Wartosc;
+ 2: Player[CP].ScoreGolden := Player[CP].ScoreGolden + 10000 / Lines[0].Wartosc *
+ Lines[0].Line[S].Note[Pet].Wartosc;
end;
end
else
begin
// add points with Line Bonus
- case Czesci[0].Czesc[S].Nuta[Pet].Wartosc of
- 1: Player[CP].Score := Player[CP].Score + 9000 / Czesci[0].Wartosc *
- Czesci[0].Czesc[S].Nuta[Pet].Wartosc;
- 2: Player[CP].ScoreGolden := Player[CP].ScoreGolden + 9000 / Czesci[0].Wartosc *
- Czesci[0].Czesc[S].Nuta[Pet].Wartosc;
+ case Lines[0].Line[S].Note[Pet].Wartosc of
+ 1: Player[CP].Score := Player[CP].Score + 9000 / Lines[0].Wartosc *
+ Lines[0].Line[S].Note[Pet].Wartosc;
+ 2: Player[CP].ScoreGolden := Player[CP].ScoreGolden + 9000 / Lines[0].Wartosc *
+ Lines[0].Line[S].Note[Pet].Wartosc;
end;
end;
@@ -1014,16 +1014,16 @@ begin
Nowa := true;
// jezeli ostatnia ma ten sam ton
if (Player[CP].IlNut > 0 ) and
- (Player[CP].Nuta[Player[CP].HighNut].Ton = AudioInputProcessor.Sound[CP].Tone) and
- (Player[CP].Nuta[Player[CP].HighNut].Start + Player[CP].Nuta[Player[CP].HighNut].Dlugosc = Czas.AktBeatD) then
+ (Player[CP].Note[Player[CP].HighNut].Ton = AudioInputProcessor.Sound[CP].Tone) and
+ (Player[CP].Note[Player[CP].HighNut].Start + Player[CP].Note[Player[CP].HighNut].Dlugosc = Czas.AktBeatD) then
begin
Nowa := false;
end;
// jezeli jest jakas nowa nuta na sprawdzanym beacie
- for Pet := 0 to Czesci[0].Czesc[S].HighNut do
+ for Pet := 0 to Lines[0].Line[S].HighNote do
begin
- if (Czesci[0].Czesc[S].Nuta[Pet].Start = Czas.AktBeatD) then
+ if (Lines[0].Line[S].Note[Pet].Start = Czas.AktBeatD) then
Nowa := true;
end;
@@ -1033,31 +1033,31 @@ begin
// nowa nuta
Player[CP].IlNut := Player[CP].IlNut + 1;
Player[CP].HighNut := Player[CP].HighNut + 1;
- SetLength(Player[CP].Nuta, Player[CP].IlNut);
- Player[CP].Nuta[Player[CP].HighNut].Start := Czas.AktBeatD;
- Player[CP].Nuta[Player[CP].HighNut].Dlugosc := 1;
- Player[CP].Nuta[Player[CP].HighNut].Ton := AudioInputProcessor.Sound[CP].Tone; // Ton || TonDokl
- Player[CP].Nuta[Player[CP].HighNut].Detekt := Czas.MidBeat;
+ SetLength(Player[CP].Note, Player[CP].IlNut);
+ Player[CP].Note[Player[CP].HighNut].Start := Czas.AktBeatD;
+ Player[CP].Note[Player[CP].HighNut].Dlugosc := 1;
+ Player[CP].Note[Player[CP].HighNut].Ton := AudioInputProcessor.Sound[CP].Tone; // Ton || TonDokl
+ Player[CP].Note[Player[CP].HighNut].Detekt := Czas.MidBeat;
// Half Note Patch
- Player[CP].Nuta[Player[CP].HighNut].Hit := NoteHit;
+ Player[CP].Note[Player[CP].HighNut].Hit := NoteHit;
- //Log.LogStatus('Nowa Nuta ' + IntToStr(Gracz.Nuta[Gracz.HighNut].Start), 'NewBeat');
+ //Log.LogStatus('Nowa Nuta ' + IntToStr(Gracz.Note[Gracz.HighNut].Start), 'NewBeat');
end
else
begin
// przedluzenie nuty
- Player[CP].Nuta[Player[CP].HighNut].Dlugosc := Player[CP].Nuta[Player[CP].HighNut].Dlugosc + 1;
+ Player[CP].Note[Player[CP].HighNut].Dlugosc := Player[CP].Note[Player[CP].HighNut].Dlugosc + 1;
end;
// check for perfect note and then lit the star (on Draw)
- for Pet := 0 to Czesci[0].Czesc[S].HighNut do
+ for Pet := 0 to Lines[0].Line[S].HighNote do
begin
- if (Czesci[0].Czesc[S].Nuta[Pet].Start = Player[CP].Nuta[Player[CP].HighNut].Start) and
- (Czesci[0].Czesc[S].Nuta[Pet].Dlugosc = Player[CP].Nuta[Player[CP].HighNut].Dlugosc) and
- (Czesci[0].Czesc[S].Nuta[Pet].Ton = Player[CP].Nuta[Player[CP].HighNut].Ton) then
+ if (Lines[0].Line[S].Note[Pet].Start = Player[CP].Note[Player[CP].HighNut].Start) and
+ (Lines[0].Line[S].Note[Pet].Dlugosc = Player[CP].Note[Player[CP].HighNut].Dlugosc) and
+ (Lines[0].Line[S].Note[Pet].Ton = Player[CP].Note[Player[CP].HighNut].Ton) then
begin
- Player[CP].Nuta[Player[CP].HighNut].Perfect := true;
+ Player[CP].Note[Player[CP].HighNut].Perfect := true;
end;
end;
end;// else beep; // if S = SMax
@@ -1067,10 +1067,10 @@ begin
// Log.LogStatus('EndBeat', 'NewBeat');
//On Sentence End -> For LineBonus + SingBar
- if (sDet >= low(Czesci[0].Czesc)) and (sDet <= high(Czesci[0].Czesc)) then
+ if (sDet >= low(Lines[0].Line)) and (sDet <= high(Lines[0].Line)) then
begin
if assigned( Sender ) and
- ((Czesci[0].Czesc[SDet].Nuta[Czesci[0].Czesc[SDet].HighNut].Start + Czesci[0].Czesc[SDet].Nuta[Czesci[0].Czesc[SDet].HighNut].Dlugosc - 1) = Czas.AktBeatD) then
+ ((Lines[0].Line[SDet].Note[Lines[0].Line[SDet].HighNote].Start + Lines[0].Line[SDet].Note[Lines[0].Line[SDet].HighNote].Dlugosc - 1) = Czas.AktBeatD) then
begin
Sender.onSentenceEnd(sDet);
end;
diff --git a/Game/Code/Classes/UMusic.pas b/Game/Code/Classes/UMusic.pas
index f0bf3a9c..b2f1bf56 100644
--- a/Game/Code/Classes/UMusic.pas
+++ b/Game/Code/Classes/UMusic.pas
@@ -16,7 +16,7 @@ type
//http://paste.ubuntu-nl.org/51892/
- TMuzyka = record // (TODO: rename to TMusic/TMelody?)
+ TMelody = record
Path: string;
Start: integer; // start of song in ms
IlNut: integer; // (TODO: Il = tone, Nut(a) = Note)
@@ -24,17 +24,17 @@ type
end;
PLine = ^TLine;
- TLine = record // (TODO: rename to TSentence?)
+ TLine = record
Start: integer;
StartNote: integer;
Lyric: string;
LyricWidth: real;
Koniec: integer; // (TODO: rename to End_/Ending?)
BaseNote: integer;
- HighNut: integer; // (TODO: rename to HighNote)
+ HighNote: integer;
IlNut: integer; // (TODO: Il = tone, Nut(a) = Note)
TotalNotes: integer;
- Nuta: array of record // (TODO: rename to Note)
+ Note: array of record
Color: integer;
Start: integer;
Dlugosc: integer; // (TODO: rename to Length)
@@ -47,15 +47,15 @@ type
end;
ALine = array of TLine; // (TODO: rename to TLineArray)
- // (TCzesci = TSentences)
- TCzesci = record
+ // (TCzesci = TSentences) TCzesci changed to TLines because TSentences exist elseware in incompatible form
+ TLines = record
Akt: integer; // for drawing of current line (Akt = Current)
High: integer;
Ilosc: integer; // (TODO: Ilosc = Number/Count)
Resolution: integer;
NotesGAP: integer;
Wartosc: integer; // TODO: rename (wartosc=value)
- Czesc: ALine; // TODO: rename to Sentence or Line
+ Line: ALine; // TODO: rename to Sentence or Line - renamed to Line
end;
// (TODO: rename TCzas to something like T(Line/Sentence)Time/TLinePosition/TLineState)
@@ -288,10 +288,10 @@ type
var // TODO : JB --- THESE SHOULD NOT BE GLOBAL
// music
- Muzyka: TMuzyka; // TODO: rename
+ Melody: TMelody; // TODO: rename
// czesci z nutami;
- Czesci: array of TCzesci; // TODO: rename to Sentences/Lines
+ Lines: array of TLines; // TODO: rename to Sentences/Lines
// czas
Czas: TCzas; // TODO: rename
diff --git a/Game/Code/Classes/USong.pas b/Game/Code/Classes/USong.pas
index 6b4a2f09..c7d11374 100644
--- a/Game/Code/Classes/USong.pas
+++ b/Game/Code/Classes/USong.pas
@@ -114,7 +114,7 @@ implementation
uses
TextGL,
UIni,
- UMusic, // needed for Czesci .. ( whatever that is )
+ UMusic, // needed for Lines .. ( whatever that is )
UMain; //needed for Player
constructor TSong.create( const aFileName : WideString );
@@ -181,7 +181,7 @@ begin
MultBPM := 4; // multiply beat-count of note by 4
Mult := 1; // accuracy of measurement of note
Base[0] := 100; // high number
- Czesci[0].Wartosc := 0;
+ Lines[0].Wartosc := 0;
self.Relative := false;
Rel[0] := 0;
CP := 0;
@@ -222,16 +222,16 @@ begin
Read(SongFile, TempC);
until ((TempC = ':') or (TempC = 'F') or (TempC = '*'));
- SetLength(Czesci, 2);
- for Pet := 0 to High(Czesci) do begin
- SetLength(Czesci[Pet].Czesc, 1);
- Czesci[Pet].High := 0;
- Czesci[Pet].Ilosc := 1;
- Czesci[Pet].Akt := 0;
- Czesci[Pet].Resolution := self.Resolution;
- Czesci[Pet].NotesGAP := self.NotesGAP;
- Czesci[Pet].Czesc[0].IlNut := 0;
- Czesci[Pet].Czesc[0].HighNut := -1;
+ SetLength(Lines, 2);
+ for Pet := 0 to High(Lines) do begin
+ SetLength(Lines[Pet].Line, 1);
+ Lines[Pet].High := 0;
+ Lines[Pet].Ilosc := 1;
+ Lines[Pet].Akt := 0;
+ Lines[Pet].Resolution := self.Resolution;
+ Lines[Pet].NotesGAP := self.NotesGAP;
+ Lines[Pet].Line[0].IlNut := 0;
+ Lines[Pet].Line[0].HighNote := -1;
end;
// TempC := ':';
@@ -289,24 +289,24 @@ begin
if not Both then
begin
- Czesci[CP].Czesc[Czesci[CP].High].BaseNote := Base[CP];
- Czesci[CP].Czesc[Czesci[CP].High].LyricWidth := glTextWidth(PChar(Czesci[CP].Czesc[Czesci[CP].High].Lyric));
+ Lines[CP].Line[Lines[CP].High].BaseNote := Base[CP];
+ Lines[CP].Line[Lines[CP].High].LyricWidth := glTextWidth(PChar(Lines[CP].Line[Lines[CP].High].Lyric));
//Total Notes Patch
- Czesci[CP].Czesc[Czesci[CP].High].TotalNotes := 0;
- for I := low(Czesci[CP].Czesc[Czesci[CP].High].Nuta) to high(Czesci[CP].Czesc[Czesci[CP].High].Nuta) do
+ Lines[CP].Line[Lines[CP].High].TotalNotes := 0;
+ for I := low(Lines[CP].Line[Lines[CP].High].Note) to high(Lines[CP].Line[Lines[CP].High].Note) do
begin
- Czesci[CP].Czesc[Czesci[CP].High].TotalNotes := Czesci[CP].Czesc[Czesci[CP].High].TotalNotes + Czesci[CP].Czesc[Czesci[CP].High].Nuta[I].Dlugosc * Czesci[CP].Czesc[Czesci[CP].High].Nuta[I].Wartosc;
+ Lines[CP].Line[Lines[CP].High].TotalNotes := Lines[CP].Line[Lines[CP].High].TotalNotes + Lines[CP].Line[Lines[CP].High].Note[I].Dlugosc * Lines[CP].Line[Lines[CP].High].Note[I].Wartosc;
end;
//Total Notes Patch End
end else begin
- for Pet := 0 to High(Czesci) do begin
- Czesci[Pet].Czesc[Czesci[Pet].High].BaseNote := Base[Pet];
- Czesci[Pet].Czesc[Czesci[Pet].High].LyricWidth := glTextWidth(PChar(Czesci[Pet].Czesc[Czesci[Pet].High].Lyric));
+ for Pet := 0 to High(Lines) do begin
+ Lines[Pet].Line[Lines[Pet].High].BaseNote := Base[Pet];
+ Lines[Pet].Line[Lines[Pet].High].LyricWidth := glTextWidth(PChar(Lines[Pet].Line[Lines[Pet].High].Lyric));
//Total Notes Patch
- Czesci[Pet].Czesc[Czesci[Pet].High].TotalNotes := 0;
- for I := low(Czesci[Pet].Czesc[Czesci[Pet].High].Nuta) to high(Czesci[Pet].Czesc[Czesci[Pet].High].Nuta) do
+ Lines[Pet].Line[Lines[Pet].High].TotalNotes := 0;
+ for I := low(Lines[Pet].Line[Lines[Pet].High].Note) to high(Lines[Pet].Line[Lines[Pet].High].Note) do
begin
- Czesci[Pet].Czesc[Czesci[Pet].High].TotalNotes := Czesci[Pet].Czesc[Czesci[Pet].High].TotalNotes + Czesci[Pet].Czesc[Czesci[Pet].High].Nuta[I].Dlugosc * Czesci[Pet].Czesc[Czesci[Pet].High].Nuta[I].Wartosc;
+ Lines[Pet].Line[Lines[Pet].High].TotalNotes := Lines[Pet].Line[Lines[Pet].High].TotalNotes + Lines[Pet].Line[Lines[Pet].High].Note[I].Dlugosc * Lines[Pet].Line[Lines[Pet].High].Note[I].Wartosc;
end;
//Total Notes Patch End
end;
@@ -578,43 +578,43 @@ begin
end;
end; // case
- with Czesci[NrCzesci].Czesc[Czesci[NrCzesci].High] do begin
- SetLength(Nuta, Length(Nuta) + 1);
+ with Lines[NrCzesci].Line[Lines[NrCzesci].High] do begin
+ SetLength(Note, Length(Note) + 1);
IlNut := IlNut + 1;
- HighNut := HighNut + 1;
- Muzyka.IlNut := Muzyka.IlNut + 1;
+ HighNote := HighNote + 1;
+ Melody.IlNut := Melody.IlNut + 1;
- Nuta[HighNut].Start := StartP;
+ Note[HighNote].Start := StartP;
if IlNut = 1 then begin
- StartNote := Nuta[HighNut].Start;
- if Czesci[NrCzesci].Ilosc = 1 then
+ StartNote := Note[HighNote].Start;
+ if Lines[NrCzesci].Ilosc = 1 then
Start := -100;
-// Start := Nuta[HighNut].Start;
+// Start := Note[HighNote].Start;
end;
- Nuta[HighNut].Dlugosc := DurationP;
- Muzyka.DlugoscNut := Muzyka.DlugoscNut + Nuta[HighNut].Dlugosc;
+ Note[HighNote].Dlugosc := DurationP;
+ Melody.DlugoscNut := Melody.DlugoscNut + Note[HighNote].Dlugosc;
// back to the normal system with normal, golden and now freestyle notes
case TypeP of
- 'F': Nuta[HighNut].Wartosc := 0;
- ':': Nuta[HighNut].Wartosc := 1;
- '*': Nuta[HighNut].Wartosc := 2;
+ 'F': Note[HighNote].Wartosc := 0;
+ ':': Note[HighNote].Wartosc := 1;
+ '*': Note[HighNote].Wartosc := 2;
end;
- Czesci[NrCzesci].Wartosc := Czesci[NrCzesci].Wartosc + Nuta[HighNut].Dlugosc * Nuta[HighNut].Wartosc;
+ Lines[NrCzesci].Wartosc := Lines[NrCzesci].Wartosc + Note[HighNote].Dlugosc * Note[HighNote].Wartosc;
- Nuta[HighNut].Ton := NoteP;
- if Nuta[HighNut].Ton < Base[NrCzesci] then Base[NrCzesci] := Nuta[HighNut].Ton;
- Nuta[HighNut].TonGamy := Nuta[HighNut].TonGamy mod 12;
+ Note[HighNote].Ton := NoteP;
+ if Note[HighNote].Ton < Base[NrCzesci] then Base[NrCzesci] := Note[HighNote].Ton;
+ Note[HighNote].TonGamy := Note[HighNote].TonGamy mod 12;
- Nuta[HighNut].Tekst := Copy(LyricS, 2, 100);
- Lyric := Lyric + Nuta[HighNut].Tekst;
+ Note[HighNote].Tekst := Copy(LyricS, 2, 100);
+ Lyric := Lyric + Note[HighNote].Tekst;
if TypeP = 'F' then
- Nuta[HighNut].FreeStyle := true;
+ Note[HighNote].FreeStyle := true;
- Koniec := Nuta[HighNut].Start + Nuta[HighNut].Dlugosc;
+ Koniec := Note[HighNote].Start + Note[HighNote].Dlugosc;
end; // with
end;
@@ -624,31 +624,31 @@ I: Integer;
begin
// stara czesc //Alter Satz //Update Old Part
- Czesci[NrCzesciP].Czesc[Czesci[NrCzesciP].High].BaseNote := Base[NrCzesciP];
- Czesci[NrCzesciP].Czesc[Czesci[NrCzesciP].High].LyricWidth := glTextWidth(PChar(Czesci[NrCzesciP].Czesc[Czesci[NrCzesciP].High].Lyric));
+ Lines[NrCzesciP].Line[Lines[NrCzesciP].High].BaseNote := Base[NrCzesciP];
+ Lines[NrCzesciP].Line[Lines[NrCzesciP].High].LyricWidth := glTextWidth(PChar(Lines[NrCzesciP].Line[Lines[NrCzesciP].High].Lyric));
//Total Notes Patch
- Czesci[NrCzesciP].Czesc[Czesci[NrCzesciP].High].TotalNotes := 0;
- for I := low(Czesci[NrCzesciP].Czesc[Czesci[NrCzesciP].High].Nuta) to high(Czesci[NrCzesciP].Czesc[Czesci[NrCzesciP].High].Nuta) do
+ Lines[NrCzesciP].Line[Lines[NrCzesciP].High].TotalNotes := 0;
+ for I := low(Lines[NrCzesciP].Line[Lines[NrCzesciP].High].Note) to high(Lines[NrCzesciP].Line[Lines[NrCzesciP].High].Note) do
begin
- Czesci[NrCzesciP].Czesc[Czesci[NrCzesciP].High].TotalNotes := Czesci[NrCzesciP].Czesc[Czesci[NrCzesciP].High].TotalNotes + Czesci[NrCzesciP].Czesc[Czesci[NrCzesciP].High].Nuta[I].Dlugosc * Czesci[NrCzesciP].Czesc[Czesci[NrCzesciP].High].Nuta[I].Wartosc;
+ Lines[NrCzesciP].Line[Lines[NrCzesciP].High].TotalNotes := Lines[NrCzesciP].Line[Lines[NrCzesciP].High].TotalNotes + Lines[NrCzesciP].Line[Lines[NrCzesciP].High].Note[I].Dlugosc * Lines[NrCzesciP].Line[Lines[NrCzesciP].High].Note[I].Wartosc;
end;
//Total Notes Patch End
// nowa czesc //Neuer Satz //Update New Part
- SetLength(Czesci[NrCzesciP].Czesc, Czesci[NrCzesciP].Ilosc + 1);
- Czesci[NrCzesciP].High := Czesci[NrCzesciP].High + 1;
- Czesci[NrCzesciP].Ilosc := Czesci[NrCzesciP].Ilosc + 1;
- Czesci[NrCzesciP].Czesc[Czesci[NrCzesciP].High].HighNut := -1;
+ SetLength(Lines[NrCzesciP].Line, Lines[NrCzesciP].Ilosc + 1);
+ Lines[NrCzesciP].High := Lines[NrCzesciP].High + 1;
+ Lines[NrCzesciP].Ilosc := Lines[NrCzesciP].Ilosc + 1;
+ Lines[NrCzesciP].Line[Lines[NrCzesciP].High].HighNote := -1;
if self.Relative then
begin
- Czesci[NrCzesciP].Czesc[Czesci[NrCzesciP].High].Start := Param1;
+ Lines[NrCzesciP].Line[Lines[NrCzesciP].High].Start := Param1;
Rel[NrCzesciP] := Rel[NrCzesciP] + Param2;
end
else
- Czesci[NrCzesciP].Czesc[Czesci[NrCzesciP].High].Start := Param1;
+ Lines[NrCzesciP].Line[Lines[NrCzesciP].High].Start := Param1;
Base[NrCzesciP] := 100; // high number
end;
diff --git a/Game/Code/Screens/UScreenEditConvert.pas b/Game/Code/Screens/UScreenEditConvert.pas
index 16717419..5887943c 100644
--- a/Game/Code/Screens/UScreenEditConvert.pas
+++ b/Game/Code/Screens/UScreenEditConvert.pas
@@ -70,10 +70,10 @@ type
{$ENDIF}
Song: TSong;
- Czesc: TCzesci;
+ Lines: TLines;
BPM: real;
Ticks: real;
- Nuta: array of TNuta;
+ Note: array of TNuta;
procedure AddLyric(Start: integer; Tekst: string);
procedure Extract;
@@ -161,7 +161,7 @@ begin
if Interaction = 3 then begin
if SelectedNumber > 0 then begin
Extract;
- SaveSong(Song, Czesc, ChangeFileExt(FileName, '.txt'), false);
+ SaveSong(Song, Lines, ChangeFileExt(FileName, '.txt'), false);
end;
end;
@@ -209,20 +209,20 @@ procedure TScreenEditConvert.AddLyric(Start: integer; Tekst: string);
var
N: integer;
begin
- for N := 0 to High(Nuta) do begin
- if Nuta[N].Start = Start then begin
+ for N := 0 to High(Note) do begin
+ if Note[N].Start = Start then begin
// check for new sentece
if Copy(Tekst, 1, 1) = '\' then Delete(Tekst, 1, 1);
if Copy(Tekst, 1, 1) = '/' then begin
Delete(Tekst, 1, 1);
- Nuta[N].NewSentence := true;
+ Note[N].NewSentence := true;
end;
// overwrite lyric od append
- if Nuta[N].Lyric = '-' then
- Nuta[N].Lyric := Tekst
+ if Note[N].Lyric = '-' then
+ Note[N].Lyric := Tekst
else
- Nuta[N].Lyric := Nuta[N].Lyric + Tekst;
+ Note[N].Lyric := Note[N].Lyric + Tekst;
end;
end;
end;
@@ -233,7 +233,7 @@ var
C: integer;
N: integer;
Nu: integer;
- NutaTemp: TNuta;
+ NoteTemp: TNuta;
Move: integer;
Max, Min: integer;
begin
@@ -245,7 +245,7 @@ begin
SetLength(Song.BPM, 1);
Song.BPM[0].BPM := BPM*4;
- SetLength(Nuta, 0);
+ SetLength(Note, 0);
// extract notes
for T := 0 to High(ATrack) do begin
@@ -253,12 +253,12 @@ begin
if ((ATrack[T].Status div 1) and 1) = 1 then begin
for N := 0 to High(ATrack[T].Note) do begin
if (ATrack[T].Note[N].EventType = 9) and (ATrack[T].Note[N].Data2 > 0) then begin
- Nu := Length(Nuta);
- SetLength(Nuta, Nu + 1);
- Nuta[Nu].Start := Round(ATrack[T].Note[N].Start / Ticks);
- Nuta[Nu].Len := Round(ATrack[T].Note[N].Len / Ticks);
- Nuta[Nu].Tone := ATrack[T].Note[N].Data1 - 12*5;
- Nuta[Nu].Lyric := '-';
+ Nu := Length(Note);
+ SetLength(Note, Nu + 1);
+ Note[Nu].Start := Round(ATrack[T].Note[N].Start / Ticks);
+ Note[Nu].Len := Round(ATrack[T].Note[N].Len / Ticks);
+ Note[Nu].Tone := ATrack[T].Note[N].Data1 - 12*5;
+ Note[Nu].Lyric := '-';
end;
end;
end;
@@ -278,56 +278,56 @@ begin
end;
// sort notes
- for N := 0 to High(Nuta) do
- for Nu := 0 to High(Nuta)-1 do
- if Nuta[Nu].Start > Nuta[Nu+1].Start then begin
- NutaTemp := Nuta[Nu];
- Nuta[Nu] := Nuta[Nu+1];
- Nuta[Nu+1] := NutaTemp;
+ for N := 0 to High(Note) do
+ for Nu := 0 to High(Note)-1 do
+ if Note[Nu].Start > Note[Nu+1].Start then begin
+ NoteTemp := Note[Nu];
+ Note[Nu] := Note[Nu+1];
+ Note[Nu+1] := NoteTemp;
end;
// move to 0 at beginning
- Move := Nuta[0].Start;
- for N := 0 to High(Nuta) do
- Nuta[N].Start := Nuta[N].Start - Move;
+ Move := Note[0].Start;
+ for N := 0 to High(Note) do
+ Note[N].Start := Note[N].Start - Move;
// copy notes
- SetLength(Czesc.Czesc, 1);
- Czesc.Ilosc := 1;
- Czesc.High := 0;
+ SetLength(Lines.Line, 1);
+ Lines.Ilosc := 1;
+ Lines.High := 0;
C := 0;
N := 0;
- Czesc.Czesc[C].IlNut := 0;
- Czesc.Czesc[C].HighNut := -1;
-
- for Nu := 0 to High(Nuta) do begin
- if Nuta[Nu].NewSentence then begin // nowa linijka
- SetLength(Czesc.Czesc, Length(Czesc.Czesc)+1);
- Czesc.Ilosc := Czesc.Ilosc + 1;
- Czesc.High := Czesc.High + 1;
+ Lines.Line[C].IlNut := 0;
+ Lines.Line[C].HighNote := -1;
+
+ for Nu := 0 to High(Note) do begin
+ if Note[Nu].NewSentence then begin // nowa linijka
+ SetLength(Lines.Line, Length(Lines.Line)+1);
+ Lines.Ilosc := Lines.Ilosc + 1;
+ Lines.High := Lines.High + 1;
C := C + 1;
N := 0;
- SetLength(Czesc.Czesc[C].Nuta, 0);
- Czesc.Czesc[C].IlNut := 0;
- Czesc.Czesc[C].HighNut := -1;
+ SetLength(Lines.Line[C].Note, 0);
+ Lines.Line[C].IlNut := 0;
+ Lines.Line[C].HighNote := -1;
//Calculate Start of the Last Sentence
if (C > 0) and (Nu > 0) then
begin
- Max := Nuta[Nu].Start;
- Min := Nuta[Nu-1].Start + Nuta[Nu-1].Len;
+ Max := Note[Nu].Start;
+ Min := Note[Nu-1].Start + Note[Nu-1].Len;
case (Max - Min) of
- 0: Czesc.Czesc[C].Start := Max;
- 1: Czesc.Czesc[C].Start := Max;
- 2: Czesc.Czesc[C].Start := Max - 1;
- 3: Czesc.Czesc[C].Start := Max - 2;
+ 0: Lines.Line[C].Start := Max;
+ 1: Lines.Line[C].Start := Max;
+ 2: Lines.Line[C].Start := Max - 1;
+ 3: Lines.Line[C].Start := Max - 2;
else
if ((Max - Min) > 4) then
- Czesc.Czesc[C].Start := Min + 2
+ Lines.Line[C].Start := Min + 2
else
- Czesc.Czesc[C].Start := Max;
+ Lines.Line[C].Start := Max;
end; // case
@@ -335,17 +335,17 @@ begin
end;
// tworzy miejsce na nowa nute
- SetLength(Czesc.Czesc[C].Nuta, Length(Czesc.Czesc[C].Nuta)+1);
- Czesc.Czesc[C].IlNut := Czesc.Czesc[C].IlNut + 1;
- Czesc.Czesc[C].HighNut := Czesc.Czesc[C].HighNut + 1;
+ SetLength(Lines.Line[C].Note, Length(Lines.Line[C].Note)+1);
+ Lines.Line[C].IlNut := Lines.Line[C].IlNut + 1;
+ Lines.Line[C].HighNote := Lines.Line[C].HighNote + 1;
// dopisuje
- Czesc.Czesc[C].Nuta[N].Start := Nuta[Nu].Start;
- Czesc.Czesc[C].Nuta[N].Dlugosc := Nuta[Nu].Len;
- Czesc.Czesc[C].Nuta[N].Ton := Nuta[Nu].Tone;
- Czesc.Czesc[C].Nuta[N].Tekst := Nuta[Nu].Lyric;
+ Lines.Line[C].Note[N].Start := Note[Nu].Start;
+ Lines.Line[C].Note[N].Dlugosc := Note[Nu].Len;
+ Lines.Line[C].Note[N].Ton := Note[Nu].Tone;
+ Lines.Line[C].Note[N].Tekst := Note[Nu].Lyric;
//All Notes are Freestyle when Converted Fix:
- Czesc.Czesc[C].Nuta[N].Wartosc := 1;
+ Lines.Line[C].Note[N].Wartosc := 1;
Inc(N);
end;
end;
diff --git a/Game/Code/Screens/UScreenEditSub.pas b/Game/Code/Screens/UScreenEditSub.pas
index f4a2e40b..ea1642c3 100644
--- a/Game/Code/Screens/UScreenEditSub.pas
+++ b/Game/Code/Screens/UScreenEditSub.pas
@@ -134,9 +134,9 @@ begin
SDLK_BACKQUOTE:
begin
// Increase Note Length (same as Alt + Right)
- Inc(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Dlugosc);
- if AktNuta = Czesci[0].Czesc[Czesci[0].Akt].HighNut then
- Inc(Czesci[0].Czesc[Czesci[0].Akt].Koniec);
+ Inc(Lines[0].Line[Lines[0].Akt].Note[AktNuta].Dlugosc);
+ if AktNuta = Lines[0].Line[Lines[0].Akt].HighNote then
+ Inc(Lines[0].Line[Lines[0].Akt].Koniec);
end;
SDLK_EQUALS:
@@ -207,7 +207,7 @@ begin
if SDL_ModState = KMOD_LSHIFT then begin
// Join next sentence with current
- if Czesci[0].Akt < Czesci[0].High then
+ if Lines[0].Akt < Lines[0].High then
JoinSentence;
end;
@@ -222,13 +222,13 @@ begin
begin
// Save Song
if SDL_ModState = KMOD_LSHIFT then
- SaveSong(CurrentSong, Czesci[0], CurrentSong.Path + CurrentSong.FileName, true)
+ SaveSong(CurrentSong, Lines[0], CurrentSong.Path + CurrentSong.FileName, true)
else
- SaveSong(CurrentSong, Czesci[0], CurrentSong.Path + CurrentSong.FileName, false);
+ SaveSong(CurrentSong, Lines[0], CurrentSong.Path + CurrentSong.FileName, false);
{if SDL_ModState = KMOD_LSHIFT or KMOD_LCTRL + KMOD_LALT then
// Save Song
- SaveSongDebug(CurrentSong, Czesci[0], 'C:\song.asm', false);}
+ SaveSongDebug(CurrentSong, Lines[0], 'C:\song.asm', false);}
end;
@@ -263,42 +263,42 @@ begin
begin
// Paste text
if SDL_ModState = KMOD_LCTRL then begin
- if Czesci[0].Czesc[Czesci[0].Akt].IlNut >= Czesci[0].Czesc[CopySrc].IlNut then
+ if Lines[0].Line[Lines[0].Akt].IlNut >= Lines[0].Line[CopySrc].IlNut then
PasteText
else
beep;
end;
if SDL_ModState = KMOD_LCTRL + KMOD_LSHIFT then begin
- CopySentence(CopySrc, Czesci[0].Akt);
+ CopySentence(CopySrc, Lines[0].Akt);
end;
end;
SDLK_4:
begin
if SDL_ModState = KMOD_LCTRL + KMOD_LSHIFT then begin
- CopySentence(CopySrc, Czesci[0].Akt);
- CopySentence(CopySrc+1, Czesci[0].Akt+1);
- CopySentence(CopySrc+2, Czesci[0].Akt+2);
- CopySentence(CopySrc+3, Czesci[0].Akt+3);
+ CopySentence(CopySrc, Lines[0].Akt);
+ CopySentence(CopySrc+1, Lines[0].Akt+1);
+ CopySentence(CopySrc+2, Lines[0].Akt+2);
+ CopySentence(CopySrc+3, Lines[0].Akt+3);
end;
if SDL_ModState = KMOD_LCTRL + KMOD_LSHIFT + KMOD_LALT then begin
- CopySentences(CopySrc, Czesci[0].Akt, 4);
+ CopySentences(CopySrc, Lines[0].Akt, 4);
end;
end;
SDLK_5:
begin
if SDL_ModState = KMOD_LCTRL + KMOD_LSHIFT then begin
- CopySentence(CopySrc, Czesci[0].Akt);
- CopySentence(CopySrc+1, Czesci[0].Akt+1);
- CopySentence(CopySrc+2, Czesci[0].Akt+2);
- CopySentence(CopySrc+3, Czesci[0].Akt+3);
- CopySentence(CopySrc+4, Czesci[0].Akt+4);
+ CopySentence(CopySrc, Lines[0].Akt);
+ CopySentence(CopySrc+1, Lines[0].Akt+1);
+ CopySentence(CopySrc+2, Lines[0].Akt+2);
+ CopySentence(CopySrc+3, Lines[0].Akt+3);
+ CopySentence(CopySrc+4, Lines[0].Akt+4);
end;
if SDL_ModState = KMOD_LCTRL + KMOD_LSHIFT + KMOD_LALT then begin
- CopySentences(CopySrc, Czesci[0].Akt, 5);
+ CopySentences(CopySrc, Lines[0].Akt, 5);
end;
end;
@@ -320,11 +320,11 @@ begin
// Play Sentence
Click := true;
AudioPlayback.Stop;
- R := GetTimeFromBeat(Czesci[0].Czesc[Czesci[0].Akt].StartNote);
+ R := GetTimeFromBeat(Lines[0].Line[Lines[0].Akt].StartNote);
if R <= AudioPlayback.Length then
begin
AudioPlayback.Position := R;
- PlayStopTime := GetTimeFromBeat(Czesci[0].Czesc[Czesci[0].Akt].Koniec);
+ PlayStopTime := GetTimeFromBeat(Lines[0].Line[Lines[0].Akt].Koniec);
PlaySentence := true;
AudioPlayback.Play;
LastClick := -100;
@@ -335,23 +335,23 @@ begin
PlaySentenceMidi := true;
MidiTime := USTime.GetTime;
- MidiStart := GetTimeFromBeat(Czesci[0].Czesc[Czesci[0].Akt].StartNote);
- MidiStop := GetTimeFromBeat(Czesci[0].Czesc[Czesci[0].Akt].Koniec);
+ MidiStart := GetTimeFromBeat(Lines[0].Line[Lines[0].Akt].StartNote);
+ MidiStop := GetTimeFromBeat(Lines[0].Line[Lines[0].Akt].Koniec);
LastClick := -100;
end;
if SDL_ModState = KMOD_LSHIFT or KMOD_LCTRL then begin
PlaySentenceMidi := true;
MidiTime := USTime.GetTime;
- MidiStart := GetTimeFromBeat(Czesci[0].Czesc[Czesci[0].Akt].StartNote);
- MidiStop := GetTimeFromBeat(Czesci[0].Czesc[Czesci[0].Akt].Koniec);
+ MidiStart := GetTimeFromBeat(Lines[0].Line[Lines[0].Akt].StartNote);
+ MidiStop := GetTimeFromBeat(Lines[0].Line[Lines[0].Akt].Koniec);
LastClick := -100;
PlaySentence := true;
Click := true;
AudioPlayback.Stop;
- AudioPlayback.Position := GetTimeFromBeat(Czesci[0].Czesc[Czesci[0].Akt].StartNote)+0{-0.10};
- PlayStopTime := GetTimeFromBeat(Czesci[0].Czesc[Czesci[0].Akt].Koniec)+0;
+ AudioPlayback.Position := GetTimeFromBeat(Lines[0].Line[Lines[0].Akt].StartNote)+0{-0.10};
+ PlayStopTime := GetTimeFromBeat(Lines[0].Line[Lines[0].Akt].Koniec)+0;
AudioPlayback.Play;
LastClick := -100;
end;
@@ -364,10 +364,10 @@ begin
PlaySentence := true;
Click := false;
AudioPlayback.Stop;
- AudioPlayback.Position := GetTimeFromBeat(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Start);
+ AudioPlayback.Position := GetTimeFromBeat(Lines[0].Line[Lines[0].Akt].Note[AktNuta].Start);
PlayStopTime := (GetTimeFromBeat(
- Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Start +
- Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Dlugosc));
+ Lines[0].Line[Lines[0].Akt].Note[AktNuta].Start +
+ Lines[0].Line[Lines[0].Akt].Note[AktNuta].Dlugosc));
AudioPlayback.Play;
LastClick := -100;
end;
@@ -398,41 +398,41 @@ begin
begin
// right
if SDL_ModState = 0 then begin
- Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Color := 0;
+ Lines[0].Line[Lines[0].Akt].Note[AktNuta].Color := 0;
Inc(AktNuta);
- if AktNuta = Czesci[0].Czesc[Czesci[0].Akt].IlNut then AktNuta := 0;
- Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Color := 1;
+ if AktNuta = Lines[0].Line[Lines[0].Akt].IlNut then AktNuta := 0;
+ Lines[0].Line[Lines[0].Akt].Note[AktNuta].Color := 1;
Lyric.Selected := AktNuta;
end;
// ctrl + right
if SDL_ModState = KMOD_LCTRL then begin
- if Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Dlugosc > 1 then begin
- Dec(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Dlugosc);
- Inc(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Start);
+ if Lines[0].Line[Lines[0].Akt].Note[AktNuta].Dlugosc > 1 then begin
+ Dec(Lines[0].Line[Lines[0].Akt].Note[AktNuta].Dlugosc);
+ Inc(Lines[0].Line[Lines[0].Akt].Note[AktNuta].Start);
if AktNuta = 0 then begin
- Inc(Czesci[0].Czesc[Czesci[0].Akt].Start);
- Inc(Czesci[0].Czesc[Czesci[0].Akt].StartNote);
+ Inc(Lines[0].Line[Lines[0].Akt].Start);
+ Inc(Lines[0].Line[Lines[0].Akt].StartNote);
end;
end;
end;
// shift + right
if SDL_ModState = KMOD_LSHIFT then begin
- Inc(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Start);
+ Inc(Lines[0].Line[Lines[0].Akt].Note[AktNuta].Start);
if AktNuta = 0 then begin
- Inc(Czesci[0].Czesc[Czesci[0].Akt].Start);
- Inc(Czesci[0].Czesc[Czesci[0].Akt].StartNote);
+ Inc(Lines[0].Line[Lines[0].Akt].Start);
+ Inc(Lines[0].Line[Lines[0].Akt].StartNote);
end;
- if AktNuta = Czesci[0].Czesc[Czesci[0].Akt].HighNut then
- Inc(Czesci[0].Czesc[Czesci[0].Akt].Koniec);
+ if AktNuta = Lines[0].Line[Lines[0].Akt].HighNote then
+ Inc(Lines[0].Line[Lines[0].Akt].Koniec);
end;
// alt + right
if SDL_ModState = KMOD_LALT then begin
- Inc(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Dlugosc);
- if AktNuta = Czesci[0].Czesc[Czesci[0].Akt].HighNut then
- Inc(Czesci[0].Czesc[Czesci[0].Akt].Koniec);
+ Inc(Lines[0].Line[Lines[0].Akt].Note[AktNuta].Dlugosc);
+ if AktNuta = Lines[0].Line[Lines[0].Akt].HighNote then
+ Inc(Lines[0].Line[Lines[0].Akt].Koniec);
end;
// alt + ctrl + shift + right = move all from cursor to right
@@ -446,44 +446,44 @@ begin
begin
// left
if SDL_ModState = 0 then begin
- Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Color := 0;
+ Lines[0].Line[Lines[0].Akt].Note[AktNuta].Color := 0;
Dec(AktNuta);
- if AktNuta = -1 then AktNuta := Czesci[0].Czesc[Czesci[0].Akt].HighNut;
- Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Color := 1;
+ if AktNuta = -1 then AktNuta := Lines[0].Line[Lines[0].Akt].HighNote;
+ Lines[0].Line[Lines[0].Akt].Note[AktNuta].Color := 1;
Lyric.Selected := AktNuta;
end;
// ctrl + left
if SDL_ModState = KMOD_LCTRL then begin
- Dec(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Start);
- Inc(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Dlugosc);
+ Dec(Lines[0].Line[Lines[0].Akt].Note[AktNuta].Start);
+ Inc(Lines[0].Line[Lines[0].Akt].Note[AktNuta].Dlugosc);
if AktNuta = 0 then begin
- Dec(Czesci[0].Czesc[Czesci[0].Akt].Start);
- Dec(Czesci[0].Czesc[Czesci[0].Akt].StartNote);
+ Dec(Lines[0].Line[Lines[0].Akt].Start);
+ Dec(Lines[0].Line[Lines[0].Akt].StartNote);
end;
end;
// shift + left
if SDL_ModState = KMOD_LSHIFT then begin
- Dec(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Start);
+ Dec(Lines[0].Line[Lines[0].Akt].Note[AktNuta].Start);
// resizing sentences
if AktNuta = 0 then begin
- Dec(Czesci[0].Czesc[Czesci[0].Akt].Start);
- Dec(Czesci[0].Czesc[Czesci[0].Akt].StartNote);
+ Dec(Lines[0].Line[Lines[0].Akt].Start);
+ Dec(Lines[0].Line[Lines[0].Akt].StartNote);
end;
- if AktNuta = Czesci[0].Czesc[Czesci[0].Akt].HighNut then
- Dec(Czesci[0].Czesc[Czesci[0].Akt].Koniec);
+ if AktNuta = Lines[0].Line[Lines[0].Akt].HighNote then
+ Dec(Lines[0].Line[Lines[0].Akt].Koniec);
end;
// alt + left
if SDL_ModState = KMOD_LALT then begin
- if Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Dlugosc > 1 then begin
- Dec(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Dlugosc);
- if AktNuta = Czesci[0].Czesc[Czesci[0].Akt].HighNut then
- Dec(Czesci[0].Czesc[Czesci[0].Akt].Koniec);
+ if Lines[0].Line[Lines[0].Akt].Note[AktNuta].Dlugosc > 1 then begin
+ Dec(Lines[0].Line[Lines[0].Akt].Note[AktNuta].Dlugosc);
+ if AktNuta = Lines[0].Line[Lines[0].Akt].HighNote then
+ Dec(Lines[0].Line[Lines[0].Akt].Koniec);
end;
end;
@@ -499,16 +499,16 @@ begin
{$IFDEF UseMIDIPort}
// skip to next sentence
if SDL_ModState = 0 then begin
- MidiOut.PutShort($81, Czesci[0].Czesc[Czesci[0].Akt].Nuta[MidiLastNote].Ton + 60, 127);
+ MidiOut.PutShort($81, Lines[0].Line[Lines[0].Akt].Note[MidiLastNote].Ton + 60, 127);
PlaySentenceMidi := false;
- Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Color := 0;
- Inc(Czesci[0].Akt);
+ Lines[0].Line[Lines[0].Akt].Note[AktNuta].Color := 0;
+ Inc(Lines[0].Akt);
AktNuta := 0;
- if Czesci[0].Akt > Czesci[0].High then Czesci[0].Akt := 0;
- Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Color := 1;
+ if Lines[0].Akt > Lines[0].High then Lines[0].Akt := 0;
+ Lines[0].Line[Lines[0].Akt].Note[AktNuta].Color := 1;
- Lyric.AddCzesc(Czesci[0].Akt);
+ Lyric.AddCzesc(Lines[0].Akt);
Lyric.Selected := 0;
AudioPlayback.Stop;
PlaySentence := false;
@@ -527,16 +527,16 @@ begin
{$IFDEF UseMIDIPort}
// skip to previous sentence
if SDL_ModState = 0 then begin
- MidiOut.PutShort($81, Czesci[0].Czesc[Czesci[0].Akt].Nuta[MidiLastNote].Ton + 60, 127);
+ MidiOut.PutShort($81, Lines[0].Line[Lines[0].Akt].Note[MidiLastNote].Ton + 60, 127);
PlaySentenceMidi := false;
- Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Color := 0;
- Dec(Czesci[0].Akt);
+ Lines[0].Line[Lines[0].Akt].Note[AktNuta].Color := 0;
+ Dec(Lines[0].Akt);
AktNuta := 0;
- if Czesci[0].Akt = -1 then Czesci[0].Akt := Czesci[0].High;
- Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Color := 1;
+ if Lines[0].Akt = -1 then Lines[0].Akt := Lines[0].High;
+ Lines[0].Line[Lines[0].Akt].Note[AktNuta].Color := 1;
- Lyric.AddCzesc(Czesci[0].Akt);
+ Lyric.AddCzesc(Lines[0].Akt);
Lyric.Selected := 0;
AudioPlayback.Stop;
PlaySentence := false;
@@ -552,27 +552,27 @@ begin
// Golden Note Patch
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;
+ case Lines[0].Line[Lines[0].Akt].Note[AktNuta].Wartosc of
+ 0: Lines[0].Line[Lines[0].Akt].Note[AktNuta].Wartosc := 2;
+ 1: Lines[0].Line[Lines[0].Akt].Note[AktNuta].Wartosc := 2;
+ 2: Lines[0].Line[Lines[0].Akt].Note[AktNuta].Wartosc := 1;
end; // case
- Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Freestyle := False;
+ Lines[0].Line[Lines[0].Akt].Note[AktNuta].Freestyle := False;
end;
// Freestyle Note Patch
SDLK_F:
begin
- case Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Wartosc of
+ case Lines[0].Line[Lines[0].Akt].Note[AktNuta].Wartosc of
0:
begin;
- Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Wartosc := 1;
- Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Freestyle := False;
+ Lines[0].Line[Lines[0].Akt].Note[AktNuta].Wartosc := 1;
+ Lines[0].Line[Lines[0].Akt].Note[AktNuta].Freestyle := False;
end;
1,2:
begin;
- Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Wartosc := 0;
- Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Freestyle := True;
+ Lines[0].Line[Lines[0].Akt].Note[AktNuta].Wartosc := 0;
+ Lines[0].Line[Lines[0].Akt].Note[AktNuta].Freestyle := True;
end;
end; // case
@@ -609,22 +609,22 @@ begin
end;
SDLK_0..SDLK_9, SDLK_A..SDLK_Z, SDLK_SPACE, SDLK_MINUS, SDLK_EXCLAIM, SDLK_COMMA, SDLK_SLASH, SDLK_ASTERISK, SDLK_QUESTION, SDLK_QUOTE, SDLK_QUOTEDBL:
begin
- Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Tekst :=
- Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Tekst + chr(ScanCode);
+ Lines[0].Line[Lines[0].Akt].Note[AktNuta].Tekst :=
+ Lines[0].Line[Lines[0].Akt].Note[AktNuta].Tekst + chr(ScanCode);
end;
SDLK_BACKSPACE:
begin
- Delete(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Tekst,
- Length(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Tekst), 1);
+ Delete(Lines[0].Line[Lines[0].Akt].Note[AktNuta].Tekst,
+ Length(Lines[0].Line[Lines[0].Akt].Note[AktNuta].Tekst), 1);
end;
SDLK_RIGHT:
begin
// right
if SDL_ModState = 0 then begin
- Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Color := 0;
+ Lines[0].Line[Lines[0].Akt].Note[AktNuta].Color := 0;
Inc(AktNuta);
- if AktNuta = Czesci[0].Czesc[Czesci[0].Akt].IlNut then AktNuta := 0;
- Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Color := 1;
+ if AktNuta = Lines[0].Line[Lines[0].Akt].IlNut then AktNuta := 0;
+ Lines[0].Line[Lines[0].Akt].Note[AktNuta].Color := 1;
Lyric.Selected := AktNuta;
end;
end;
@@ -632,10 +632,10 @@ begin
begin
// left
if SDL_ModState = 0 then begin
- Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Color := 0;
+ Lines[0].Line[Lines[0].Akt].Note[AktNuta].Color := 0;
Dec(AktNuta);
- if AktNuta = -1 then AktNuta := Czesci[0].Czesc[Czesci[0].Akt].HighNut;
- Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Color := 1;
+ if AktNuta = -1 then AktNuta := Lines[0].Line[Lines[0].Akt].HighNote;
+ Lines[0].Line[Lines[0].Akt].Note[AktNuta].Color := 1;
Lyric.Selected := AktNuta;
end;
end;
@@ -646,8 +646,8 @@ end;
procedure TScreenEditSub.NewBeat;
begin
// click
-{ for Pet := 0 to Czesci[0].Czesc[Czesci[0].Akt].HighNut do
- if (Czesci[0].Czesc[Czesci[0].Akt].Nuta[Pet].Start = Czas.AktBeat) then begin
+{ for Pet := 0 to Lines[0].Line[Lines[0].Akt].HighNut do
+ if (Lines[0].Line[Lines[0].Akt].Note[Pet].Start = Czas.AktBeat) then begin
// old}
// Music.PlayClick;
end;
@@ -658,13 +658,13 @@ var
N: integer;
begin
CurrentSong.BPM[0].BPM := CurrentSong.BPM[0].BPM / 2;
- for C := 0 to Czesci[0].High do begin
- Czesci[0].Czesc[C].Start := Czesci[0].Czesc[C].Start div 2;
- Czesci[0].Czesc[C].StartNote := Czesci[0].Czesc[C].StartNote div 2;
- Czesci[0].Czesc[C].Koniec := Czesci[0].Czesc[C].Koniec div 2;
- for N := 0 to Czesci[0].Czesc[C].HighNut do begin
- Czesci[0].Czesc[C].Nuta[N].Start := Czesci[0].Czesc[C].Nuta[N].Start div 2;
- Czesci[0].Czesc[C].Nuta[N].Dlugosc := Round(Czesci[0].Czesc[C].Nuta[N].Dlugosc / 2);
+ for C := 0 to Lines[0].High do begin
+ Lines[0].Line[C].Start := Lines[0].Line[C].Start div 2;
+ Lines[0].Line[C].StartNote := Lines[0].Line[C].StartNote div 2;
+ Lines[0].Line[C].Koniec := Lines[0].Line[C].Koniec div 2;
+ for N := 0 to Lines[0].Line[C].HighNote do begin
+ Lines[0].Line[C].Note[N].Start := Lines[0].Line[C].Note[N].Start div 2;
+ Lines[0].Line[C].Note[N].Dlugosc := Round(Lines[0].Line[C].Note[N].Dlugosc / 2);
end; // N
end; // C
end;
@@ -675,13 +675,13 @@ var
N: integer;
begin
CurrentSong.BPM[0].BPM := CurrentSong.BPM[0].BPM * 2;
- for C := 0 to Czesci[0].High do begin
- Czesci[0].Czesc[C].Start := Czesci[0].Czesc[C].Start * 2;
- Czesci[0].Czesc[C].StartNote := Czesci[0].Czesc[C].StartNote * 2;
- Czesci[0].Czesc[C].Koniec := Czesci[0].Czesc[C].Koniec * 2;
- for N := 0 to Czesci[0].Czesc[C].HighNut do begin
- Czesci[0].Czesc[C].Nuta[N].Start := Czesci[0].Czesc[C].Nuta[N].Start * 2;
- Czesci[0].Czesc[C].Nuta[N].Dlugosc := Czesci[0].Czesc[C].Nuta[N].Dlugosc * 2;
+ for C := 0 to Lines[0].High do begin
+ Lines[0].Line[C].Start := Lines[0].Line[C].Start * 2;
+ Lines[0].Line[C].StartNote := Lines[0].Line[C].StartNote * 2;
+ Lines[0].Line[C].Koniec := Lines[0].Line[C].Koniec * 2;
+ for N := 0 to Lines[0].Line[C].HighNote do begin
+ Lines[0].Line[C].Note[N].Start := Lines[0].Line[C].Note[N].Start * 2;
+ Lines[0].Line[C].Note[N].Dlugosc := Lines[0].Line[C].Note[N].Dlugosc * 2;
end; // N
end; // C
end;
@@ -693,14 +693,14 @@ var
S: string;
begin
// temporary
-{ for C := 0 to Czesci[0].High do
- for N := 0 to Czesci[0].Czesc[C].HighNut do
- Czesci[0].Czesc[C].Nuta[N].Tekst := AnsiLowerCase(Czesci[0].Czesc[C].Nuta[N].Tekst);}
-
- for C := 0 to Czesci[0].High do begin
- S := AnsiUpperCase(Copy(Czesci[0].Czesc[C].Nuta[0].Tekst, 1, 1));
- S := S + Copy(Czesci[0].Czesc[C].Nuta[0].Tekst, 2, Length(Czesci[0].Czesc[C].Nuta[0].Tekst)-1);
- Czesci[0].Czesc[C].Nuta[0].Tekst := S;
+{ for C := 0 to Lines[0].High do
+ for N := 0 to Lines[0].Line[C].HighNut do
+ Lines[0].Line[C].Note[N].Tekst := AnsiLowerCase(Lines[0].Line[C].Note[N].Tekst);}
+
+ for C := 0 to Lines[0].High do begin
+ S := AnsiUpperCase(Copy(Lines[0].Line[C].Note[0].Tekst, 1, 1));
+ S := S + Copy(Lines[0].Line[C].Note[0].Tekst, 2, Length(Lines[0].Line[C].Note[0].Tekst)-1);
+ Lines[0].Line[C].Note[0].Tekst := S;
end; // C
end;
@@ -709,41 +709,41 @@ var
C: integer;
N: integer;
begin
- for C := 0 to Czesci[0].High do begin
+ for C := 0 to Lines[0].High do begin
// correct starting spaces in the first word
- while Copy(Czesci[0].Czesc[C].Nuta[0].Tekst, 1, 1) = ' ' do
- Czesci[0].Czesc[C].Nuta[0].Tekst := Copy(Czesci[0].Czesc[C].Nuta[0].Tekst, 2, 100);
+ while Copy(Lines[0].Line[C].Note[0].Tekst, 1, 1) = ' ' do
+ Lines[0].Line[C].Note[0].Tekst := Copy(Lines[0].Line[C].Note[0].Tekst, 2, 100);
// move spaces on the start to the end of the previous note
- for N := 1 to Czesci[0].Czesc[C].HighNut do begin
- while (Copy(Czesci[0].Czesc[C].Nuta[N].Tekst, 1, 1) = ' ') do begin
- Czesci[0].Czesc[C].Nuta[N].Tekst := Copy(Czesci[0].Czesc[C].Nuta[N].Tekst, 2, 100);
- Czesci[0].Czesc[C].Nuta[N-1].Tekst := Czesci[0].Czesc[C].Nuta[N-1].Tekst + ' ';
+ for N := 1 to Lines[0].Line[C].HighNote do begin
+ while (Copy(Lines[0].Line[C].Note[N].Tekst, 1, 1) = ' ') do begin
+ Lines[0].Line[C].Note[N].Tekst := Copy(Lines[0].Line[C].Note[N].Tekst, 2, 100);
+ Lines[0].Line[C].Note[N-1].Tekst := Lines[0].Line[C].Note[N-1].Tekst + ' ';
end;
end; // N
// correct '-' to '- '
- for N := 0 to Czesci[0].Czesc[C].HighNut do begin
- if Czesci[0].Czesc[C].Nuta[N].Tekst = '-' then
- Czesci[0].Czesc[C].Nuta[N].Tekst := '- ';
+ for N := 0 to Lines[0].Line[C].HighNote do begin
+ if Lines[0].Line[C].Note[N].Tekst = '-' then
+ Lines[0].Line[C].Note[N].Tekst := '- ';
end; // N
// add space to the previous note when the current word is '- '
- for N := 1 to Czesci[0].Czesc[C].HighNut do begin
- if Czesci[0].Czesc[C].Nuta[N].Tekst = '- ' then
- Czesci[0].Czesc[C].Nuta[N-1].Tekst := Czesci[0].Czesc[C].Nuta[N-1].Tekst + ' ';
+ for N := 1 to Lines[0].Line[C].HighNote do begin
+ if Lines[0].Line[C].Note[N].Tekst = '- ' then
+ Lines[0].Line[C].Note[N-1].Tekst := Lines[0].Line[C].Note[N-1].Tekst + ' ';
end; // N
// correct too many spaces at the end of note
- for N := 0 to Czesci[0].Czesc[C].HighNut do begin
- while Copy(Czesci[0].Czesc[C].Nuta[N].Tekst, Length(Czesci[0].Czesc[C].Nuta[N].Tekst)-1, 2) = ' ' do
- Czesci[0].Czesc[C].Nuta[N].Tekst := Copy(Czesci[0].Czesc[C].Nuta[N].Tekst, 1, Length(Czesci[0].Czesc[C].Nuta[N].Tekst)-1);
+ for N := 0 to Lines[0].Line[C].HighNote do begin
+ while Copy(Lines[0].Line[C].Note[N].Tekst, Length(Lines[0].Line[C].Note[N].Tekst)-1, 2) = ' ' do
+ Lines[0].Line[C].Note[N].Tekst := Copy(Lines[0].Line[C].Note[N].Tekst, 1, Length(Lines[0].Line[C].Note[N].Tekst)-1);
end; // N
// and correct if there is no space at the end of sentence
- N := Czesci[0].Czesc[C].HighNut;
- if Copy(Czesci[0].Czesc[C].Nuta[N].Tekst, Length(Czesci[0].Czesc[C].Nuta[N].Tekst), 1) <> ' ' then
- Czesci[0].Czesc[C].Nuta[N].Tekst := Czesci[0].Czesc[C].Nuta[N].Tekst + ' ';
+ N := Lines[0].Line[C].HighNote;
+ if Copy(Lines[0].Line[C].Note[N].Tekst, Length(Lines[0].Line[C].Note[N].Tekst), 1) <> ' ' then
+ Lines[0].Line[C].Note[N].Tekst := Lines[0].Line[C].Note[N].Tekst + ' ';
end; // C
end;
@@ -755,10 +755,10 @@ var
Min: integer;
Max: integer;
begin
- for C := 1 to Czesci[0].High do begin
- with Czesci[0].Czesc[C-1] do begin
- Min := Nuta[HighNut].Start + Nuta[HighNut].Dlugosc;
- Max := Czesci[0].Czesc[C].StartNote;
+ for C := 1 to Lines[0].High do begin
+ with Lines[0].Line[C-1] do begin
+ Min := Note[HighNote].Start + Note[HighNote].Dlugosc;
+ Max := Lines[0].Line[C].StartNote;
case (Max - Min) of
0: S := Max;
1: S := Max;
@@ -771,7 +771,7 @@ begin
S := Max;
end; // case
- Czesci[0].Czesc[C].Start := S;
+ Lines[0].Line[C].Start := S;
end; // with
end; // for
end;
@@ -788,60 +788,60 @@ var
NNewL: integer;
begin
// increase sentence length by 1
- CLen := Length(Czesci[0].Czesc);
- SetLength(Czesci[0].Czesc, CLen + 1);
- Inc(Czesci[0].Ilosc);
- Inc(Czesci[0].High);
+ CLen := Length(Lines[0].Line);
+ SetLength(Lines[0].Line, CLen + 1);
+ Inc(Lines[0].Ilosc);
+ Inc(Lines[0].High);
// move needed sentences to one forward. newly has the copy of divided sentence
- CStart := Czesci[0].Akt;
+ CStart := Lines[0].Akt;
for C := CLen-1 downto CStart do
- Czesci[0].Czesc[C+1] := Czesci[0].Czesc[C];
+ Lines[0].Line[C+1] := Lines[0].Line[C];
// clear and set new sentence
CNew := CStart + 1;
NStart := AktNuta;
- Czesci[0].Czesc[CNew].Start := Czesci[0].Czesc[CStart].Nuta[NStart].Start;
- Czesci[0].Czesc[CNew].StartNote := Czesci[0].Czesc[CStart].Nuta[NStart].Start;
- Czesci[0].Czesc[CNew].Lyric := '';
- Czesci[0].Czesc[CNew].LyricWidth := 0;
- Czesci[0].Czesc[CNew].Koniec := 0;
- Czesci[0].Czesc[CNew].BaseNote := 0; // 0.5.0: we modify it later in this procedure
- Czesci[0].Czesc[CNew].IlNut := 0;
- Czesci[0].Czesc[CNew].HighNut := -1;
- SetLength(Czesci[0].Czesc[CNew].Nuta, 0);
+ Lines[0].Line[CNew].Start := Lines[0].Line[CStart].Note[NStart].Start;
+ Lines[0].Line[CNew].StartNote := Lines[0].Line[CStart].Note[NStart].Start;
+ Lines[0].Line[CNew].Lyric := '';
+ Lines[0].Line[CNew].LyricWidth := 0;
+ Lines[0].Line[CNew].Koniec := 0;
+ Lines[0].Line[CNew].BaseNote := 0; // 0.5.0: we modify it later in this procedure
+ Lines[0].Line[CNew].IlNut := 0;
+ Lines[0].Line[CNew].HighNote := -1;
+ SetLength(Lines[0].Line[CNew].Note, 0);
// move right notes to new sentences
- NHigh := Czesci[0].Czesc[CStart].HighNut;
+ NHigh := Lines[0].Line[CStart].HighNote;
for N := NStart to NHigh do begin
- NNewL := Czesci[0].Czesc[CNew].IlNut;
- SetLength(Czesci[0].Czesc[CNew].Nuta, NNewL + 1);
- Czesci[0].Czesc[CNew].Nuta[NNewL] := Czesci[0].Czesc[CStart].Nuta[N];
+ NNewL := Lines[0].Line[CNew].IlNut;
+ SetLength(Lines[0].Line[CNew].Note, NNewL + 1);
+ Lines[0].Line[CNew].Note[NNewL] := Lines[0].Line[CStart].Note[N];
// increase sentence counters
- Inc(Czesci[0].Czesc[CNew].IlNut);
- Inc(Czesci[0].Czesc[CNew].HighNut);
- Czesci[0].Czesc[CNew].Koniec := Czesci[0].Czesc[CNew].Nuta[NNewL].Start +
- Czesci[0].Czesc[CNew].Nuta[NNewL].Dlugosc;
+ Inc(Lines[0].Line[CNew].IlNut);
+ Inc(Lines[0].Line[CNew].HighNote);
+ Lines[0].Line[CNew].Koniec := Lines[0].Line[CNew].Note[NNewL].Start +
+ Lines[0].Line[CNew].Note[NNewL].Dlugosc;
end;
// clear old notes and set sentence counters
- Czesci[0].Czesc[CStart].HighNut := NStart - 1;
- Czesci[0].Czesc[CStart].IlNut := Czesci[0].Czesc[CStart].HighNut + 1;
- Czesci[0].Czesc[CStart].Koniec := Czesci[0].Czesc[CStart].Nuta[NStart-1].Start +
- Czesci[0].Czesc[CStart].Nuta[NStart-1].Dlugosc;
- SetLength(Czesci[0].Czesc[CStart].Nuta, Czesci[0].Czesc[CStart].IlNut);
+ Lines[0].Line[CStart].HighNote := NStart - 1;
+ Lines[0].Line[CStart].IlNut := Lines[0].Line[CStart].HighNote + 1;
+ Lines[0].Line[CStart].Koniec := Lines[0].Line[CStart].Note[NStart-1].Start +
+ Lines[0].Line[CStart].Note[NStart-1].Dlugosc;
+ SetLength(Lines[0].Line[CStart].Note, Lines[0].Line[CStart].IlNut);
// 0.5.0: modify BaseNote
- Czesci[0].Czesc[CNew].BaseNote := 120;
- for N := 0 to Czesci[0].Czesc[CNew].IlNut do
- if Czesci[0].Czesc[CNew].Nuta[N].Ton < Czesci[0].Czesc[CNew].BaseNote then
- Czesci[0].Czesc[CNew].BaseNote := Czesci[0].Czesc[CNew].Nuta[N].Ton;
+ Lines[0].Line[CNew].BaseNote := 120;
+ for N := 0 to Lines[0].Line[CNew].IlNut do
+ if Lines[0].Line[CNew].Note[N].Ton < Lines[0].Line[CNew].BaseNote then
+ Lines[0].Line[CNew].BaseNote := Lines[0].Line[CNew].Note[N].Ton;
- Czesci[0].Akt := Czesci[0].Akt + 1;
+ Lines[0].Akt := Lines[0].Akt + 1;
AktNuta := 0;
- Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Color := 1;
- Lyric.AddCzesc(Czesci[0].Akt);
+ Lines[0].Line[Lines[0].Akt].Note[AktNuta].Color := 1;
+ Lyric.AddCzesc(Lines[0].Akt);
end;
@@ -852,33 +852,33 @@ var
NStart: integer;
NDst: integer;
begin
- C := Czesci[0].Akt;
+ C := Lines[0].Akt;
// set new sentence
- NStart := Czesci[0].Czesc[C].IlNut;
- Czesci[0].Czesc[C].IlNut := Czesci[0].Czesc[C].IlNut + Czesci[0].Czesc[C+1].IlNut;
- Czesci[0].Czesc[C].HighNut := Czesci[0].Czesc[C].HighNut + Czesci[0].Czesc[C+1].IlNut;
- SetLength(Czesci[0].Czesc[C].Nuta, Czesci[0].Czesc[C].IlNut);
+ NStart := Lines[0].Line[C].IlNut;
+ Lines[0].Line[C].IlNut := Lines[0].Line[C].IlNut + Lines[0].Line[C+1].IlNut;
+ Lines[0].Line[C].HighNote := Lines[0].Line[C].HighNote + Lines[0].Line[C+1].IlNut;
+ SetLength(Lines[0].Line[C].Note, Lines[0].Line[C].IlNut);
// move right notes to new sentences
- for N := 0 to Czesci[0].Czesc[C+1].HighNut do begin
+ for N := 0 to Lines[0].Line[C+1].HighNote do begin
NDst := NStart + N;
- Czesci[0].Czesc[C].Nuta[NDst] := Czesci[0].Czesc[C+1].Nuta[N];
+ Lines[0].Line[C].Note[NDst] := Lines[0].Line[C+1].Note[N];
end;
// increase sentence counters
- NDst := Czesci[0].Czesc[C].HighNut;
- Czesci[0].Czesc[C].Koniec := Czesci[0].Czesc[C].Nuta[NDst].Start +
- Czesci[0].Czesc[C].Nuta[NDst].Dlugosc;
+ NDst := Lines[0].Line[C].HighNote;
+ Lines[0].Line[C].Koniec := Lines[0].Line[C].Note[NDst].Start +
+ Lines[0].Line[C].Note[NDst].Dlugosc;
// move needed sentences to one backward.
- for C := Czesci[0].Akt + 1 to Czesci[0].High - 1 do
- Czesci[0].Czesc[C] := Czesci[0].Czesc[C+1];
+ for C := Lines[0].Akt + 1 to Lines[0].High - 1 do
+ Lines[0].Line[C] := Lines[0].Line[C+1];
// increase sentence length by 1
- SetLength(Czesci[0].Czesc, Length(Czesci[0].Czesc) - 1);
- Dec(Czesci[0].Ilosc);
- Dec(Czesci[0].High);
+ SetLength(Lines[0].Line, Length(Lines[0].Line) - 1);
+ Dec(Lines[0].Ilosc);
+ Dec(Lines[0].High);
end;
procedure TScreenEditSub.DivideNote;
@@ -887,24 +887,24 @@ var
N: integer;
NLen: integer;
begin
- C := Czesci[0].Akt;
+ C := Lines[0].Akt;
- NLen := Czesci[0].Czesc[C].IlNut + 1;
- SetLength(Czesci[0].Czesc[C].Nuta, NLen);
- Inc(Czesci[0].Czesc[C].HighNut);
- Inc(Czesci[0].Czesc[C].IlNut);
+ NLen := Lines[0].Line[C].IlNut + 1;
+ SetLength(Lines[0].Line[C].Note, NLen);
+ Inc(Lines[0].Line[C].HighNote);
+ Inc(Lines[0].Line[C].IlNut);
// we copy all notes including selected one
- for N := Czesci[0].Czesc[C].HighNut downto AktNuta+1 do begin
- Czesci[0].Czesc[C].Nuta[N] := Czesci[0].Czesc[C].Nuta[N-1];
+ for N := Lines[0].Line[C].HighNote downto AktNuta+1 do begin
+ Lines[0].Line[C].Note[N] := Lines[0].Line[C].Note[N-1];
end;
// me slightly modify new note
- Czesci[0].Czesc[C].Nuta[AktNuta].Dlugosc := 1;
- Inc(Czesci[0].Czesc[C].Nuta[AktNuta+1].Start);
- Dec(Czesci[0].Czesc[C].Nuta[AktNuta+1].Dlugosc);
- Czesci[0].Czesc[C].Nuta[AktNuta+1].Tekst := '- ';
- Czesci[0].Czesc[C].Nuta[AktNuta+1].Color := 0;
+ Lines[0].Line[C].Note[AktNuta].Dlugosc := 1;
+ Inc(Lines[0].Line[C].Note[AktNuta+1].Start);
+ Dec(Lines[0].Line[C].Note[AktNuta+1].Dlugosc);
+ Lines[0].Line[C].Note[AktNuta+1].Tekst := '- ';
+ Lines[0].Line[C].Note[AktNuta+1].Color := 0;
end;
procedure TScreenEditSub.DeleteNote;
@@ -913,56 +913,56 @@ var
N: integer;
NLen: integer;
begin
- C := Czesci[0].Akt;
+ C := Lines[0].Akt;
//Do Not delete Last Note
- if (Czesci[0].High > 0) OR (Czesci[0].Czesc[C].HighNut > 0) then
+ if (Lines[0].High > 0) OR (Lines[0].Line[C].HighNote > 0) then
begin
// we copy all notes from the next to the selected one
- for N := AktNuta+1 to Czesci[0].Czesc[C].HighNut do begin
- Czesci[0].Czesc[C].Nuta[N-1] := Czesci[0].Czesc[C].Nuta[N];
+ for N := AktNuta+1 to Lines[0].Line[C].HighNote do begin
+ Lines[0].Line[C].Note[N-1] := Lines[0].Line[C].Note[N];
end;
- NLen := Czesci[0].Czesc[C].IlNut - 1;
+ NLen := Lines[0].Line[C].IlNut - 1;
if (NLen > 0) then
begin
- SetLength(Czesci[0].Czesc[C].Nuta, NLen);
- Dec(Czesci[0].Czesc[C].HighNut);
- Dec(Czesci[0].Czesc[C].IlNut);
+ SetLength(Lines[0].Line[C].Note, NLen);
+ Dec(Lines[0].Line[C].HighNote);
+ Dec(Lines[0].Line[C].IlNut);
// me slightly modify new note
- if AktNuta > Czesci[0].Czesc[C].HighNut then Dec(AktNuta);
- Czesci[0].Czesc[C].Nuta[AktNuta].Color := 1;
+ if AktNuta > Lines[0].Line[C].HighNote then Dec(AktNuta);
+ Lines[0].Line[C].Note[AktNuta].Color := 1;
end
//Last Note of current Sentence Deleted - > Delete Sentence
else
begin
//Move all Sentences after the current to the Left
- for N := C+1 to Czesci[0].High do
- Czesci[0].Czesc[N-1] := Czesci[0].Czesc[N];
+ for N := C+1 to Lines[0].High do
+ Lines[0].Line[N-1] := Lines[0].Line[N];
//Delete Last Sentence
- SetLength(Czesci[0].Czesc, Czesci[0].High);
- Czesci[0].High := High(Czesci[0].Czesc);
- Czesci[0].Ilosc := Length(Czesci[0].Czesc);
+ SetLength(Lines[0].Line, Lines[0].High);
+ Lines[0].High := High(Lines[0].Line);
+ Lines[0].Ilosc := Length(Lines[0].Line);
AktNuta := 0;
if (C > 0) then
- Czesci[0].Akt := C - 1
+ Lines[0].Akt := C - 1
else
- Czesci[0].Akt := 0;
+ Lines[0].Akt := 0;
- Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Color := 1;
+ Lines[0].Line[Lines[0].Akt].Note[AktNuta].Color := 1;
end;
end;
end;
procedure TScreenEditSub.TransposeNote(Transpose: integer);
begin
- Inc(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Ton, Transpose);
+ Inc(Lines[0].Line[Lines[0].Akt].Note[AktNuta].Ton, Transpose);
end;
procedure TScreenEditSub.ChangeWholeTone(Tone: integer);
@@ -970,10 +970,10 @@ var
C: integer;
N: integer;
begin
- for C := 0 to Czesci[0].High do begin
- Czesci[0].Czesc[C].BaseNote := Czesci[0].Czesc[C].BaseNote + Tone;
- for N := 0 to Czesci[0].Czesc[C].HighNut do
- Czesci[0].Czesc[C].Nuta[N].Ton := Czesci[0].Czesc[C].Nuta[N].Ton + Tone;
+ for C := 0 to Lines[0].High do begin
+ Lines[0].Line[C].BaseNote := Lines[0].Line[C].BaseNote + Tone;
+ for N := 0 to Lines[0].Line[C].HighNote do
+ Lines[0].Line[C].Note[N].Ton := Lines[0].Line[C].Note[N].Ton + Tone;
end;
end;
@@ -983,19 +983,19 @@ var
N: integer;
NStart: integer;
begin
- for C := Czesci[0].Akt to Czesci[0].High do begin
+ for C := Lines[0].Akt to Lines[0].High do begin
NStart := 0;
- if C = Czesci[0].Akt then NStart := AktNuta;
- for N := NStart to Czesci[0].Czesc[C].HighNut do begin
- Inc(Czesci[0].Czesc[C].Nuta[N].Start, Move); // move note start
+ if C = Lines[0].Akt then NStart := AktNuta;
+ for N := NStart to Lines[0].Line[C].HighNote do begin
+ Inc(Lines[0].Line[C].Note[N].Start, Move); // move note start
if N = 0 then begin // fix beginning
- Inc(Czesci[0].Czesc[C].Start, Move);
- Inc(Czesci[0].Czesc[C].StartNote, Move);
+ Inc(Lines[0].Line[C].Start, Move);
+ Inc(Lines[0].Line[C].StartNote, Move);
end;
- if N = Czesci[0].Czesc[C].HighNut then // fix ending
- Inc(Czesci[0].Czesc[C].Koniec, Move);
+ if N = Lines[0].Line[C].HighNote then // fix ending
+ Inc(Lines[0].Line[C].Koniec, Move);
end; // for
end; // for
@@ -1007,30 +1007,30 @@ var
N: integer;
NHigh: integer;
begin
-{ C := Czesci[0].Akt;
+{ C := Lines[0].Akt;
- for N := Czesci[0].Czesc[C].HighNut downto 1 do begin
- Czesci[0].Czesc[C].Nuta[N].Tekst := Czesci[0].Czesc[C].Nuta[N-1].Tekst;
+ for N := Lines[0].Line[C].HighNut downto 1 do begin
+ Lines[0].Line[C].Note[N].Tekst := Lines[0].Line[C].Note[N-1].Tekst;
end; // for
- Czesci[0].Czesc[C].Nuta[0].Tekst := '- ';}
+ Lines[0].Line[C].Note[0].Tekst := '- ';}
- C := Czesci[0].Akt;
- NHigh := Czesci[0].Czesc[C].HighNut;
+ C := Lines[0].Akt;
+ NHigh := Lines[0].Line[C].HighNote;
// last word
- Czesci[0].Czesc[C].Nuta[NHigh].Tekst := Czesci[0].Czesc[C].Nuta[NHigh-1].Tekst + Czesci[0].Czesc[C].Nuta[NHigh].Tekst;
+ Lines[0].Line[C].Note[NHigh].Tekst := Lines[0].Line[C].Note[NHigh-1].Tekst + Lines[0].Line[C].Note[NHigh].Tekst;
// other words
for N := NHigh - 1 downto AktNuta + 1 do begin
- Czesci[0].Czesc[C].Nuta[N].Tekst := Czesci[0].Czesc[C].Nuta[N-1].Tekst;
+ Lines[0].Line[C].Note[N].Tekst := Lines[0].Line[C].Note[N-1].Tekst;
end; // for
- Czesci[0].Czesc[C].Nuta[AktNuta].Tekst := '- ';
+ Lines[0].Line[C].Note[AktNuta].Tekst := '- ';
end;
procedure TScreenEditSub.MarkSrc;
begin
- CopySrc := Czesci[0].Akt;
+ CopySrc := Lines[0].Akt;
end;
procedure TScreenEditSub.PasteText;
@@ -1038,10 +1038,10 @@ var
C: integer;
N: integer;
begin
- C := Czesci[0].Akt;
+ C := Lines[0].Akt;
- for N := 0 to Czesci[0].Czesc[CopySrc].HighNut do
- Czesci[0].Czesc[C].Nuta[N].Tekst := Czesci[0].Czesc[CopySrc].Nuta[N].Tekst;
+ for N := 0 to Lines[0].Line[CopySrc].HighNote do
+ Lines[0].Line[C].Note[N].Tekst := Lines[0].Line[CopySrc].Note[N].Tekst;
end;
procedure TScreenEditSub.CopySentence(Src, Dst: integer);
@@ -1051,21 +1051,21 @@ var
Time2: integer;
TD: integer;
begin
- Time1 := Czesci[0].Czesc[Src].Nuta[0].Start;
- Time2 := Czesci[0].Czesc[Dst].Nuta[0].Start;
+ Time1 := Lines[0].Line[Src].Note[0].Start;
+ Time2 := Lines[0].Line[Dst].Note[0].Start;
TD := Time2-Time1;
- SetLength(Czesci[0].Czesc[Dst].Nuta, Czesci[0].Czesc[Src].IlNut);
- Czesci[0].Czesc[Dst].IlNut := Czesci[0].Czesc[Src].IlNut;
- Czesci[0].Czesc[Dst].HighNut := Czesci[0].Czesc[Src].HighNut;
- for N := 0 to Czesci[0].Czesc[Src].HighNut do begin
- Czesci[0].Czesc[Dst].Nuta[N].Tekst := Czesci[0].Czesc[Src].Nuta[N].Tekst;
- Czesci[0].Czesc[Dst].Nuta[N].Dlugosc := Czesci[0].Czesc[Src].Nuta[N].Dlugosc;
- Czesci[0].Czesc[Dst].Nuta[N].Ton := Czesci[0].Czesc[Src].Nuta[N].Ton;
- Czesci[0].Czesc[Dst].Nuta[N].Start := Czesci[0].Czesc[Src].Nuta[N].Start + TD;
+ SetLength(Lines[0].Line[Dst].Note, Lines[0].Line[Src].IlNut);
+ Lines[0].Line[Dst].IlNut := Lines[0].Line[Src].IlNut;
+ Lines[0].Line[Dst].HighNote := Lines[0].Line[Src].HighNote;
+ for N := 0 to Lines[0].Line[Src].HighNote do begin
+ Lines[0].Line[Dst].Note[N].Tekst := Lines[0].Line[Src].Note[N].Tekst;
+ Lines[0].Line[Dst].Note[N].Dlugosc := Lines[0].Line[Src].Note[N].Dlugosc;
+ Lines[0].Line[Dst].Note[N].Ton := Lines[0].Line[Src].Note[N].Ton;
+ Lines[0].Line[Dst].Note[N].Start := Lines[0].Line[Src].Note[N].Start + TD;
end;
- N := Czesci[0].Czesc[Src].HighNut;
- Czesci[0].Czesc[Dst].Koniec := Czesci[0].Czesc[Dst].Nuta[N].Start + Czesci[0].Czesc[Dst].Nuta[N].Dlugosc;
+ N := Lines[0].Line[Src].HighNote;
+ Lines[0].Line[Dst].Koniec := Lines[0].Line[Dst].Note[N].Start + Lines[0].Line[Dst].Note[N].Dlugosc;
end;
procedure TScreenEditSub.CopySentences(Src, Dst, Num: integer);
@@ -1076,29 +1076,29 @@ begin
// create place for new sentences
- SetLength(Czesci[0].Czesc, Czesci[0].Ilosc + Num - 1);
+ SetLength(Lines[0].Line, Lines[0].Ilosc + Num - 1);
// moves sentences next to the destination
- for C := Czesci[0].High downto Dst + 1 do begin
- Czesci[0].Czesc[C + Num - 1] := Czesci[0].Czesc[C];
+ for C := Lines[0].High downto Dst + 1 do begin
+ Lines[0].Line[C + Num - 1] := Lines[0].Line[C];
end;
// prepares new sentences: sets sentence start and create first note
for C := 1 to Num-1 do begin
- Czesci[0].Czesc[Dst + C].Start := Czesci[0].Czesc[Dst + C - 1].StartNote +
- (Czesci[0].Czesc[Src + C].StartNote - Czesci[0].Czesc[Src + C - 1].StartNote);
- SetLength(Czesci[0].Czesc[Dst + C].Nuta, 1);
- Czesci[0].Czesc[Dst + C].IlNut := 1;
- Czesci[0].Czesc[Dst + C].HighNut := 0;
- Czesci[0].Czesc[Dst + C].Nuta[0].Start := Czesci[0].Czesc[Dst + C].Start;
- Czesci[0].Czesc[Dst + C].Nuta[0].Dlugosc := 1;
- Czesci[0].Czesc[Dst + C].StartNote := Czesci[0].Czesc[Dst + C].Start;
- Czesci[0].Czesc[Dst + C].Koniec := Czesci[0].Czesc[Dst + C].Start + 1;
+ Lines[0].Line[Dst + C].Start := Lines[0].Line[Dst + C - 1].StartNote +
+ (Lines[0].Line[Src + C].StartNote - Lines[0].Line[Src + C - 1].StartNote);
+ SetLength(Lines[0].Line[Dst + C].Note, 1);
+ Lines[0].Line[Dst + C].IlNut := 1;
+ Lines[0].Line[Dst + C].HighNote := 0;
+ Lines[0].Line[Dst + C].Note[0].Start := Lines[0].Line[Dst + C].Start;
+ Lines[0].Line[Dst + C].Note[0].Dlugosc := 1;
+ Lines[0].Line[Dst + C].StartNote := Lines[0].Line[Dst + C].Start;
+ Lines[0].Line[Dst + C].Koniec := Lines[0].Line[Dst + C].Start + 1;
end;
// increase counters
- Czesci[0].Ilosc := Czesci[0].Ilosc + Num - 1;
- Czesci[0].High := Czesci[0].High + Num - 1;
+ Lines[0].Ilosc := Lines[0].Ilosc + Num - 1;
+ Lines[0].High := Lines[0].High + Num - 1;
for C := 0 to Num-1 do
CopySentence(Src + C, Dst + C);
@@ -1115,7 +1115,7 @@ begin
AddText(40, 17, 1, 6, 1, 1, 1, 'Line');
TextSentence := AddText(120, 14, 1, 8, 0, 0, 0, '0 / 0');
- // nuta
+ // Note
AddStatic(220, 10, 80, 30, 0, 0, 0, Skin.GetTextureFileName('ButtonF'), 'JPG', 'Font Black');
AddText(242, 17, 1, 6, 1, 1, 1, 'Note');
TextNote := AddText(320, 14, 1, 8, 0, 0, 0, '0 / 0');
@@ -1190,9 +1190,9 @@ begin
Text[TextArtist].Text := CurrentSong.Artist;
Text[TextMp3].Text := CurrentSong.Mp3;
- Czesci[0].Akt := 0;
+ Lines[0].Akt := 0;
AktNuta := 0;
- Czesci[0].Czesc[0].Nuta[0].Color := 1;
+ Lines[0].Line[0].Note[0].Color := 1;
AudioPlayback.Open(CurrentSong.Path + CurrentSong.Mp3);
//Set Down Music Volume for Better hearability of Midi Sounds
@@ -1239,7 +1239,7 @@ begin
{$IFDEF UseMIDIPort}
// stop the music
if (MidiPos > MidiStop) then begin
- MidiOut.PutShort($81, Czesci[0].Czesc[Czesci[0].Akt].Nuta[MidiLastNote].Ton + 60, 127);
+ MidiOut.PutShort($81, Lines[0].Line[Lines[0].Akt].Note[MidiLastNote].Ton + 60, 127);
PlaySentenceMidi := false;
end;
{$ENDIF}
@@ -1249,15 +1249,15 @@ begin
Text[TextDebug].Text := IntToStr(AktBeat);
if AktBeat <> LastClick then begin
- for Pet := 0 to Czesci[0].Czesc[Czesci[0].Akt].HighNut do
- if (Czesci[0].Czesc[Czesci[0].Akt].Nuta[Pet].Start = AktBeat) then
+ for Pet := 0 to Lines[0].Line[Lines[0].Akt].HighNote do
+ if (Lines[0].Line[Lines[0].Akt].Note[Pet].Start = AktBeat) then
begin
{$IFDEF UseMIDIPort}
LastClick := AktBeat;
if Pet > 0 then
- MidiOut.PutShort($81, Czesci[0].Czesc[Czesci[0].Akt].Nuta[Pet-1].Ton + 60, 127);
- MidiOut.PutShort($91, Czesci[0].Czesc[Czesci[0].Akt].Nuta[Pet].Ton + 60, 127);
+ MidiOut.PutShort($81, Lines[0].Line[Lines[0].Akt].Note[Pet-1].Ton + 60, 127);
+ MidiOut.PutShort($91, Lines[0].Line[Lines[0].Akt].Note[Pet].Ton + 60, 127);
MidiLastNote := Pet;
{$ENDIF}
@@ -1280,8 +1280,8 @@ begin
AktBeat := Floor(GetMidBeat(AudioPlayback.Position - CurrentSong.GAP / 1000));
Text[TextDebug].Text := IntToStr(AktBeat);
if AktBeat <> LastClick then begin
- for Pet := 0 to Czesci[0].Czesc[Czesci[0].Akt].HighNut do
- if (Czesci[0].Czesc[Czesci[0].Akt].Nuta[Pet].Start = AktBeat) then
+ for Pet := 0 to Lines[0].Line[Lines[0].Akt].HighNote do
+ if (Lines[0].Line[Lines[0].Akt].Note[Pet].Start = AktBeat) then
begin
AudioPlayback.PlaySound( SoundLib.Click );
LastClick := AktBeat;
@@ -1291,8 +1291,8 @@ begin
end; // if PlaySentence
- Text[TextSentence].Text := IntToStr(Czesci[0].Akt + 1) + ' / ' + IntToStr(Czesci[0].Ilosc);
- Text[TextNote].Text := IntToStr(AktNuta + 1) + ' / ' + IntToStr(Czesci[0].Czesc[Czesci[0].Akt].IlNut);
+ Text[TextSentence].Text := IntToStr(Lines[0].Akt + 1) + ' / ' + IntToStr(Lines[0].Ilosc);
+ Text[TextNote].Text := IntToStr(AktNuta + 1) + ' / ' + IntToStr(Lines[0].Line[Lines[0].Akt].IlNut);
// Song info
Text[TextBPM].Text := FloatToStr(CurrentSong.BPM[0].BPM / 4);
@@ -1302,10 +1302,10 @@ begin
if not Error then
begin
// Note info
- Text[TextNStart].Text := IntToStr(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Start);
- Text[TextNDlugosc].Text := IntToStr(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Dlugosc);
- Text[TextNTon].Text := IntToStr(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Ton) + ' ( ' + GetNoteName(Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Ton) + ' )';
- Text[TextNText].Text := Czesci[0].Czesc[Czesci[0].Akt].Nuta[AktNuta].Tekst;
+ Text[TextNStart].Text := IntToStr(Lines[0].Line[Lines[0].Akt].Note[AktNuta].Start);
+ Text[TextNDlugosc].Text := IntToStr(Lines[0].Line[Lines[0].Akt].Note[AktNuta].Dlugosc);
+ Text[TextNTon].Text := IntToStr(Lines[0].Line[Lines[0].Akt].Note[AktNuta].Ton) + ' ( ' + GetNoteName(Lines[0].Line[Lines[0].Akt].Note[AktNuta].Ton) + ' )';
+ Text[TextNText].Text := Lines[0].Line[Lines[0].Akt].Note[AktNuta].Tekst;
end;
// Text Edit Mode
diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas
index 2de44e19..f56b15df 100644
--- a/Game/Code/Screens/UScreenSing.pas
+++ b/Game/Code/Screens/UScreenSing.pas
@@ -634,8 +634,8 @@ begin
end; // case
// Add Lines to Lyrics
- While (not Lyrics.LineinQueue) AND (Lyrics.LineCounter <= High(Czesci[0].Czesc)) do
- Lyrics.AddLine(@Czesci[0].Czesc[Lyrics.LineCounter]);
+ While (not Lyrics.LineinQueue) AND (Lyrics.LineCounter <= High(Lines[0].Line)) do
+ Lyrics.AddLine(@Lines[0].Line[Lyrics.LineCounter]);
UpdateLCD;
@@ -883,8 +883,8 @@ begin
//Set Position of Line Bonus - PhrasenBonus End
//Set Num of Empty Sentences for Phrasen Bonus
NumEmptySentences := 0;
- for P := low(Czesci[0].Czesc) to high(Czesci[0].Czesc) do
- if Czesci[0].Czesc[P].TotalNotes = 0 then Inc(NumEmptySentences);
+ for P := low(Lines[0].Line) to high(Lines[0].Line) do
+ if Lines[0].Line[P].TotalNotes = 0 then Inc(NumEmptySentences);
Log.LogStatus('End', 'onShow');
end;
@@ -1311,7 +1311,7 @@ B: integer; //Max Points for Notes
begin
//Check for Empty Sentence
- if (Czesci[0].Czesc[S].TotalNotes<=0) then
+ if (Lines[0].Line[S].TotalNotes<=0) then
exit;
//Set Max Note Points
@@ -1327,12 +1327,12 @@ begin
//PhrasenBonus - Line Bonus Mod
//Generate Steps 0 to 8
- A := Floor(A / (B * Czesci[0].Czesc[S].TotalNotes / Czesci[0].Wartosc) * 8);
+ A := Floor(A / (B * Lines[0].Line[S].TotalNotes / Lines[0].Wartosc) * 8);
If (Ini.LineBonus > 0) then
begin
//PhrasenBonus give Points
- Player[I].ScoreLine := Player[I].ScoreLine + (1000 / (Length(Czesci[0].Czesc) - NumEmptySentences) * A / 8);
+ Player[I].ScoreLine := Player[I].ScoreLine + (1000 / (Length(Lines[0].Line) - NumEmptySentences) * A / 8);
Player[I].ScoreLineI := Round(Player[I].ScoreLine / 10) * 10;
//Update Total Score
Player[I].ScoreTotalI := Player[I].ScoreI + Player[I].ScoreGoldenI + Player[I].ScoreLineI;
@@ -1377,9 +1377,9 @@ procedure TScreenSing.onSentenceChange(S: Cardinal);
begin
//GoldenStarsTwinkle Mod
GoldenRec.SentenceChange;
- if (Lyrics.LineCounter <= High(Czesci[0].Czesc)) then
+ if (Lyrics.LineCounter <= High(Lines[0].Line)) then
begin
- Lyrics.AddLine(@Czesci[0].Czesc[Lyrics.LineCounter]);
+ Lyrics.AddLine(@Lines[0].Line[Lyrics.LineCounter]);
// addline uses display memory
// calling draw makes sure, there's the singscreen in it, when the next
// swap between onscreen and offscreen buffers is done
diff --git a/Game/Code/Screens/UScreenSingModi.pas b/Game/Code/Screens/UScreenSingModi.pas
index 9e48a9a7..05675011 100644
--- a/Game/Code/Screens/UScreenSingModi.pas
+++ b/Game/Code/Screens/UScreenSingModi.pas
@@ -93,7 +93,7 @@ function LoadSound (const Name: PChar): Cardinal; stdcall; //Procedure th
procedure PlaySound (const Index: Cardinal); stdcall; //Plays a Custom Sound
//Utilys
-function ToSentences(Const Czeski: TCzesci): TSentences;
+function ToSentences(Const Lines: TLines): TSentences;
implementation
uses UGraphic, UDraw, UMain, Classes, URecord, ULanguage, math, UDLLManager, USkins, UGraphicClasses;
@@ -127,41 +127,41 @@ begin
end;
-function ToSentences(Const Czeski: TCzesci): TSentences;
+function ToSentences(Const Lines: TLines): TSentences;
var
I, J: Integer;
begin
- Result.Akt := Czeski.Akt;
- Result.High := Czeski.High;
- Result.Ilosc := Czeski.Ilosc;
- Result.Resolution := Czeski.Resolution;
- Result.NotesGAP := Czeski.NotesGAP;
- Result.TotalLength := Czeski.Wartosc;
-
- SetLength(Result.Sentence, Length(Czeski.Czesc));
+ Result.Akt := Lines.Akt;
+ Result.High := Lines.High;
+ Result.Ilosc := Lines.Ilosc;
+ Result.Resolution := Lines.Resolution;
+ Result.NotesGAP := Lines.NotesGAP;
+ Result.TotalLength := Lines.Wartosc;
+
+ SetLength(Result.Sentence, Length(Lines.Line));
for I := low(Result.Sentence) to high(Result.Sentence) do
begin
- Result.Sentence[I].Start := Czeski.Czesc[I].Start;
- Result.Sentence[I].StartNote := Czeski.Czesc[I].StartNote;
- Result.Sentence[I].Lyric := Czeski.Czesc[I].Lyric;
- Result.Sentence[I].LyricWidth := Czeski.Czesc[I].LyricWidth;
- Result.Sentence[I].Koniec := Czeski.Czesc[I].Koniec;
- Result.Sentence[I].BaseNote := Czeski.Czesc[I].BaseNote;
- Result.Sentence[I].HighNote := Czeski.Czesc[I].HighNut;
- Result.Sentence[I].IlNut := Czeski.Czesc[I].IlNut;
- Result.Sentence[I].TotalNotes := Czeski.Czesc[I].TotalNotes;
-
- SetLength(Result.Sentence[I].Note, Length(Czeski.Czesc[I].Nuta));
+ Result.Sentence[I].Start := Lines.Line[I].Start;
+ Result.Sentence[I].StartNote := Lines.Line[I].StartNote;
+ Result.Sentence[I].Lyric := Lines.Line[I].Lyric;
+ Result.Sentence[I].LyricWidth := Lines.Line[I].LyricWidth;
+ Result.Sentence[I].Koniec := Lines.Line[I].Koniec;
+ Result.Sentence[I].BaseNote := Lines.Line[I].BaseNote;
+ Result.Sentence[I].HighNote := Lines.Line[I].HighNote;
+ Result.Sentence[I].IlNut := Lines.Line[I].IlNut;
+ Result.Sentence[I].TotalNotes := Lines.Line[I].TotalNotes;
+
+ SetLength(Result.Sentence[I].Note, Length(Lines.Line[I].Note));
for J := low(Result.Sentence[I].Note) to high(Result.Sentence[I].Note) do
begin
- Result.Sentence[I].Note[J].Color := Czeski.Czesc[I].Nuta[J].Color;
- Result.Sentence[I].Note[J].Start := Czeski.Czesc[I].Nuta[J].Start;
- Result.Sentence[I].Note[J].Length := Czeski.Czesc[I].Nuta[J].Dlugosc;
- Result.Sentence[I].Note[J].Ton := Czeski.Czesc[I].Nuta[J].Ton;
- Result.Sentence[I].Note[J].TonGamy := Czeski.Czesc[I].Nuta[J].TonGamy;
- //Result.Sentence[I].Note[J].Text := Czeski.Czesc[I].Nuta[J].Tekst;
- Result.Sentence[I].Note[J].FreeStyle := Czeski.Czesc[I].Nuta[J].FreeStyle;
- Result.Sentence[I].Note[J].Typ := Czeski.Czesc[I].Nuta[J].Wartosc;
+ Result.Sentence[I].Note[J].Color := Lines.Line[I].Note[J].Color;
+ Result.Sentence[I].Note[J].Start := Lines.Line[I].Note[J].Start;
+ Result.Sentence[I].Note[J].Length := Lines.Line[I].Note[J].Dlugosc;
+ Result.Sentence[I].Note[J].Ton := Lines.Line[I].Note[J].Ton;
+ Result.Sentence[I].Note[J].TonGamy := Lines.Line[I].Note[J].TonGamy;
+ //Result.Sentence[I].Note[J].Text := Lines.Line[I].Note[J].Tekst;
+ Result.Sentence[I].Note[J].FreeStyle := Lines.Line[I].Note[J].FreeStyle;
+ Result.Sentence[I].Note[J].Typ := Lines.Line[I].Note[J].Wartosc;
end;
end;
end;
@@ -236,7 +236,7 @@ begin
//Music.MoveTo(AktSong.Start);
//Init Plugin
- if not DLLMan.PluginInit(TeamInfo, PlayerInfo, ToSentences(Czesci[0]), LoadTex, Print, LoadSound, PlaySound) then
+ if not DLLMan.PluginInit(TeamInfo, PlayerInfo, ToSentences(Lines[0]), LoadTex, Print, LoadSound, PlaySound) then
begin
//Fehler
Log.LogError('Could not Init Plugin');
@@ -574,7 +574,7 @@ end;
if ((ShowFinish) AND (NOT Paused)) then
begin
- if not DLLMan.PluginDraw(Playerinfo, Czesci[0].Akt) then
+ if not DLLMan.PluginDraw(Playerinfo, Lines[0].Akt) then
begin
if not FadeOut then begin
Finish;