From e0c4de18cabd3f1f27376afe389cdd4470ee198d Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Mon, 25 Jun 2007 12:24:53 +0000 Subject: Fixed wrong sentence timings (T in Editor) when last note of a sentence and first note of the next sentence overlap. Fixed 2 Bugs in Midi Converter: Notes were added more than once to txt when the save Button is pressed multiple times Notes are added more than once when open is pressed multiple time Added sentence start calculating to Midi Converter git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@267 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Changelog.german.txt | 7 ++++++- Game/Changelog.txt | 5 ++++- Game/Code/Screens/UScreenEditConvert.pas | 30 ++++++++++++++++++++++++++++++ Game/Code/Screens/UScreenEditSub.pas | 8 ++++++-- 4 files changed, 46 insertions(+), 4 deletions(-) diff --git a/Game/Changelog.german.txt b/Game/Changelog.german.txt index f1289f03..c2237fde 100644 --- a/Game/Changelog.german.txt +++ b/Game/Changelog.german.txt @@ -62,6 +62,7 @@ Upd: Statistiken hinzugef Upd: Einige On Screen Fehler Benachrichtigungen hinzugefügt, die neuen Spielern helfen sollten. Upd: Neuer Erweiterter Options Screen hinzugefügt Upd: Abfrage vor dem Beenden hinzugefügt +Upd: Song Hintergrundbilder können jetzt auch auf voller Bildschrimfläche dargestellt werden. Upd: Im Editor werden jetzt zusätzlich die richtigen Notennamen ausgegeben (C, F#, etc.) Fix: Nahezu keine Abstürze mehr wegen fehlerhaften TXT-Dateien. In Game Popup hinzugefügt und einen Rücksprunk zum Songscreen. @@ -75,7 +76,11 @@ Fix: Backgrounds can be used now in option Screens, too Fix: Unnützer Speicherverbauch wenn ein Song mit Video abgespielt wird. Einige Videodaten blieben im Speicher nachdem der Song beendet wurde. Dies könnte zu einem Out Of Memory Error führen wenn viele Songs mit Video gespielt werden. Fix: Einige Speichernutzungs und Ladezeit Updates - +Fix: Falsche Satzübergänge wenn T im Editor benutzt wurde und sich 2 Noten von verschiedenen + Sätzen überlagerten. +Fix: [Midi Converter]Noten wurden mehrmals hinzugefügt wenn eine Datei mehrmals geöffnet wurde + oder der Save Button mehrmals gedrückt wurde. +Fix: [Midi Converter]Satzübergänge werden nun vom Mide Converter automatisch berechnet. UltraStar 0.5.0 ultra-star.dl.am Mod X-Mas Edition (by Mota und Whiteshark) ----------------------------- diff --git a/Game/Changelog.txt b/Game/Changelog.txt index f1ccb7b3..aafebb25 100644 --- a/Game/Changelog.txt +++ b/Game/Changelog.txt @@ -63,6 +63,7 @@ Upd: Statistic Screen with general Statistics and some Tables: Upd: Add some on Screen Error Messages helping new Peoples Upd: Add Advanced Screen with some new Options. Upd: Add a Question PopUp before exiting +Upd: Add ability to scale Background Images in Singscreen to Fullsize Upd: Show real Note in Editor (C, F#, etc.) Fix: No crashes caused by corrupted Textfiles anymore. Added inGame Errormessage Popup and Jump Back to Songscreen. So even the Party Mode, @@ -76,7 +77,9 @@ Fix: useless Memory usement when Song with Video is Played. When a Song with Vid there was some Memory that was not freeed at the End of the Song. This could have caused too much Memory usement when many Songs with Video are Played. Fix: Some Changes in Memory usement and better Loading speed. - +Fix: Wrong Timings pressing T in Editor if 2 Notes from different Sentences overlap +Fix: [Midi Converter]Notes are added more than once when a File is opened twice or the save button is pressed multiple times. +Fix: [Midi Converter]Sentence Timings are calculated automaticly when Midi File is converted UltraStar 0.5.0 ultra-star.dl.am Mod X-Mas Edition (by Mota und Whiteshark) ----------------------------- diff --git a/Game/Code/Screens/UScreenEditConvert.pas b/Game/Code/Screens/UScreenEditConvert.pas index 92e8544c..f1e3ba32 100644 --- a/Game/Code/Screens/UScreenEditConvert.pas +++ b/Game/Code/Screens/UScreenEditConvert.pas @@ -54,8 +54,10 @@ type BPM: real; Ticks: real; Nuta: array of TNuta; + procedure AddLyric(Start: integer; Tekst: string); procedure Extract; + procedure MidiFile1MidiEvent(event: PMidiEvent); function SelectedNumber: integer; constructor Create; override; @@ -192,6 +194,7 @@ var Nu: integer; NutaTemp: TNuta; Move: integer; + Max, Min: integer; begin // song info Song.Title := ''; @@ -201,6 +204,8 @@ begin SetLength(Song.BPM, 1); Song.BPM[0].BPM := BPM*4; + SetLength(Nuta, 0); + // extract notes for T := 0 to High(ATrack) do begin // if ATrack[T].Hear then begin @@ -265,6 +270,27 @@ begin SetLength(Czesc.Czesc[C].Nuta, 0); Czesc.Czesc[C].IlNut := 0; Czesc.Czesc[C].HighNut := -1; + + //Calculate Start of the Last Sentence + if (C > 0) and (Nu > 0) then + begin + Max := Nuta[Nu].Start; + Min := Nuta[Nu-1].Start + Nuta[Nu-1].Len; + + case (Max - Min) of + 0: Czesc.Czesc[C].Start := Max; + 1: Czesc.Czesc[C].Start := Max; + 2: Czesc.Czesc[C].Start := Max - 1; + 3: Czesc.Czesc[C].Start := Max - 2; + else + if ((Max - Min) > 4) then + Czesc.Czesc[C].Start := Min + 2 + else + Czesc.Czesc[C].Start := Max; + + end; // case + + end; end; // tworzy miejsce na nowa nute @@ -388,7 +414,11 @@ begin SetLength(Channel, 16); for T := 0 to 15 do + begin Channel[T].Name := IntToStr(T+1); + SetLength(Channel[T].Note, 0); + Channel[T].Status := 0; + end; for T := 0 to MidiFile.NumberOfTracks-1 do begin MidiTrack := MidiFile.GetTrack(T); diff --git a/Game/Code/Screens/UScreenEditSub.pas b/Game/Code/Screens/UScreenEditSub.pas index a0adef2c..8a5eaab8 100644 --- a/Game/Code/Screens/UScreenEditSub.pas +++ b/Game/Code/Screens/UScreenEditSub.pas @@ -730,8 +730,12 @@ begin 0: S := Max; 1: S := Max; 2: S := Max - 1; - 3..3: S := Max - 2; - 4..10000: S := Min + 2; // poczatek + 2 + 3: S := Max - 2; + else + if ((Max - Min) > 4) then + S := Min + 2 + else + S := Max; end; // case Czesci[0].Czesc[C].Start := S; -- cgit v1.2.3