aboutsummaryrefslogtreecommitdiffstats
path: root/src/screens
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-07-18 11:11:57 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-07-18 11:11:57 +0000
commit3a82c1e1f853942d351e3622e6bd64768c9a9553 (patch)
tree20aa8face5eec38c02fa5824f673801427aa4a8f /src/screens
parent1e38a5b1aeaef43c4807113251705a5cc1099ae7 (diff)
downloadusdx-3a82c1e1f853942d351e3622e6bd64768c9a9553.tar.gz
usdx-3a82c1e1f853942d351e3622e6bd64768c9a9553.tar.xz
usdx-3a82c1e1f853942d351e3622e6bd64768c9a9553.zip
some changes to mouse eEgg
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2582 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/screens')
-rw-r--r--src/screens/UScreenCredits.pas15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/screens/UScreenCredits.pas b/src/screens/UScreenCredits.pas
index e396e3be..90c0fa19 100644
--- a/src/screens/UScreenCredits.pas
+++ b/src/screens/UScreenCredits.pas
@@ -98,6 +98,9 @@ type
MouseMoved: boolean;
MouseX, MouseY: double;
+ { saves last x and y angle for easter egg }
+ LogoAngleX, LogoAngleY: single;
+
procedure LoadNameTextures;
{ draw different stages }
@@ -474,10 +477,22 @@ begin
according to mouse position }
if (MouseMoved) then
begin
+ // calculate destination angle
AngleX := 30 * MouseY;
AngleY := 30 * MouseX;
+
+ { move angle towards destination }
+ if not SameValue(LogoAngleX, AngleX, 0.001) then
+ AngleX := LogoAngleX + 0.05 * (AngleX - LogoAngleX);
+
+ if not SameValue(LogoAngleY, AngleY, 0.001) then
+ AngleY := LogoAngleY + 0.05 * (AngleY - LogoAngleY);
end;
+ // save last angle
+ LogoAngleX := AngleX;
+ LogoAngleY := AngleY;
+
DrawLayeredLogo(Separation, Scale, AngleX, AngleY, AngleZ);
{ do some sparkling effects }