From e5ddd8163c2fa0efefb07e08ba7d0cf392944d16 Mon Sep 17 00:00:00 2001 From: b1indy Date: Sat, 1 Sep 2007 12:45:08 +0000 Subject: finally really fixed the covers (i hope) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@356 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenSong.pas | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'Game/Code') diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas index e75ed1ab..cddf864e 100644 --- a/Game/Code/Screens/UScreenSong.pas +++ b/Game/Code/Screens/UScreenSong.pas @@ -1159,9 +1159,9 @@ var Angle: real; Pos: Real; VS: integer; - VS_hack: integer; // visible songs for the diff: real; X: Real; + helper: real; begin VS := CatSongs.VisibleSongs; // cache Visible Songs {Vars @@ -1213,16 +1213,22 @@ 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_hack:=25 else VS_hack:=VS; + if (abs(abs(Pos)-VS/2)>10) then Button[B].Visible:=False; // end of limit-bg-covers hack if Pos < 0 then - Pos := (Pos - VS_hack/2)/VS_hack + Pos := (Pos - VS/2)/VS else - Pos := (Pos + VS_hack/2)/VS_hack; + Pos := (Pos + VS/2)/VS; Angle := pi * Pos*2; + if VS > 24 then + begin + if Angle < 0 then helper:=-1 else helper:=1; + Angle:=2*pi-abs(Angle); + Angle:=Angle*(VS/24); + Angle:=(2*pi-Angle)*helper; + end; Button[B].Z := (0.4 - Abs(Pos/4)) -0.00001; //z < 0.49999 is behind the cover 1 is in front of the covers -- cgit v1.2.3