aboutsummaryrefslogtreecommitdiffstats
path: root/src/screens/UScreenSong.pas
diff options
context:
space:
mode:
authork-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-04-25 10:09:59 +0000
committerk-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-04-25 10:09:59 +0000
commitc7f5d683c1eae49e30ee42a76557661f57311b9e (patch)
tree84c33e3d2bb59a00d38e156b554f5afcbb763720 /src/screens/UScreenSong.pas
parentc52a15b5fbd7df575d20e1387a435be4873ec6e1 (diff)
downloadusdx-c7f5d683c1eae49e30ee42a76557661f57311b9e.tar.gz
usdx-c7f5d683c1eae49e30ee42a76557661f57311b9e.tar.xz
usdx-c7f5d683c1eae49e30ee42a76557661f57311b9e.zip
Cosmetics. No code change
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1694 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/screens/UScreenSong.pas')
-rw-r--r--src/screens/UScreenSong.pas50
1 files changed, 19 insertions, 31 deletions
diff --git a/src/screens/UScreenSong.pas b/src/screens/UScreenSong.pas
index 8f6fafea..8f4dd5da 100644
--- a/src/screens/UScreenSong.pas
+++ b/src/screens/UScreenSong.pas
@@ -33,7 +33,6 @@ interface
{$I switches.inc}
-
uses
UMenu,
SDL,
@@ -111,7 +110,6 @@ type
StaticNonParty: array of cardinal;
TextNonParty: array of cardinal;
-
constructor Create; override;
procedure SetScroll;
//procedure SetScroll1;
@@ -142,7 +140,7 @@ type
//procedures for Menu
procedure StartSong;
procedure OpenEditor;
- procedure DoJoker(Team: Byte);
+ procedure DoJoker(Team: byte);
procedure SelectPlayers;
procedure UnloadDetailedCover;
@@ -242,14 +240,13 @@ begin
end;
//Show Cat in Top Left Mod End
-
-// Method for input parsing. If False is returned, GetNextWindow
+// 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: WideChar; PressedDown: boolean): boolean;
var
I: integer;
I2: integer;
- SDL_ModState: Word;
+ SDL_ModState: word;
Letter: WideChar;
begin
Result := true;
@@ -455,7 +452,7 @@ begin
//Fix: Not Existing Song selected:
//if (I+1=I2) then
- Inc(I2);
+ Inc(I2);
//Choose Song
SkipTo(I2-I);
@@ -504,7 +501,6 @@ begin
//Show Cat in Top Left Mod
HideCatTL;
-
//Show Wrong Song when Tabs on Fix
SelectNext;
FixSelected;
@@ -610,7 +606,7 @@ begin
begin
I := Interaction;
if I <= 0 then
- I := 1;
+ I := 1;
while not catsongs.Song[I].Main do
begin
@@ -652,7 +648,7 @@ begin
I := Interaction;
I2 := 0;
if I <= 0 then
- I := 1;
+ I := 1;
while not catsongs.Song[I].Main or (I2 = 0) do
begin
@@ -802,7 +798,6 @@ begin
GenerateThumbnails();
-
// Randomize Patch
Randomize;
@@ -957,7 +952,6 @@ begin
if CatSongs.Song[B].Visible then
Inc(VisInt);
-
if VisCount <= 6 then
begin
Typ := 0;
@@ -986,7 +980,6 @@ begin
end;
-
// hide all buttons
for B := 0 to High(Button) do
begin
@@ -1004,7 +997,6 @@ begin
end;
}
-
if Typ = 0 then
begin
for B := 0 to High(Button) do
@@ -1301,20 +1293,19 @@ begin
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
-
- Z := (1 + cos(Factor)) / 2;
- Z2 := (1 + 2*Z) / 3;
+ Factor := 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;
- 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(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].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
@@ -1349,7 +1340,6 @@ begin
Diff := (Button[B].H - Theme.Song.Cover.H)/2;
-
X := Sin(Angle*1.3)*0.9;
Button[B].Y := Theme.Song.Cover.Y + Theme.Song.Cover.W * X - Diff;
@@ -1359,9 +1349,9 @@ begin
// limit-bg-covers hack
if (abs(VS/2-abs(Pos))>10) then
- Button[B].Visible := false;
+ Button[B].Visible := false;
if VS > 25 then
- VS:=25;
+ VS:=25;
// end of limit-bg-covers hack
if Pos < 0 then
@@ -1379,7 +1369,6 @@ begin
Button[B].X := Theme.Song.Cover.X - (Button[B].H - Theme.Song.Cover.H)*0.5;
-
Button[B].DeSelectReflectionspacing := 15 * Button[B].H/Theme.Song.Cover.H;
Button[B].Y := Theme.Song.Cover.Y+Theme.Song.Cover.H/2-Button[b].H/2+Theme.Song.Cover.W/320*(Theme.Song.Cover.H*sin(Angle/2)*1.52);
@@ -1389,7 +1378,6 @@ begin
end;
end;
-
procedure TScreenSong.onShow;
begin
inherited;
@@ -1453,7 +1441,7 @@ begin
AudioPlayback.SetVolume(1.0);
// if preview is deactivated: load musicfile now
- If (IPreviewVolumeVals[Ini.PreviewVolume] = 0) then
+ if (IPreviewVolumeVals[Ini.PreviewVolume] = 0) then
AudioPlayback.Open(CatSongs.Song[Interaction].Path + CatSongs.Song[Interaction].Mp3);
// if hide then stop music (for party mode popup on exit)
@@ -1915,7 +1903,7 @@ begin
end;
//Team No of Team (0-5)
-procedure TScreenSong.DoJoker (Team: Byte);
+procedure TScreenSong.DoJoker (Team: byte);
begin
if (Mode = smPartyMode) and
(PartySession.Teams.NumTeams >= Team + 1) and