diff options
author | whiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-02-28 20:56:12 +0000 |
---|---|---|
committer | whiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-02-28 20:56:12 +0000 |
commit | 8f2fc12d58f248a7b548c4919c640500c7a4524d (patch) | |
tree | 68548fb01c7aab766a61c4fd501fd33ca0253c2b /src/screens | |
parent | 10181f2a4db7b9f6a27e6343ac33c69562684623 (diff) | |
download | usdx-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')
-rw-r--r-- | src/screens/UScreenEditSub.pas | 13 | ||||
-rw-r--r-- | src/screens/UScreenSingModi.pas | 1 |
2 files changed, 11 insertions, 3 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; diff --git a/src/screens/UScreenSingModi.pas b/src/screens/UScreenSingModi.pas index 525e06a3..75c7195e 100644 --- a/src/screens/UScreenSingModi.pas +++ b/src/screens/UScreenSingModi.pas @@ -167,7 +167,6 @@ begin Result.Sentence[I].Start := Lines.Line[I].Start; Result.Sentence[I].StartNote := Lines.Line[I].Note[0].Start; Result.Sentence[I].Lyric := Lines.Line[I].Lyric; - Result.Sentence[I].LyricWidth := Lines.Line[I].LyricWidth; Result.Sentence[I].End_ := Lines.Line[I].End_; Result.Sentence[I].BaseNote := Lines.Line[I].BaseNote; Result.Sentence[I].HighNote := Lines.Line[I].HighNote; |