aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorb1indy <b1indy@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-09-01 12:45:08 +0000
committerb1indy <b1indy@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-09-01 12:45:08 +0000
commite5ddd8163c2fa0efefb07e08ba7d0cf392944d16 (patch)
tree9123af0e69b32135d3e1fbe3c138ffd7709929f6
parent789d722dace2725d78479da4edb268440a52959c (diff)
downloadusdx-e5ddd8163c2fa0efefb07e08ba7d0cf392944d16.tar.gz
usdx-e5ddd8163c2fa0efefb07e08ba7d0cf392944d16.tar.xz
usdx-e5ddd8163c2fa0efefb07e08ba7d0cf392944d16.zip
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
Diffstat (limited to '')
-rw-r--r--Game/Code/Screens/UScreenSong.pas16
1 files changed, 11 insertions, 5 deletions
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