diff options
author | f1fth_freed0m <f1fth_freed0m@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-03-06 02:16:07 +0000 |
---|---|---|
committer | f1fth_freed0m <f1fth_freed0m@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-03-06 02:16:07 +0000 |
commit | 36e04782552fde9e26710f29f453d574b2ee9c0b (patch) | |
tree | e9f4bde9473a3e9bcef594f335816236f496f7cf /Game/Code/Classes | |
parent | e80ec1918ada3406d9e7cdd6a27b259dfa3bfc3d (diff) | |
download | usdx-36e04782552fde9e26710f29f453d574b2ee9c0b.tar.gz usdx-36e04782552fde9e26710f29f453d574b2ee9c0b.tar.xz usdx-36e04782552fde9e26710f29f453d574b2ee9c0b.zip |
Translated Some Variables
TonGamy to ToneGamus
DlugoscNut to NoteLenght
Akt to Current
AktBeat to CurrentBeat
AktBeatD to CurrentBeatD
AktBeatC to CurrentBeatC
OldCzesc to OldLine
Teraz to CurrentTime
Razem to TotalTime
TCzas to TLineState
Czas to LineState
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@916 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r-- | Game/Code/Classes/UDraw.pas | 90 | ||||
-rw-r--r-- | Game/Code/Classes/UFiles.pas | 2 | ||||
-rw-r--r-- | Game/Code/Classes/UMain.pas | 132 | ||||
-rw-r--r-- | Game/Code/Classes/UMusic.pas | 60 | ||||
-rw-r--r-- | Game/Code/Classes/USong.pas | 6 |
5 files changed, 145 insertions, 145 deletions
diff --git a/Game/Code/Classes/UDraw.pas b/Game/Code/Classes/UDraw.pas index 8c4f53f3..f64f0389 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) / (Lines[NrCzesci].Line[Lines[NrCzesci].Akt].End_ - Lines[NrCzesci].Line[Lines[NrCzesci].Akt].StartNote); + TempR := (Right-Left) / (Lines[NrCzesci].Line[Lines[NrCzesci].Current].End_ - Lines[NrCzesci].Line[Lines[NrCzesci].Current].StartNote); glEnable(GL_BLEND); glBegin(GL_LINES); - for Pet := Lines[NrCzesci].Line[Lines[NrCzesci].Akt].StartNote to Lines[NrCzesci].Line[Lines[NrCzesci].Akt].End_ do begin + for Pet := Lines[NrCzesci].Line[Lines[NrCzesci].Current].StartNote to Lines[NrCzesci].Line[Lines[NrCzesci].Current].End_ 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 - Lines[NrCzesci].Line[Lines[NrCzesci].Akt].StartNote), Top); - glVertex2f(Left + TempR * (Pet - Lines[NrCzesci].Line[Lines[NrCzesci].Akt].StartNote), Top + 135); + glVertex2f(Left + TempR * (Pet - Lines[NrCzesci].Line[Lines[NrCzesci].Current].StartNote), Top); + glVertex2f(Left + TempR * (Pet - Lines[NrCzesci].Line[Lines[NrCzesci].Current].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 := (Lines[NrCzesci].Line[Lines[NrCzesci].Akt].End_ - Lines[NrCzesci].Line[Lines[NrCzesci].Akt].StartNote); + lTmpB := (Lines[NrCzesci].Line[Lines[NrCzesci].Current].End_ - Lines[NrCzesci].Line[Lines[NrCzesci].Current].StartNote); {$IFDEF LAZARUS} (* @@ -269,7 +269,7 @@ begin end; - with Lines[NrCzesci].Line[Lines[NrCzesci].Akt] do begin + with Lines[NrCzesci].Line[Lines[NrCzesci].Current] 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 == end / ending // lewa czesc - left part - Rec.Left := (Start-Lines[NrCzesci].Line[Lines[NrCzesci].Akt].StartNote) * TempR + Left + 0.5 + 10*ScreenX; + Rec.Left := (Start-Lines[NrCzesci].Line[Lines[NrCzesci].Current].StartNote) * TempR + Left + 0.5 + 10*ScreenX; Rec.Right := Rec.Left + NotesW; Rec.Top := Top - (Tone-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+Lenght-Lines[NrCzesci].Line[Lines[NrCzesci].Akt].StartNote) * TempR + Left - NotesW - 0.5 + 10*ScreenX; // Dlugosc == lenght + Rec.Right := (Start+Lenght-Lines[NrCzesci].Line[Lines[NrCzesci].Current].StartNote) * TempR + Left - NotesW - 0.5 + 10*ScreenX; // Dlugosc == lenght 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 / (Lines[0].Line[Lines[0].Akt].End_ - Lines[0].Line[Lines[0].Akt].StartNote); - for N := 0 to Player[NrGracza].HighNut do + TempR := W / (Lines[0].Line[Lines[0].Current].End_ - Lines[0].Line[Lines[0].Current].StartNote); + for N := 0 to Player[NrGracza].HighNote do begin with Player[NrGracza].Note[N] do begin // Left part of note - Rec.Left := X + (Start-Lines[0].Line[Lines[0].Akt].StartNote) * TempR + 0.5 + 10*ScreenX; + Rec.Left := X + (Start-Lines[0].Line[Lines[0].Current].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 - (Tone-Lines[0].Line[Lines[0].Akt].BaseNote)*Space/2 - NotesH2; + Rec.Top := Y - (Tone-Lines[0].Line[Lines[0].Current].BaseNote)*Space/2 - NotesH2; Rec.Bottom := Rec.Top + 2 *NotesH2; // draw the left part @@ -407,11 +407,11 @@ var // Middle part of the note Rec.Left := Rec.Right; - Rec.Right := X + (Start+Lenght-Lines[0].Line[Lines[0].Akt].StartNote) * TempR - NotesW - 0.5 + 10*ScreenX; + Rec.Right := X + (Start+Lenght-Lines[0].Line[Lines[0].Current].StartNote) * TempR - NotesW - 0.5 + 10*ScreenX; // (nowe) - dunno - if (Start+Lenght-1 = Czas.AktBeatD) then - Rec.Right := Rec.Right - (1-Frac(Czas.MidBeatD)) * TempR; + if (Start+Lenght-1 = LineState.CurrentBeatD) then + Rec.Right := Rec.Right - (1-Frac(LineState.MidBeatD)) * TempR; // the left note is more right than the right note itself, sounds weird - so we fix that xD if Rec.Right <= Rec.Left then Rec.Right := Rec.Left; @@ -442,8 +442,8 @@ var // Perfect note is stored if Perfect and (Ini.EffectSing=1) then begin - A := 1 - 2*(Czas.Teraz - GetTimeFromBeat(Start+Lenght)); - if not (Start+Lenght-1 = Czas.AktBeatD) then + A := 1 - 2*(LineState.CurrentTime - GetTimeFromBeat(Start+Lenght)); + if not (Start+Lenght-1 = LineState.CurrentBeatD) then //Star animation counter //inc(Starfr); @@ -484,7 +484,7 @@ begin lTmpA := (Right-Left); - lTmpB := (Lines[NrCzesci].Line[Lines[NrCzesci].Akt].End_ - Lines[NrCzesci].Line[Lines[NrCzesci].Akt].StartNote); + lTmpB := (Lines[NrCzesci].Line[Lines[NrCzesci].Current].End_ - Lines[NrCzesci].Line[Lines[NrCzesci].Current].StartNote); if ( lTmpA > 0 ) AND @@ -497,7 +497,7 @@ begin TempR := 0; end; - with Lines[NrCzesci].Line[Lines[NrCzesci].Akt] do begin + with Lines[NrCzesci].Line[Lines[NrCzesci].Current] do begin for Pet := 0 to HighNote do begin with Note[Pet] do begin if not FreeStyle then begin @@ -506,10 +506,10 @@ begin W := NotesW * 2 + 2; H := NotesH * 1.5 + 3.5; - X2 := (Start-Lines[NrCzesci].Line[Lines[NrCzesci].Akt].StartNote) * TempR + Left + 0.5 + 10*ScreenX + 4; // wciecie + X2 := (Start-Lines[NrCzesci].Line[Lines[NrCzesci].Current].StartNote) * TempR + Left + 0.5 + 10*ScreenX + 4; // wciecie X1 := X2-W; - X3 := (Start+Lenght-Lines[NrCzesci].Line[Lines[NrCzesci].Akt].StartNote) * TempR + Left - 0.5 + 10*ScreenX - 4; // wciecie + X3 := (Start+Lenght-Lines[NrCzesci].Line[Lines[NrCzesci].Current].StartNote) * TempR + Left - 0.5 + 10*ScreenX - 4; // wciecie X4 := X3+W; // left @@ -617,19 +617,19 @@ begin end; // Draw Lyrics - ScreenSing.Lyrics.Draw(Czas.MidBeat); + ScreenSing.Lyrics.Draw(LineState.MidBeat); // todo: Lyrics { // rysuje pasek, podpowiadajacy poczatek spiwania w scenie FS := 1.3; - BarFrom := Lines[0].Line[Lines[0].Akt].StartNote - Lines[0].Line[Lines[0].Akt].Start; + BarFrom := Lines[0].Line[Lines[0].Current].StartNote - Lines[0].Line[Lines[0].Current].Start; if BarFrom > 40 then BarFrom := 40; - 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; + if (Lines[0].Line[Lines[0].Current].StartNote - Lines[0].Line[Lines[0].Current].Start > 8) and // dluga przerwa //16->12 for more help bars and then 12->8 for even more + (Lines[0].Line[Lines[0].Current].StartNote - LineState.MidBeat > 0) and // przed tekstem + (Lines[0].Line[Lines[0].Current].StartNote - LineState.MidBeat < 40) then begin // ale nie za wczesnie + BarWspol := (LineState.MidBeat - (Lines[0].Line[Lines[0].Current].StartNote - BarFrom)) / BarFrom; Rec.Left := NR.Left + BarWspol * -// (NR.WMid - Lines[0].Line[Lines[0].Akt].LyricWidth / 2 * FS - 50); +// (NR.WMid - Lines[0].Line[Lines[0].Current].LyricWidth / 2 * FS - 50); (ScreenSing.LyricMain.ClientX - NR.Left - 50) + 10*ScreenX; Rec.Right := Rec.Left + 50; Rec.Top := Skin_LyricsT + 3; @@ -874,17 +874,17 @@ begin end; // Draw Lyrics - ScreenSingModi.Lyrics.Draw(Czas.MidBeat); + ScreenSingModi.Lyrics.Draw(LineState.MidBeat); // todo: Lyrics { // rysuje pasek, podpowiadajacy poczatek spiwania w scenie FS := 1.3; - BarFrom := Lines[0].Line[Lines[0].Akt].StartNote - Lines[0].Line[Lines[0].Akt].Start; + BarFrom := Lines[0].Line[Lines[0].Current].StartNote - Lines[0].Line[Lines[0].Current].Start; if BarFrom > 40 then BarFrom := 40; - 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; + if (Lines[0].Line[Lines[0].Current].StartNote - Lines[0].Line[Lines[0].Current].Start > 8) and // dluga przerwa //16->12 for more help bars and then 12->8 for even more + (Lines[0].Line[Lines[0].Current].StartNote - LineState.MidBeat > 0) and // przed tekstem + (Lines[0].Line[Lines[0].Current].StartNote - LineState.MidBeat < 40) then begin // ale nie za wczesnie + BarWspol := (LineState.MidBeat - (Lines[0].Line[Lines[0].Current].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,8 +1239,8 @@ begin glEnable(GL_TEXTURE_2D); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - TempR := (Right-Left) / (Lines[NrCzesci].Line[Lines[NrCzesci].Akt].End_ - Lines[NrCzesci].Line[Lines[NrCzesci].Akt].StartNote); - with Lines[NrCzesci].Line[Lines[NrCzesci].Akt] do begin + TempR := (Right-Left) / (Lines[NrCzesci].Line[Lines[NrCzesci].Current].End_ - Lines[NrCzesci].Line[Lines[NrCzesci].Current].StartNote); + with Lines[NrCzesci].Line[Lines[NrCzesci].Current] do begin for Pet := 0 to HighNote do begin with Note[Pet] do begin @@ -1254,7 +1254,7 @@ begin // lewa czesc - left part - Rec.Left := (Start-Lines[NrCzesci].Line[Lines[NrCzesci].Akt].StartNote) * TempR + Left + 0.5 + 10*ScreenX; + Rec.Left := (Start-Lines[NrCzesci].Line[Lines[NrCzesci].Current].StartNote) * TempR + Left + 0.5 + 10*ScreenX; Rec.Right := Rec.Left + NotesW; Rec.Top := Top - (Tone-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+Lenght-Lines[NrCzesci].Line[Lines[NrCzesci].Akt].StartNote) * TempR + Left - NotesW - 0.5 + 10*ScreenX; + Rec.Right := (Start+Lenght-Lines[NrCzesci].Line[Lines[NrCzesci].Current].StartNote) * TempR + Left - NotesW - 0.5 + 10*ScreenX; glBindTexture(GL_TEXTURE_2D, Tex_Mid[Color].TexNum); glBegin(GL_QUADS); @@ -1323,15 +1323,15 @@ begin glTexCoord2f(0, 0); glVertex2f(x,y); - if ( Czas.Teraz > 0 ) AND - ( Czas.Razem > 0 ) THEN + if ( LineState.CurrentTime > 0 ) AND + ( LineState.TotalTime > 0 ) THEN BEGIN - lTmp := Czas.Teraz/Czas.Razem; - glTexCoord2f((width*Czas.Teraz/Czas.Razem)/8, 0); - glVertex2f(x+width*Czas.Teraz/Czas.Razem, y); + lTmp := LineState.CurrentTime/LineState.TotalTime; + glTexCoord2f((width*LineState.CurrentTime/LineState.TotalTime)/8, 0); + glVertex2f(x+width*LineState.CurrentTime/LineState.TotalTime, y); - glTexCoord2f((width*Czas.Teraz/Czas.Razem)/8, 1); - glVertex2f(x+width*Czas.Teraz/Czas.Razem, y+height); + glTexCoord2f((width*LineState.CurrentTime/LineState.TotalTime)/8, 1); + glVertex2f(x+width*LineState.CurrentTime/LineState.TotalTime, y+height); END; glTexCoord2f(0, 1); diff --git a/Game/Code/Classes/UFiles.pas b/Game/Code/Classes/UFiles.pas index 70c97b88..def74c70 100644 --- a/Game/Code/Classes/UFiles.pas +++ b/Game/Code/Classes/UFiles.pas @@ -48,7 +48,7 @@ begin Lines[Pet].Line[0].LyricWidth := 0; Player[pet].Score := 0; Player[pet].IlNut := 0; - Player[pet].HighNut := -1; + Player[pet].HighNote := -1; end; (* FIXME diff --git a/Game/Code/Classes/UMain.pas b/Game/Code/Classes/UMain.pas index 4fab84e7..c13050e5 100644 --- a/Game/Code/Classes/UMain.pas +++ b/Game/Code/Classes/UMain.pas @@ -55,7 +55,7 @@ type //Meter: real;
- HighNut: integer;
+ HighNote: integer;
IlNut: integer;
Note: array of record
Start: integer;
@@ -675,79 +675,79 @@ var Done: real;
N: integer;
begin
- Czas.Teraz := Czas.Teraz + TimeSkip;
+ LineState.CurrentTime := LineState.CurrentTime + TimeSkip;
- Czas.OldBeat := Czas.AktBeat;
- Czas.MidBeat := GetMidBeat(Czas.Teraz - (CurrentSong.Gap{ + 90 I've forgotten for what it is}) / 1000); // new system with variable BPM in function
- Czas.AktBeat := Floor(Czas.MidBeat);
+ LineState.OldBeat := LineState.CurrentBeat;
+ LineState.MidBeat := GetMidBeat(LineState.CurrentTime - (CurrentSong.Gap{ + 90 I've forgotten for what it is}) / 1000); // new system with variable BPM in function
+ LineState.CurrentBeat := Floor(LineState.MidBeat);
-// Czas.OldHalf := Czas.AktHalf;
-// Czas.MidHalf := Czas.MidBeat + 0.5;
-// Czas.AktHalf := Floor(Czas.MidHalf);
+// LineState.OldHalf := LineState.AktHalf;
+// LineState.MidHalf := LineState.MidBeat + 0.5;
+// LineState.AktHalf := Floor(LineState.MidHalf);
- Czas.OldBeatC := Czas.AktBeatC;
- Czas.MidBeatC := GetMidBeat(Czas.Teraz - (CurrentSong.Gap) / 1000);
- Czas.AktBeatC := Floor(Czas.MidBeatC);
+ LineState.OldBeatC := LineState.CurrentBeatC;
+ LineState.MidBeatC := GetMidBeat(LineState.CurrentTime - (CurrentSong.Gap) / 1000);
+ LineState.CurrentBeatC := Floor(LineState.MidBeatC);
- Czas.OldBeatD := Czas.AktBeatD;
- Czas.MidBeatD := -0.5+GetMidBeat(Czas.Teraz - (CurrentSong.Gap + 120 + 20) / 1000); // MidBeat with addition GAP
- Czas.AktBeatD := Floor(Czas.MidBeatD);
- Czas.FracBeatD := Frac(Czas.MidBeatD);
+ LineState.OldBeatD := LineState.CurrentBeatD;
+ LineState.MidBeatD := -0.5+GetMidBeat(LineState.CurrentTime - (CurrentSong.Gap + 120 + 20) / 1000); // MidBeat with addition GAP
+ LineState.CurrentBeatD := Floor(LineState.MidBeatD);
+ LineState.FracBeatD := Frac(LineState.MidBeatD);
// sentences routines
for PetGr := 0 to 0 do //High(Gracz)
begin;
CP := PetGr;
// ustawianie starej parts
- Czas.OldCzesc := Lines[CP].Akt;
+ LineState.OldLine := Lines[CP].Current;
// wybieranie aktualnej parts
for Pet := 0 to Lines[CP].High do
begin
- if Czas.AktBeat >= Lines[CP].Line[Pet].Start then
- Lines[CP].Akt := Pet;
+ if LineState.CurrentBeat >= Lines[CP].Line[Pet].Start then
+ Lines[CP].Current := Pet;
end;
// czysczenie nut gracza, gdy to jest nowa plansza
// (optymizacja raz na halfbeat jest zla)
- if Lines[CP].Akt <> Czas.OldCzesc then
+ if Lines[CP].Current <> LineState.OldLine then
NewSentence(Sender);
end; // for PetGr
// wykonuje operacje raz na beat
- if (Czas.AktBeat >= 0) and (Czas.OldBeat <> Czas.AktBeat) then
+ if (LineState.CurrentBeat >= 0) and (LineState.OldBeat <> LineState.CurrentBeat) then
NewBeat(Sender);
// make some operations on clicks
- if {(Czas.AktBeatC >= 0) and }(Czas.OldBeatC <> Czas.AktBeatC) then
+ if {(LineState.CurrentBeatC >= 0) and }(LineState.OldBeatC <> LineState.CurrentBeatC) then
NewBeatC(Sender);
// make some operations when detecting new voice pitch
- if (Czas.AktBeatD >= 0) and (Czas.OldBeatD <> Czas.AktBeatD) then
+ if (LineState.CurrentBeatD >= 0) and (LineState.OldBeatD <> LineState.CurrentBeatD) then
NewBeatD(Sender);
// wykonuje operacje w polowie beatu
-// if (Czas.AktHalf >= 1) and (Czas.OldHalf <> Czas.AktHalf) then
+// if (LineState.AktHalf >= 1) and (LineState.OldHalf <> LineState.AktHalf) then
// NewHalf;
// plynnie przesuwa text
Done := 1;
- for N := 0 to Lines[0].Line[Lines[0].Akt].HighNote do
+ for N := 0 to Lines[0].Line[Lines[0].Current].HighNote do
begin
- 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].Lenght >= Czas.MidBeat) then
+ if (Lines[0].Line[Lines[0].Current].Note[N].Start <= LineState.MidBeat) and
+ (Lines[0].Line[Lines[0].Current].Note[N].Start + Lines[0].Line[Lines[0].Current].Note[N].Lenght >= LineState.MidBeat) then
begin
- Done := (Czas.MidBeat - Lines[0].Line[Lines[0].Akt].Note[N].Start) / (Lines[0].Line[Lines[0].Akt].Note[N].Lenght);
+ Done := (LineState.MidBeat - Lines[0].Line[Lines[0].Current].Note[N].Start) / (Lines[0].Line[Lines[0].Current].Note[N].Lenght);
end;
end;
- N := Lines[0].Line[Lines[0].Akt].HighNote;
+ N := Lines[0].Line[Lines[0].Current].HighNote;
// wylacza ostatnia nute po przejsciu
{// todo: Lyrics
if (Ini.LyricsEffect = 1) and (Done = 1) and
- (Czas.MidBeat > Lines[0].Line[Lines[0].Akt].Note[N].Start + Lines[0].Line[Lines[0].Akt].Note[N].Lenght)
+ (LineState.MidBeat > Lines[0].Line[Lines[0].Current].Note[N].Start + Lines[0].Line[Lines[0].Current].Note[N].Lenght)
then Sender.LyricMain.Selected := -1;
if Done > 1 then Done := 1;
@@ -772,16 +772,16 @@ begin for G := 0 to High(Player) do
begin
Player[G].IlNut := 0;
- Player[G].HighNut := -1;
+ Player[G].HighNote := -1;
SetLength(Player[G].Note, 0);
end;
// Add Words to Lyrics
with Sender do
begin
- {LyricMain.AddCzesc(Lines[0].Akt);
- if Lines[0].Akt < Lines[0].High then
- LyricSub.AddCzesc(Lines[0].Akt+1)
+ {LyricMain.AddCzesc(Lines[0].Current);
+ if Lines[0].Current < Lines[0].High then
+ LyricSub.AddCzesc(Lines[0].Current+1)
else
LyricSub.Clear;}
while (not Lyrics.LineinQueue) and (Lyrics.LineCounter <= High(Lines[0].Line)) do
@@ -791,7 +791,7 @@ begin Sender.UpdateLCD;
//On Sentence Change...
- Sender.onSentenceChange(Lines[0].Akt);
+ Sender.onSentenceChange(Lines[0].Current);
end;
procedure NewBeat(Sender: TScreenSing);
@@ -801,8 +801,8 @@ var begin
// ustawia zaznaczenie tekstu
// SingScreen.LyricMain.Selected := -1;
- 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
+ for Pet := 0 to Lines[0].Line[Lines[0].Current].HighNote do
+ if (Lines[0].Line[Lines[0].Current].Note[Pet].Start = LineState.CurrentBeat) 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 + Lines[0].Resolution + Lines[0].NotesGAP) mod Lines[0].Resolution = 0) then
+ if (Ini.BeatClick = 1) and ((LineState.CurrentBeatC + Lines[0].Resolution + Lines[0].NotesGAP) mod Lines[0].Resolution = 0) then
AudioPlayback.PlaySound(SoundLib.Click);
// debug system on LPT
- if ((Czas.AktBeatC + Lines[0].Resolution + Lines[0].NotesGAP) mod Lines[0].Resolution = 0) then
+ if ((LineState.CurrentBeatC + 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 + Lines[0].Resolution + Lines[0].NotesGAP) mod (Lines[0].Resolution * 2) = 0) then
+{ if ((LineState.CurrentBeatC + 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 Lines[0].Line[Lines[0].Akt].HighNote do
+ for Pet := 0 to Lines[0].Line[Lines[0].Current].HighNote do
begin
- if (Lines[0].Line[Lines[0].Akt].Note[Pet].Start = Czas.AktBeatC) then
+ if (Lines[0].Line[Lines[0].Current].Note[Pet].Start = LineState.CurrentBeatC) then
begin
// click assist
if Ini.ClickAssist = 1 then
@@ -860,7 +860,7 @@ begin // drum machine
(*
- TempBeat := Czas.AktBeat;// + 2;
+ TempBeat := LineState.CurrentBeat;// + 2;
if (TempBeat mod 8 = 0) then Music.PlayDrum;
if (TempBeat mod 8 = 4) then Music.PlayClap;
// if (TempBeat mod 4 = 2) then Music.PlayHihat;
@@ -897,7 +897,7 @@ var Range: integer;
NoteHit:boolean;
begin
-// Log.LogStatus('Beat ' + IntToStr(Czas.AktBeat) + ' HalfBeat ' + IntToStr(Czas.AktHalf), 'NewBeat');
+// Log.LogStatus('Beat ' + IntToStr(LineState.CurrentBeat) + ' HalfBeat ' + IntToStr(LineState.AktHalf), 'NewBeat');
// beep;
// On linux we get an AV @ NEWNOTE, line 600 of Classes/UMain.pas
@@ -912,13 +912,13 @@ begin AudioInputProcessor.Sound[CP].AnalyzeBuffer;
// adds some noise
- //Czas.Tone := Czas.Tone + Round(Random(3)) - 1;
+ //LineState.Tone := LineState.Tone + Round(Random(3)) - 1;
// count min and max sentence range for checking (detection is delayed to the notes we see on the screen)
- SMin := Lines[0].Akt-1;
+ SMin := Lines[0].Current-1;
if SMin < 0 then
SMin := 0;
- SMax := Lines[0].Akt;
+ SMax := Lines[0].Current;
// check if we can add new note
Mozna := false;
@@ -927,8 +927,8 @@ begin begin
for Pet := 0 to Lines[0].Line[S].HighNote do
begin
- if ((Lines[0].Line[S].Note[Pet].Start <= Czas.AktBeatD)
- and (Lines[0].Line[S].Note[Pet].Start + Lines[0].Line[S].Note[Pet].Lenght - 1 >= Czas.AktBeatD))
+ if ((Lines[0].Line[S].Note[Pet].Start <= LineState.CurrentBeatD)
+ and (Lines[0].Line[S].Note[Pet].Start + Lines[0].Line[S].Note[Pet].Lenght - 1 >= LineState.CurrentBeatD))
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].Lenght > 0) then // and make sure the note lenghts is at least 1
begin
@@ -950,9 +950,9 @@ begin // operowanie na ostatniej nucie
for Pet := 0 to Lines[0].Line[S].HighNote do
begin
- if (Lines[0].Line[S].Note[Pet].Start <= Czas.OldBeatD+1) and
+ if (Lines[0].Line[S].Note[Pet].Start <= LineState.OldBeatD+1) and
(Lines[0].Line[S].Note[Pet].Start +
- Lines[0].Line[S].Note[Pet].Lenght > Czas.OldBeatD+1) then
+ Lines[0].Line[S].Note[Pet].Lenght > LineState.OldBeatD+1) then
begin
// to robi, tylko dla pary nut (oryginalnej i gracza)
@@ -1014,8 +1014,8 @@ begin Nowa := true;
// jezeli ostatnia ma ten sam Tone
if (Player[CP].IlNut > 0 ) and
- (Player[CP].Note[Player[CP].HighNut].Tone = AudioInputProcessor.Sound[CP].Tone) and
- (Player[CP].Note[Player[CP].HighNut].Start + Player[CP].Note[Player[CP].HighNut].Lenght = Czas.AktBeatD) then
+ (Player[CP].Note[Player[CP].HighNote].Tone = AudioInputProcessor.Sound[CP].Tone) and
+ (Player[CP].Note[Player[CP].HighNote].Start + Player[CP].Note[Player[CP].HighNote].Lenght = LineState.CurrentBeatD) then
begin
Nowa := false;
end;
@@ -1023,7 +1023,7 @@ begin // jezeli jest jakas nowa nuta na sprawdzanym beacie
for Pet := 0 to Lines[0].Line[S].HighNote do
begin
- if (Lines[0].Line[S].Note[Pet].Start = Czas.AktBeatD) then
+ if (Lines[0].Line[S].Note[Pet].Start = LineState.CurrentBeatD) then
Nowa := true;
end;
@@ -1032,32 +1032,32 @@ begin begin
// nowa nuta
Player[CP].IlNut := Player[CP].IlNut + 1;
- Player[CP].HighNut := Player[CP].HighNut + 1;
+ Player[CP].HighNote := Player[CP].HighNote + 1;
SetLength(Player[CP].Note, Player[CP].IlNut);
- Player[CP].Note[Player[CP].HighNut].Start := Czas.AktBeatD;
- Player[CP].Note[Player[CP].HighNut].Lenght := 1;
- Player[CP].Note[Player[CP].HighNut].Tone := AudioInputProcessor.Sound[CP].Tone; // Ton || TonDokl
- Player[CP].Note[Player[CP].HighNut].Detekt := Czas.MidBeat;
+ Player[CP].Note[Player[CP].HighNote].Start := LineState.CurrentBeatD;
+ Player[CP].Note[Player[CP].HighNote].Lenght := 1;
+ Player[CP].Note[Player[CP].HighNote].Tone := AudioInputProcessor.Sound[CP].Tone; // Ton || TonDokl
+ Player[CP].Note[Player[CP].HighNote].Detekt := LineState.MidBeat;
// Half Note Patch
- Player[CP].Note[Player[CP].HighNut].Hit := NoteHit;
+ Player[CP].Note[Player[CP].HighNote].Hit := NoteHit;
- //Log.LogStatus('Nowa Nuta ' + IntToStr(Gracz.Note[Gracz.HighNut].Start), 'NewBeat');
+ //Log.LogStatus('Nowa Nuta ' + IntToStr(Gracz.Note[Gracz.HighNote].Start), 'NewBeat');
end
else
begin
// przedluzenie nuty
- Player[CP].Note[Player[CP].HighNut].Lenght := Player[CP].Note[Player[CP].HighNut].Lenght + 1;
+ Player[CP].Note[Player[CP].HighNote].Lenght := Player[CP].Note[Player[CP].HighNote].Lenght + 1;
end;
// check for perfect note and then lit the star (on Draw)
for Pet := 0 to Lines[0].Line[S].HighNote do
begin
- if (Lines[0].Line[S].Note[Pet].Start = Player[CP].Note[Player[CP].HighNut].Start) and
- (Lines[0].Line[S].Note[Pet].Lenght = Player[CP].Note[Player[CP].HighNut].Lenght) and
- (Lines[0].Line[S].Note[Pet].Tone = Player[CP].Note[Player[CP].HighNut].Tone) then
+ if (Lines[0].Line[S].Note[Pet].Start = Player[CP].Note[Player[CP].HighNote].Start) and
+ (Lines[0].Line[S].Note[Pet].Lenght = Player[CP].Note[Player[CP].HighNote].Lenght) and
+ (Lines[0].Line[S].Note[Pet].Tone = Player[CP].Note[Player[CP].HighNote].Tone) then
begin
- Player[CP].Note[Player[CP].HighNut].Perfect := true;
+ Player[CP].Note[Player[CP].HighNote].Perfect := true;
end;
end;
end;// else beep; // if S = SMax
@@ -1070,7 +1070,7 @@ begin if (sDet >= low(Lines[0].Line)) and (sDet <= high(Lines[0].Line)) then
begin
if assigned( Sender ) and
- ((Lines[0].Line[SDet].Note[Lines[0].Line[SDet].HighNote].Start + Lines[0].Line[SDet].Note[Lines[0].Line[SDet].HighNote].Lenght - 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].Lenght - 1) = LineState.CurrentBeatD) then
begin
Sender.onSentenceEnd(sDet);
end;
diff --git a/Game/Code/Classes/UMusic.pas b/Game/Code/Classes/UMusic.pas index 90e78dd7..2ffe13ce 100644 --- a/Game/Code/Classes/UMusic.pas +++ b/Game/Code/Classes/UMusic.pas @@ -17,10 +17,10 @@ type //http://paste.ubuntu-nl.org/51892/
TMelody = record
- Path: string;
- Start: integer; // start of song in ms
- IlNut: integer; // (TODO: Il = tone, Nut(a) = Note)
- DlugoscNut: integer; // (TODO: Dlugosc = length, Nut(a) = Note)
+ Path: string;
+ Start: integer; // start of song in ms
+ IlNut: integer; // (TODO: Il = tone, Nut(a) = Note)
+ NoteLenght: integer;
end;
PLine = ^TLine;
@@ -29,7 +29,7 @@ type StartNote: integer;
Lyric: string;
LyricWidth: real;
- End_: integer;
+ End_: integer;
BaseNote: integer;
HighNote: integer;
IlNut: integer; // (TODO: Il = tone, Nut(a) = Note)
@@ -37,52 +37,52 @@ type Note: array of record
Color: integer;
Start: integer;
- Lenght: integer;
- Tone: integer; // full range tone
- TonGamy: integer; // tone unified to one octave (TODO: rename to something meaningful, ToneGamus)
- Text: string; // (TODO: rename to Text)
+ Lenght: integer;
+ Tone: integer; // full range tone
+ ToneGamus: integer; // tone unified to one octave
+ Text: string;
FreeStyle: boolean;
- NoteType: integer; // normal-note: 1, golden-note: 2 (TODO: wartosc=value, rename to Type_ or Kind?)
+ NoteType: integer; // normal-note: 1, golden-note: 2
end;
end;
- ALine = array of TLine; // (TODO: rename to TLineArray)
+ ALine = array of TLine; // (TODO: rename to TLineArray)
// (TCzesci = TSentences) TCzesci changed to TLines because TSentences exist elseware in incompatible form
TLines = record
- Akt: integer; // for drawing of current line (Akt = Current)
+ Current: integer; // for drawing of current line
High: integer;
- Ilosc: integer; // (TODO: Ilosc = Number/Count)
+ Ilosc: integer; // (TODO: Ilosc = Number/Count)
Resolution: integer;
NotesGAP: integer;
- NoteType: integer; // TODO: rename (wartosc=value)
- Line: ALine; // TODO: rename to Sentence or Line - renamed to Line
+ NoteType: integer;
+ Line: ALine;
end;
// (TODO: rename TCzas to something like T(Line/Sentence)Time/TLinePosition/TLineState)
// (Czas = time)
- TCzas = record // all that concerns the current frames
- OldBeat: integer; // previous discovered beat
- AktBeat: integer; // current beat (TODO: rename)
- MidBeat: real; // like AktBeat
+ TLineState = record // all that concerns the current frames
+ OldBeat: integer; // previous discovered beat
+ CurrentBeat: integer;
+ MidBeat: real; // like CurrentBeat
// now we use this for super synchronization!
// only used when analyzing voice
OldBeatD: integer; // previous discovered beat
- AktBeatD: integer; // current beat (TODO: rename)
- MidBeatD: real; // like AktBeatD
+ CurrentBeatD: integer;
+ MidBeatD: real; // like CurrentBeatD
FracBeatD: real; // fractional part of MidBeatD
// we use this for audible clicks
OldBeatC: integer; // previous discovered beat
- AktBeatC: integer; // current beat (TODO: rename)
- MidBeatC: real; // like AktBeatC
+ CurrentBeatC: integer;
+ MidBeatC: real; // like CurrentBeatC
FracBeatC: real; // fractional part of MidBeatC
- OldCzesc: integer; // previous displayed sentence (Czesc = part (here: sentence/line))
+ OldLine: integer; // previous displayed sentence
- Teraz: real; // (TODO: Teraz = current time)
- Razem: real; // (TODO: Razem = total time)
+ CurrentTime: real;
+ TotalTime: real;
end;
@@ -288,13 +288,13 @@ type var // TODO : JB --- THESE SHOULD NOT BE GLOBAL
// music
- Melody: TMelody; // TODO: rename
+ Melody: TMelody;
// czesci z nutami;
- Lines: array of TLines; // TODO: rename to Sentences/Lines
+ Lines: array of TLines;
- // czas
- Czas: TCzas; // TODO: rename
+ // LineState
+ LineState: TLineState;
SoundLib: TSoundLibrary;
diff --git a/Game/Code/Classes/USong.pas b/Game/Code/Classes/USong.pas index 5db250c5..a97ea1c9 100644 --- a/Game/Code/Classes/USong.pas +++ b/Game/Code/Classes/USong.pas @@ -227,7 +227,7 @@ begin SetLength(Lines[Pet].Line, 1);
Lines[Pet].High := 0;
Lines[Pet].Ilosc := 1;
- Lines[Pet].Akt := 0;
+ Lines[Pet].Current := 0;
Lines[Pet].Resolution := self.Resolution;
Lines[Pet].NotesGAP := self.NotesGAP;
Lines[Pet].Line[0].IlNut := 0;
@@ -593,7 +593,7 @@ begin end;
Note[HighNote].Lenght := DurationP;
- Melody.DlugoscNut := Melody.DlugoscNut + Note[HighNote].Lenght;
+ Melody.NoteLenght := Melody.NoteLenght + Note[HighNote].Lenght;
// back to the normal system with normal, golden and now freestyle notes
case TypeP of
@@ -606,7 +606,7 @@ begin Note[HighNote].Tone := NoteP;
if Note[HighNote].Tone < Base[NrCzesci] then Base[NrCzesci] := Note[HighNote].Tone;
- Note[HighNote].TonGamy := Note[HighNote].TonGamy mod 12;
+ Note[HighNote].ToneGamus := Note[HighNote].ToneGamus mod 12;
Note[HighNote].Text := Copy(LyricS, 2, 100);
Lyric := Lyric + Note[HighNote].Text;
|