From bcc359df110e8fbd6737aba1e3365f880d1413e4 Mon Sep 17 00:00:00 2001 From: b1indy Date: Wed, 22 Aug 2007 13:40:42 +0000 Subject: limit number of displayed background covers to no more than 21 - need comments on this git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@352 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenSong.pas | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas index 3221f21e..9d3111cb 100644 --- a/Game/Code/Screens/UScreenSong.pas +++ b/Game/Code/Screens/UScreenSong.pas @@ -4,7 +4,7 @@ interface uses UMenu, SDL, UMusic, UFiles, UTime, UDisplay, USongs, SysUtils, ULog, UThemes, UTexture, ULanguage, - ULCD, ULight, UIni; + ULCD, ULight, UIni, TextGL; type TScreenSong = class(TMenu) @@ -1185,7 +1185,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); @@ -1208,13 +1208,16 @@ begin end else begin {Behind the Front Covers} -// Button[B].Visible := False; -// if VS/2-abs(Pos)>VS*0.4 then Button[B].Visible := False; + + // limit-bg-covers hack + 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 - Pos := (Pos - VS/2) /VS + Pos := (Pos - VS/2)/VS else - Pos := (Pos + VS/2) /VS; + Pos := (Pos + VS/2)/VS; Angle := pi * Pos*2; @@ -1381,7 +1384,7 @@ begin Music.SetMusicVolume(Round (CoverTime * Ini.PreviewVolume / Ini.PreviewFading * 10)) else Music.SetMusicVolume(Ini.PreviewVolume * 10); - + end; @@ -1421,6 +1424,16 @@ begin DrawEqualizer; DrawExtensions; + + + glColor4f(1, 1, 1, 1); + SetFontStyle (2); + SetFontItalic(False); + SetFontSize(9); + SetFontPos (5, 0); + glPrint(pAnsiChar(inttostr(floor(CatSongs.VisibleSongs)))); + + end; procedure TScreenSong.SelectNext; -- cgit v1.2.3