From 03c2049c1685ca6ec0046e422d65de1e996fc209 Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Sun, 10 Jun 2007 14:40:20 +0000 Subject: 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 --- Game/Code/Screens/UScreenSong.pas | 7 ++++--- Themes/Classic.ini | 2 +- Themes/Deluxe.ini | 2 +- 3 files changed, 6 insertions(+), 5 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 diff --git a/Themes/Classic.ini b/Themes/Classic.ini index 6fdd3651..a437377e 100644 --- a/Themes/Classic.ini +++ b/Themes/Classic.ini @@ -270,7 +270,7 @@ Z=1 PieceW=8 PieceH=3 Space=1 -Bands=4 +Bands=5 Length=7 [SongVideoIcon] diff --git a/Themes/Deluxe.ini b/Themes/Deluxe.ini index 4f63e0bb..4a603b67 100644 --- a/Themes/Deluxe.ini +++ b/Themes/Deluxe.ini @@ -337,7 +337,7 @@ Z=1 PieceW=6 PieceH=6 Space=1 -Bands=5 +Bands=6 Length=18 [SongVideoIcon] -- cgit v1.2.3