aboutsummaryrefslogtreecommitdiffstats
path: root/Game
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-06-10 14:40:20 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-06-10 14:40:20 +0000
commit03c2049c1685ca6ec0046e422d65de1e996fc209 (patch)
treef1900f0431e48c0ebbf5aca115dd72411d8fd75d /Game
parenta7832821f3d5e76a2183a9c3cc4e7d66dff17192 (diff)
downloadusdx-03c2049c1685ca6ec0046e422d65de1e996fc209.tar.gz
usdx-03c2049c1685ca6ec0046e422d65de1e996fc209.tar.xz
usdx-03c2049c1685ca6ec0046e422d65de1e996fc209.zip
Fixed a Bug in ScreenSong Equalizer that causes an Invalid Pointer Exception when US is closed.
Changed Themes to fit the changes git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@258 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game')
-rw-r--r--Game/Code/Screens/UScreenSong.pas7
1 files changed, 4 insertions, 3 deletions
diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas
index 2ce06d7a..87aa122e 100644
--- a/Game/Code/Screens/UScreenSong.pas
+++ b/Game/Code/Screens/UScreenSong.pas
@@ -1533,9 +1533,10 @@ begin
B:=0;
Pos := 0;
- Res := floor(92/Theme.Song.Equalizer.Bands);//How much channels are used for one Band
+ Res := ceil(92/Theme.Song.Equalizer.Bands);//How much channels are used for one Band
+
//Change Lengths
- for I := 0 to 92 do
+ for I := 0 to (Res * Theme.Song.Equalizer.Bands - 1) do
begin
A := floor(I/Res);
@@ -1589,7 +1590,7 @@ begin
PosY := Theme.Song.Equalizer.Y;
PosX := Theme.Song.Equalizer.X;
- For I := 0 to Theme.Song.Equalizer.Bands do
+ For I := 0 to Theme.Song.Equalizer.Bands-1 do
begin
if Theme.Song.Equalizer.Direction then
PosY := Theme.Song.Equalizer.Y //+ (Theme.Song.Equalizer.H + Theme.Song.Equalizer.Space) * Theme.Song.Equalizer.Length