aboutsummaryrefslogtreecommitdiffstats
path: root/src/screens/UScreenEditSub.pas
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-02-28 20:56:12 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-02-28 20:56:12 +0000
commit8f2fc12d58f248a7b548c4919c640500c7a4524d (patch)
tree68548fb01c7aab766a61c4fd501fd33ca0253c2b /src/screens/UScreenEditSub.pas
parent10181f2a4db7b9f6a27e6343ac33c69562684623 (diff)
downloadusdx-8f2fc12d58f248a7b548c4919c640500c7a4524d.tar.gz
usdx-8f2fc12d58f248a7b548c4919c640500c7a4524d.tar.xz
usdx-8f2fc12d58f248a7b548c4919c640500c7a4524d.zip
Some cleanup done
moved ScoreFactor to UMusic removed unused field TLines.LyricWidth removed unused field TSong.Category removed some weird and useless code from songloading procedures songloading simplified, commented parts that are difficult to understand some changes to score calculation that assure not more nor less than 10000 Points are gainable. after many tests I could not find any bug in score calculation, at least after these changes. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1610 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/screens/UScreenEditSub.pas')
-rw-r--r--src/screens/UScreenEditSub.pas13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/screens/UScreenEditSub.pas b/src/screens/UScreenEditSub.pas
index 07113363..d30781fe 100644
--- a/src/screens/UScreenEditSub.pas
+++ b/src/screens/UScreenEditSub.pas
@@ -876,9 +876,8 @@ begin
NStart := CurrentNote;
Lines[0].Line[CNew].Start := Lines[0].Line[CStart].Note[NStart].Start;
Lines[0].Line[CNew].Lyric := '';
- Lines[0].Line[CNew].LyricWidth := 0;
Lines[0].Line[CNew].End_ := 0;
- Lines[0].Line[CNew].BaseNote := 0; // 0.5.0: we modify it later in this procedure
+ Lines[0].Line[CNew].BaseNote := 0;//High(Integer); // TODO: High (Integer) will causes a memory exception later in this procedure. Weird!
Lines[0].Line[CNew].HighNote := -1;
SetLength(Lines[0].Line[CNew].Note, 0);
@@ -905,6 +904,16 @@ begin
Lines[0].Line[CStart].Note[NStart-1].Length;
SetLength(Lines[0].Line[CStart].Note, Lines[0].Line[CStart].HighNote + 1);
+ //recalculate BaseNote of the divided Sentence
+ with Lines[0].Line[CStart] do
+ begin
+ BaseNote := High(Integer);
+
+ For N := 0 to HighNote do
+ if Note[N].Tone < BaseNote then
+ BaseNote := Note[N].Tone;
+ end;
+
Lines[0].Current := Lines[0].Current + 1;
CurrentNote := 0;
Lines[0].Line[Lines[0].Current].Note[CurrentNote].Color := 1;