aboutsummaryrefslogtreecommitdiffstats
path: root/unicode/src/screens/UScreenSong.pas
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-03-14 21:18:50 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-03-14 21:18:50 +0000
commita92d9807237a024106b67f045822679f7ee4df54 (patch)
tree5f2c2501be7da18d2b82216fe60e645d1a2caaac /unicode/src/screens/UScreenSong.pas
parentc61a339ad465ecb43897975538a77c3eb87110be (diff)
downloadusdx-a92d9807237a024106b67f045822679f7ee4df54.tar.gz
usdx-a92d9807237a024106b67f045822679f7ee4df54.tar.xz
usdx-a92d9807237a024106b67f045822679f7ee4df54.zip
merge with current trunk (just update)
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1634 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'unicode/src/screens/UScreenSong.pas')
-rw-r--r--unicode/src/screens/UScreenSong.pas436
1 files changed, 239 insertions, 197 deletions
diff --git a/unicode/src/screens/UScreenSong.pas b/unicode/src/screens/UScreenSong.pas
index ac1ee194..da725a59 100644
--- a/unicode/src/screens/UScreenSong.pas
+++ b/unicode/src/screens/UScreenSong.pas
@@ -65,7 +65,7 @@ type
TextNumber: integer;
//Video Icon Mod
- VideoIcon: Cardinal;
+ VideoIcon: cardinal;
TextCat: integer;
StaticCat: integer;
@@ -88,28 +88,28 @@ type
Mode: TSingMode;
//party Statics (Joker)
- StaticTeam1Joker1: Cardinal;
- StaticTeam1Joker2: Cardinal;
- StaticTeam1Joker3: Cardinal;
- StaticTeam1Joker4: Cardinal;
- StaticTeam1Joker5: Cardinal;
-
- StaticTeam2Joker1: Cardinal;
- StaticTeam2Joker2: Cardinal;
- StaticTeam2Joker3: Cardinal;
- StaticTeam2Joker4: Cardinal;
- StaticTeam2Joker5: Cardinal;
-
- StaticTeam3Joker1: Cardinal;
- StaticTeam3Joker2: Cardinal;
- StaticTeam3Joker3: Cardinal;
- StaticTeam3Joker4: Cardinal;
- StaticTeam3Joker5: Cardinal;
-
- StaticParty: array of Cardinal;
- TextParty: array of Cardinal;
- StaticNonParty: array of Cardinal;
- TextNonParty: array of Cardinal;
+ StaticTeam1Joker1: cardinal;
+ StaticTeam1Joker2: cardinal;
+ StaticTeam1Joker3: cardinal;
+ StaticTeam1Joker4: cardinal;
+ StaticTeam1Joker5: cardinal;
+
+ StaticTeam2Joker1: cardinal;
+ StaticTeam2Joker2: cardinal;
+ StaticTeam2Joker3: cardinal;
+ StaticTeam2Joker4: cardinal;
+ StaticTeam2Joker5: cardinal;
+
+ StaticTeam3Joker1: cardinal;
+ StaticTeam3Joker2: cardinal;
+ StaticTeam3Joker3: cardinal;
+ StaticTeam3Joker4: cardinal;
+ StaticTeam3Joker5: cardinal;
+
+ StaticParty: array of cardinal;
+ TextParty: array of cardinal;
+ StaticNonParty: array of cardinal;
+ TextNonParty: array of cardinal;
constructor Create; override;
@@ -120,18 +120,18 @@ type
procedure SetScroll4;
procedure SetScroll5;
procedure SetScroll6;
- function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override;
+ function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
function Draw: boolean; override;
procedure GenerateThumbnails();
procedure onShow; override;
procedure onHide; override;
procedure SelectNext;
procedure SelectPrev;
- procedure SkipTo(Target: Cardinal);
+ procedure SkipTo(Target: cardinal);
procedure FixSelected; //Show Wrong Song when Tabs on Fix
procedure FixSelected2; //Show Wrong Song when Tabs on Fix
- procedure ShowCatTL(Cat: Integer);// Show Cat in Top left
- procedure ShowCatTLCustom(Caption: String);// Show Custom Text in Top left
+ procedure ShowCatTL(Cat: integer);// Show Cat in Top left
+ procedure ShowCatTLCustom(Caption: string);// Show Custom Text in Top left
procedure HideCatTL;// Show Cat in Tob left
procedure Refresh; //Refresh Song Sorting
procedure ChangeMusic;
@@ -154,24 +154,26 @@ type
implementation
uses
- UGraphic,
- UMain,
- UCovers,
- math,
+ Math,
gl,
- USkins,
+ UCovers,
UDLLManager,
+ UGraphic,
+ UMain,
+ UMenuButton,
+ UNote,
UParty,
UPlaylist,
- UMenuButton,
- UUnicodeUtils,
- UScreenSongMenu;
+ UScreenSongMenu,
+ USkins,
+ UUnicodeUtils;
// ***** Public methods ****** //
//Show Wrong Song when Tabs on Fix
procedure TScreenSong.FixSelected;
-var I, I2: Integer;
+var
+ I, I2: integer;
begin
if CatSongs.VisibleSongs > 0 then
begin
@@ -191,7 +193,8 @@ begin
end;
procedure TScreenSong.FixSelected2;
-var I, I2: Integer;
+var
+ I, I2: integer;
begin
if CatSongs.VisibleSongs > 0 then
begin
@@ -210,15 +213,15 @@ begin
end;
//Show Wrong Song when Tabs on Fix End
-procedure TScreenSong.ShowCatTLCustom(Caption: String);// Show Custom Text in Top left
+procedure TScreenSong.ShowCatTLCustom(Caption: string);// Show Custom Text in Top left
begin
Text[TextCat].Text := Caption;
Text[TextCat].Visible := true;
- Static[StaticCat].Visible := False;
+ Static[StaticCat].Visible := false;
end;
//Show Cat in Top Left Mod
-procedure TScreenSong.ShowCatTL(Cat: Integer);
+procedure TScreenSong.ShowCatTL(Cat: integer);
begin
//Change
Text[TextCat].Text := CatSongs.Song[Cat].Artist;
@@ -226,7 +229,7 @@ begin
//Show
Text[TextCat].Visible := true;
- Static[StaticCat].Visible := True;
+ Static[StaticCat].Visible := true;
end;
procedure TScreenSong.HideCatTL;
@@ -235,7 +238,7 @@ begin
//Text[TextCat].Visible := false;
Static[StaticCat].Visible := false;
//New -> Show Text specified in Theme
- Text[TextCat].Visible := True;
+ Text[TextCat].Visible := true;
Text[TextCat].Text := Theme.Song.TextCat.Text;
end;
//Show Cat in Top Left Mod End
@@ -243,7 +246,7 @@ end;
// Method for input parsing. If False is returned, GetNextWindow
// should be checked to know the next window to load;
-function TScreenSong.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean;
+function TScreenSong.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
var
I: integer;
I2: integer;
@@ -388,7 +391,7 @@ begin
begin
if (Songs.SongList.Count > 0) and (Mode = smNormal) then
begin
- ScreenSongJumpto.Visible := True;
+ ScreenSongJumpto.Visible := true;
end;
Exit;
end;
@@ -401,21 +404,22 @@ begin
Ord('R'):
begin
- if (Songs.SongList.Count > 0) and (Mode = smNormal) then
+ if (Songs.SongList.Count > 0) and
+ (Mode = smNormal) then
begin
- if (SDL_ModState = KMOD_LSHIFT) and (Ini.Tabs_at_startup = 1) then //Random Category
+ if (SDL_ModState = KMOD_LSHIFT) and (Ini.TabsAtStartup = 1) then //Random Category
begin
I2 := 0; //Count Cats
- for I:= low(CatSongs.Song) to high (CatSongs.Song) do
+ for I:= 0 to high(CatSongs.Song) do
begin
if CatSongs.Song[I].Main then
Inc(I2);
end;
- I2 := Random (I2)+1; //Zufall
+ I2 := Random(I2)+1; //Zufall
//Find Cat:
- for I:= low(CatSongs.Song) to high (CatSongs.Song) do
+ for I:= 0 to high(CatSongs.Song) do
begin
if CatSongs.Song[I].Main then
Dec(I2);
@@ -434,14 +438,14 @@ begin
end;
end;
end
- else if (SDL_ModState = KMOD_LCTRL) and (Ini.Tabs_at_startup = 1) then //random in All Categorys
+ else if (SDL_ModState = KMOD_LCTRL) and (Ini.TabsAtStartup = 1) then //random in All Categorys
begin
repeat
- I2 := Random(high(CatSongs.Song)+1) - low(CatSongs.Song)+1;
- until CatSongs.Song[I2].Main = false;
+ I2 := Random(high(CatSongs.Song)+1) + 1;
+ until (not CatSongs.Song[I2].Main);
//Search Cat
- for I := I2 downto low(CatSongs.Song) do
+ for I := I2 downto 0 do
begin
if CatSongs.Song[I].Main then
break;
@@ -459,7 +463,8 @@ begin
SelectNext;
//Fix: Not Existing Song selected:
- //if (I+1=I2) then Inc(I2);
+ //if (I+1=I2) then
+ Inc(I2);
//Choose Song
SkipTo(I2-I);
@@ -485,20 +490,20 @@ begin
if (Mode = smNormal) then
begin
//On Escape goto Cat-List Hack
- if (Ini.Tabs_at_startup = 1) and (CatSongs.CatNumShow <> -1) then
+ if (Ini.TabsAtStartup = 1) and (CatSongs.CatNumShow <> -1) then
begin
//Find Category
I := Interaction;
- while not catsongs.Song[I].Main do
- begin
- Dec (I);
- if (I < low(catsongs.Song)) then
+ while (not CatSongs.Song[I].Main) do
+ begin
+ Dec(I);
+ if (I < 0) then
break;
- end;
- if (I<= 1) then
- Interaction := high(catsongs.Song)
+ end;
+ if (I <= 1) then
+ Interaction := high(CatSongs.Song)
else
- Interaction := I - 1;
+ Interaction := I - 1;
//Stop Music
StopMusicPreview();
@@ -513,7 +518,7 @@ begin
SelectNext;
FixSelected;
//SelectPrev;
- //CatSongs.Song[0].Visible := False;
+ //CatSongs.Song[0].Visible := false;
end
else
begin
@@ -553,7 +558,7 @@ begin
end;
SDLK_RETURN:
begin
- if Songs.SongList.Count > 0 then
+ if (Songs.SongList.Count > 0) then
begin
if CatSongs.Song[Interaction].Main then
begin // clicked on Category Button
@@ -610,10 +615,11 @@ begin
if (CatSongs.CatNumShow > -2) then
begin
//Cat Change Hack
- if Ini.Tabs_at_startup = 1 then
+ if Ini.TabsAtStartup = 1 then
begin
I := Interaction;
- if I <= 0 then I := 1;
+ if I <= 0 then
+ I := 1;
while not catsongs.Song[I].Main do
begin
@@ -650,11 +656,12 @@ begin
if (CatSongs.CatNumShow > -2) then
begin
//Cat Change Hack
- if Ini.Tabs_at_startup = 1 then
+ if Ini.TabsAtStartup = 1 then
begin
I := Interaction;
I2 := 0;
- if I <= 0 then I := 1;
+ if I <= 0 then
+ I := 1;
while not catsongs.Song[I].Main or (I2 = 0) do
begin
@@ -740,7 +747,7 @@ begin
end; }
end;
end;
- end;
+ end; // if (PressedDown)
end;
constructor TScreenSong.Create;
@@ -816,7 +823,7 @@ end;
procedure TScreenSong.GenerateThumbnails();
var
- I: Integer;
+ I: integer;
CoverButtonIndex: integer;
CoverButton: TButton;
CoverName: string;
@@ -877,7 +884,7 @@ end;
procedure TScreenSong.SetScroll;
var
- VS, B: Integer;
+ VS, B: integer;
begin
VS := CatSongs.VisibleSongs;
if VS > 0 then
@@ -901,7 +908,7 @@ begin
// Set texts
Text[TextArtist].Text := CatSongs.Song[Interaction].Artist;
Text[TextTitle].Text := CatSongs.Song[Interaction].Title;
- if (Ini.Tabs_at_startup = 1) and (CatSongs.CatNumShow = -1) then
+ if (Ini.TabsAtStartup = 1) and (CatSongs.CatNumShow = -1) then
begin
Text[TextNumber].Text := IntToStr(CatSongs.Song[Interaction].OrderNum) + '/' + IntToStr(CatSongs.CatCount);
Text[TextTitle].Text := '(' + IntToStr(CatSongs.Song[Interaction].CatNumber) + ' ' + Language.Translate('SING_SONGS_IN_CAT') + ')';
@@ -910,7 +917,7 @@ begin
Text[TextNumber].Text := IntToStr(CatSongs.VisibleIndex(Interaction)+1) + '/' + IntToStr(VS)
else if (CatSongs.CatNumShow = -3) then
Text[TextNumber].Text := IntToStr(CatSongs.VisibleIndex(Interaction)+1) + '/' + IntToStr(VS)
- else if (Ini.Tabs_at_startup = 1) then
+ else if (Ini.TabsAtStartup = 1) then
Text[TextNumber].Text := IntToStr(CatSongs.Song[Interaction].CatNumber) + '/' + IntToStr(CatSongs.Song[Interaction - CatSongs.Song[Interaction].CatNumber].CatNumber)
else
Text[TextNumber].Text := IntToStr(Interaction+1) + '/' + IntToStr(Length(CatSongs.Song));
@@ -921,7 +928,7 @@ begin
Text[TextArtist].Text := '';
Text[TextTitle].Text := '';
for B := 0 to High(Button) do
- Button[B].Visible := False;
+ Button[B].Visible := false;
end;
end;
@@ -951,29 +958,37 @@ begin
VisCount := 0;
for B := 0 to High(Button) do
- if CatSongs.Song[B].Visible then Inc(VisCount);
+ if CatSongs.Song[B].Visible then
+ Inc(VisCount);
VisInt := 0;
for B := 0 to Interaction-1 do
- if CatSongs.Song[B].Visible then Inc(VisInt);
+ if CatSongs.Song[B].Visible then
+ Inc(VisInt);
- if VisCount <= 6 then begin
+ if VisCount <= 6 then
+ begin
Typ := 0;
- end else begin
- if VisInt <= 3 then begin
+ end
+ else
+ begin
+ if VisInt <= 3 then
+ begin
Typ := 1;
Count := 7;
Ready := true;
end;
- if (VisCount - VisInt) <= 3 then begin
+ if (VisCount - VisInt) <= 3 then
+ begin
Typ := 2;
Count := 7;
Ready := true;
end;
- if not Ready then begin
+ if not Ready then
+ begin
Typ := 3;
Src := Interaction;
end;
@@ -982,13 +997,15 @@ begin
// hide all buttons
- for B := 0 to High(Button) do begin
+ for B := 0 to High(Button) do
+ begin
Button[B].Visible := false;
Button[B].Selectable := CatSongs.Song[B].Visible;
end;
{
- for B := Src to Dst do begin
+ for B := Src to Dst do
+ begin
//Button[B].Visible := true;
Button[B].Visible := CatSongs.Song[B].Visible;
Button[B].Selectable := Button[B].Visible;
@@ -997,9 +1014,12 @@ begin
}
- if Typ = 0 then begin
- for B := 0 to High(Button) do begin
- if CatSongs.Song[B].Visible then begin
+ if Typ = 0 then
+ begin
+ for B := 0 to High(Button) do
+ begin
+ if CatSongs.Song[B].Visible then
+ begin
Button[B].Visible := true;
Button[B].Y := 140 + (Placed) * 60;
Inc(Placed);
@@ -1007,10 +1027,13 @@ begin
end;
end;
- if Typ = 1 then begin
+ if Typ = 1 then
+ begin
B := 0;
- while (Count > 0) do begin
- if CatSongs.Song[B].Visible then begin
+ while (Count > 0) do
+ begin
+ if CatSongs.Song[B].Visible then
+ begin
Button[B].Visible := true;
Button[B].Y := 140 + (Placed) * 60;
Inc(Placed);
@@ -1020,10 +1043,13 @@ begin
end;
end;
- if Typ = 2 then begin
+ if Typ = 2 then
+ begin
B := High(Button);
- while (Count > 0) do begin
- if CatSongs.Song[B].Visible then begin
+ while (Count > 0) do
+ begin
+ if CatSongs.Song[B].Visible then
+ begin
Button[B].Visible := true;
Button[B].Y := 140 + (6-Placed) * 60;
Inc(Placed);
@@ -1033,11 +1059,14 @@ begin
end;
end;
- if Typ = 3 then begin
+ if Typ = 3 then
+ begin
B := Src;
Count := 4;
- while (Count > 0) do begin
- if CatSongs.Song[B].Visible then begin
+ while (Count > 0) do
+ begin
+ if CatSongs.Song[B].Visible then
+ begin
Button[B].Visible := true;
Button[B].Y := 140 + (3+Placed) * 60;
Inc(Placed);
@@ -1049,8 +1078,10 @@ begin
B := Src-1;
Placed := 0;
Count := 3;
- while (Count > 0) do begin
- if CatSongs.Song[B].Visible then begin
+ while (Count > 0) do
+ begin
+ if CatSongs.Song[B].Visible then
+ begin
Button[B].Visible := true;
Button[B].Y := 140 + (2-Placed) * 60;
Inc(Placed);
@@ -1068,14 +1099,15 @@ end;
procedure TScreenSong.SetScroll2;
var
B: integer;
- //Wsp: integer; // wspolczynnik przesuniecia wzgledem srodka ekranu
- //Wsp2: real;
+ //Factor: integer; // factor of position relative to center of screen
+ //Factor2: real;
begin
- // liniowe
+ // line
for B := 0 to High(Button) do
Button[B].X := 300 + (B - Interaction) * 260;
- if Length(Button) >= 3 then begin
+ if Length(Button) >= 3 then
+ begin
if Interaction = 0 then
Button[High(Button)].X := 300 - 260;
@@ -1083,12 +1115,13 @@ begin
Button[0].X := 300 + 260;
end;
- // kolowe
+ // circle
{
- for B := 0 to High(Button) do begin
- Wsp := (B - Interaction); // 0 dla srodka, -1 dla lewego, +1 dla prawego itd.
- Wsp2 := Wsp / Length(Button);
- Button[B].X := 300 + 10000 * sin(2*pi*Wsp2);
+ for B := 0 to High(Button) do
+ begin
+ Factor := (B - Interaction); // 0 to center, -1: to left, +1 to right
+ Factor2 := Factor / Length(Button);
+ Button[B].X := 300 + 10000 * sin(2*pi*Factor2);
//Button[B].Y := 140 + 50 * ;
end;
}
@@ -1098,23 +1131,24 @@ end;
procedure TScreenSong.SetScroll3; // with slide
var
B: integer;
- //Wsp: integer; // wspolczynnik przesuniecia wzgledem srodka ekranu
- //Wsp2: real;
+ //Factor: integer; // factor of position relative to center of screen
+ //Factor2: real;
begin
SongTarget := Interaction;
- // liniowe
+ // line
for B := 0 to High(Button) do
begin
Button[B].X := 300 + (B - SongCurrent) * 260;
if (Button[B].X < -Button[B].W) or (Button[B].X > 800) then
- Button[B].Visible := False
+ Button[B].Visible := false
else
- Button[B].Visible := True;
+ Button[B].Visible := true;
end;
{
- if Length(Button) >= 3 then begin
+ if Length(Button) >= 3 then
+ begin
if Interaction = 0 then
Button[High(Button)].X := 300 - 260;
@@ -1123,12 +1157,13 @@ begin
end;
}
- // kolowe
+ // circle
{
- for B := 0 to High(Button) do begin
- Wsp := (B - Interaction); // 0 dla srodka, -1 dla lewego, +1 dla prawego itd.
- Wsp2 := Wsp / Length(Button);
- Button[B].X := 300 + 10000 * sin(2*pi*Wsp2);
+ for B := 0 to High(Button) do
+ begin
+ Factor := (B - Interaction); // 0 to center, -1: to left, +1 to right
+ Factor2 := Factor / Length(Button);
+ Button[B].X := 300 + 10000 * sin(2*pi*Factor2);
//Button[B].Y := 140 + 50 * ;
end;
}
@@ -1182,10 +1217,10 @@ procedure TScreenSong.SetScroll5;
var
B: integer;
Angle: real;
- Pos: Real;
+ Pos: real;
VS: integer;
Padding: real;
- X: Real;
+ X: real;
{
Theme.Song.CoverW: circle radius
Theme.Song.CoverX: x-pos. of the left edge of the selected cover
@@ -1257,37 +1292,38 @@ end;
procedure TScreenSong.SetScroll6; // rotate (slotmachine style)
var
B: integer;
- Angle: real;
- Pos: Real;
+ Angle: real;
+ Pos: real;
VS: integer;
- diff: real;
- X: Real;
- Wsp: real;
- Z, Z2: real;
+ diff: real;
+ X: real;
+ Factor: real;
+ Z, Z2: real;
begin
VS := CatSongs.VisibleSongs;
if VS <= 5 then
begin
- // kolowe
+ // circle
for B := 0 to High(Button) do
begin
- Button[B].Visible := CatSongs.Song[B].Visible; // nowe
- if Button[B].Visible then begin // optimization for 1000 songs - updates only visible songs, hiding in tabs becomes useful for maintaing good speed
+ Button[B].Visible := CatSongs.Song[B].Visible;
+ if Button[B].Visible then // optimization for 1000 songs - updates only visible songs, hiding in tabs becomes useful for maintaing good speed
+ begin
+
+ Factor := 2 * pi * (CatSongs.VisibleIndex(B) - SongCurrent) / VS {CatSongs.VisibleSongs};// 0.5.0 (II): takes another 16ms
- Wsp := 2 * pi * (CatSongs.VisibleIndex(B) - SongCurrent) / VS {CatSongs.VisibleSongs};// 0.5.0 (II): takes another 16ms
+ Z := (1 + cos(Factor)) / 2;
+ Z2 := (1 + 2*Z) / 3;
- Z := (1 + cos(Wsp)) / 2;
- Z2 := (1 + 2*Z) / 3;
+ Button[B].Y := Theme.Song.Cover.Y + (0.185 * Theme.Song.Cover.H * VS * sin(Factor)) * Z2 - ((Button[B].H - Theme.Song.Cover.H)/2); // 0.5.0 (I): 2 times faster by not calling CatSongs.VisibleSongs
+ Button[B].Z := Z / 2 + 0.3;
- Button[B].Y := Theme.Song.Cover.Y + (0.185 * Theme.Song.Cover.H * VS * sin(Wsp)) * Z2 - ((Button[B].H - Theme.Song.Cover.H)/2); // 0.5.0 (I): 2 times faster by not calling CatSongs.VisibleSongs
- Button[B].Z := Z / 2 + 0.3;
+ Button[B].W := Theme.Song.Cover.H * Z2;
- Button[B].W := Theme.Song.Cover.H * Z2;
-
- //Button[B].Y := {50 +} 140 + 50 - 50 * Z2;
- Button[B].X := Theme.Song.Cover.X + (Theme.Song.Cover.H - Abs(Button[B].H)) * 0.7 ;
- Button[B].H := Button[B].W;
+ //Button[B].Y := {50 +} 140 + 50 - 50 * Z2;
+ Button[B].X := Theme.Song.Cover.X + (Theme.Song.Cover.H - Abs(Button[B].H)) * 0.7 ;
+ Button[B].H := Button[B].W;
end;
end;
end
@@ -1295,10 +1331,10 @@ begin
begin
//Change Pos of all Buttons
for B := low(Button) to high(Button) do
- begin
- Button[B].Visible := CatSongs.Song[B].Visible; //Adjust Visibility
+ begin
+ Button[B].Visible := CatSongs.Song[B].Visible; //Adjust Visibility
if Button[B].Visible then //Only Change Pos for Visible Buttons
- begin
+ begin
Pos := (CatSongs.VisibleIndex(B) - SongCurrent);
if (Pos < -VS/2) then
Pos := Pos + VS
@@ -1308,7 +1344,7 @@ begin
if (Abs(Pos) < 2.5) then {fixed Positions}
begin
Angle := Pi * (Pos / 5);
- //Button[B].Visible := False;
+ //Button[B].Visible := false;
Button[B].H := Abs(Theme.Song.Cover.H * cos(Angle*0.8));//Power(Z2, 3);
@@ -1331,8 +1367,10 @@ begin
begin {Behind the Front Covers}
// limit-bg-covers hack
- if (abs(VS/2-abs(Pos))>10) then Button[B].Visible:=False;
- if VS > 25 then VS:=25;
+ if (abs(VS/2-abs(Pos))>10) then
+ Button[B].Visible := false;
+ if VS > 25 then
+ VS:=25;
// end of limit-bg-covers hack
if Pos < 0 then
@@ -1375,7 +1413,7 @@ begin
if Ini.Players = 4 then PlayersPlay := 6;
//Cat Mod etc
- if (Ini.Tabs_at_startup = 1) and (CatSongs.CatNumShow = -1) then
+ if (Ini.TabsAtStartup = 1) and (CatSongs.CatNumShow = -1) then
begin
CatSongs.ShowCategoryList;
FixSelected;
@@ -1450,9 +1488,9 @@ end;
function TScreenSong.Draw: boolean;
var
- dx: real;
- dt: real;
- I: Integer;
+ dx: real;
+ dt: real;
+ I: integer;
begin
dx := SongTarget-SongCurrent;
dt := TimeSkip * 7;
@@ -1463,7 +1501,8 @@ begin
SongCurrent := SongCurrent + dx*dt;
{
- if SongCurrent > Catsongs.VisibleSongs then begin
+ if SongCurrent > Catsongs.VisibleSongs then
+ begin
SongCurrent := SongCurrent - Catsongs.VisibleSongs;
SongTarget := SongTarget - Catsongs.VisibleSongs;
end;
@@ -1529,8 +1568,8 @@ end;
procedure TScreenSong.SelectNext;
var
- Skip: integer;
- VS: Integer;
+ Skip: integer;
+ VS: integer;
begin
VS := CatSongs.VisibleSongs;
@@ -1549,22 +1588,23 @@ begin
Interaction := (Interaction + Skip) mod Length(Interactions);
// try to keep all at the beginning
- if SongTarget > VS-1 then begin
+ if SongTarget > VS-1 then
+ begin
SongTarget := SongTarget - VS;
SongCurrent := SongCurrent - VS;
end;
end;
- // Interaction -> Button, ktorego okladke przeczytamy
+ // Interaction -> Button, load cover
// show uncached texture
//Button[Interaction].Texture := Texture.GetTexture(Button[Interaction].Texture.Name, TEXTURE_TYPE_PLAIN, false);
end;
procedure TScreenSong.SelectPrev;
var
- Skip: integer;
- VS: Integer;
+ Skip: integer;
+ VS: integer;
begin
VS := CatSongs.VisibleSongs;
@@ -1574,13 +1614,15 @@ begin
Skip := 1;
- while (not CatSongs.Song[(Interaction - Skip + Length(Interactions)) mod Length(Interactions)].Visible) do Inc(Skip);
+ while (not CatSongs.Song[(Interaction - Skip + Length(Interactions)) mod Length(Interactions)].Visible) do
+ Inc(Skip);
SongTarget := SongTarget - 1;//Skip;
Interaction := (Interaction - Skip + Length(Interactions)) mod Length(Interactions);
// try to keep all at the beginning
- if SongTarget < 0 then begin
+ if SongTarget < 0 then
+ begin
SongTarget := SongTarget + CatSongs.VisibleSongs;
SongCurrent := SongCurrent + CatSongs.VisibleSongs;
end;
@@ -1660,9 +1702,9 @@ begin
end;
end;
-procedure TScreenSong.SkipTo(Target: Cardinal);
+procedure TScreenSong.SkipTo(Target: cardinal);
var
- i: integer;
+ i: integer;
begin
UnLoadDetailedCover;
@@ -1677,13 +1719,13 @@ end;
procedure TScreenSong.SelectRandomSong;
var
- I, I2: Integer;
+ I, I2: integer;
begin
case PlaylistMan.Mode of
smNormal: //All Songs Just Select Random Song
begin
//When Tabs are activated then use Tab Method
- if (Ini.Tabs_at_startup = 1) then
+ if (Ini.TabsAtStartup = 1) then
begin
repeat
I2 := Random(high(CatSongs.Song)+1) - low(CatSongs.Song)+1;
@@ -1756,11 +1798,11 @@ begin
end
else
begin
- Static[StaticTeam1Joker1].Visible := False;
- Static[StaticTeam1Joker2].Visible := False;
- Static[StaticTeam1Joker3].Visible := False;
- Static[StaticTeam1Joker4].Visible := False;
- Static[StaticTeam1Joker5].Visible := False;
+ Static[StaticTeam1Joker1].Visible := false;
+ Static[StaticTeam1Joker2].Visible := false;
+ Static[StaticTeam1Joker3].Visible := false;
+ Static[StaticTeam1Joker4].Visible := false;
+ Static[StaticTeam1Joker5].Visible := false;
end;
if (PartySession.Teams.NumTeams >= 2) then
@@ -1773,11 +1815,11 @@ begin
end
else
begin
- Static[StaticTeam2Joker1].Visible := False;
- Static[StaticTeam2Joker2].Visible := False;
- Static[StaticTeam2Joker3].Visible := False;
- Static[StaticTeam2Joker4].Visible := False;
- Static[StaticTeam2Joker5].Visible := False;
+ Static[StaticTeam2Joker1].Visible := false;
+ Static[StaticTeam2Joker2].Visible := false;
+ Static[StaticTeam2Joker3].Visible := false;
+ Static[StaticTeam2Joker4].Visible := false;
+ Static[StaticTeam2Joker5].Visible := false;
end;
if (PartySession.Teams.NumTeams >= 3) then
@@ -1790,40 +1832,40 @@ begin
end
else
begin
- Static[StaticTeam3Joker1].Visible := False;
- Static[StaticTeam3Joker2].Visible := False;
- Static[StaticTeam3Joker3].Visible := False;
- Static[StaticTeam3Joker4].Visible := False;
- Static[StaticTeam3Joker5].Visible := False;
+ Static[StaticTeam3Joker1].Visible := false;
+ Static[StaticTeam3Joker2].Visible := false;
+ Static[StaticTeam3Joker3].Visible := false;
+ Static[StaticTeam3Joker4].Visible := false;
+ Static[StaticTeam3Joker5].Visible := false;
end;
*)
end
else
begin //Hide all
- Static[StaticTeam1Joker1].Visible := False;
- Static[StaticTeam1Joker2].Visible := False;
- Static[StaticTeam1Joker3].Visible := False;
- Static[StaticTeam1Joker4].Visible := False;
- Static[StaticTeam1Joker5].Visible := False;
-
- Static[StaticTeam2Joker1].Visible := False;
- Static[StaticTeam2Joker2].Visible := False;
- Static[StaticTeam2Joker3].Visible := False;
- Static[StaticTeam2Joker4].Visible := False;
- Static[StaticTeam2Joker5].Visible := False;
-
- Static[StaticTeam3Joker1].Visible := False;
- Static[StaticTeam3Joker2].Visible := False;
- Static[StaticTeam3Joker3].Visible := False;
- Static[StaticTeam3Joker4].Visible := False;
- Static[StaticTeam3Joker5].Visible := False;
+ Static[StaticTeam1Joker1].Visible := false;
+ Static[StaticTeam1Joker2].Visible := false;
+ Static[StaticTeam1Joker3].Visible := false;
+ Static[StaticTeam1Joker4].Visible := false;
+ Static[StaticTeam1Joker5].Visible := false;
+
+ Static[StaticTeam2Joker1].Visible := false;
+ Static[StaticTeam2Joker2].Visible := false;
+ Static[StaticTeam2Joker3].Visible := false;
+ Static[StaticTeam2Joker4].Visible := false;
+ Static[StaticTeam2Joker5].Visible := false;
+
+ Static[StaticTeam3Joker1].Visible := false;
+ Static[StaticTeam3Joker2].Visible := false;
+ Static[StaticTeam3Joker3].Visible := false;
+ Static[StaticTeam3Joker4].Visible := false;
+ Static[StaticTeam3Joker5].Visible := false;
end;
end;
procedure TScreenSong.SetStatics;
var
- I: Integer;
- Visible: Boolean;
+ I: integer;
+ Visible: boolean;
begin
//Set Visibility of Party Statics and Text
Visible := (Mode = smPartyMode);
@@ -1867,7 +1909,7 @@ begin
CatSongs.Selected := Interaction;
StopMusicPreview();
- ScreenName.Goto_SingScreen := True;
+ ScreenName.Goto_SingScreen := true;
FadeTo(@ScreenName);
end;