From 3de159b0d467f57967642431f96b7d675b004b8e Mon Sep 17 00:00:00 2001 From: brunzelchen Date: Mon, 25 Apr 2011 10:53:52 +0000 Subject: added song quality check git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2829 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenEditSub.pas | 3 +++ Game/Code/Screens/UScreenSong.pas | 37 ++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) (limited to 'Game/Code/Screens') diff --git a/Game/Code/Screens/UScreenEditSub.pas b/Game/Code/Screens/UScreenEditSub.pas index b232ff19..31196d45 100644 --- a/Game/Code/Screens/UScreenEditSub.pas +++ b/Game/Code/Screens/UScreenEditSub.pas @@ -387,6 +387,9 @@ begin if SResult then begin Text[TextDebug].Text := Language.Translate('INFO_FILE_SAVED'); + if not CheckSong then + ScreenPopupError.ShowPopup('This song contains some syntax errors!'); + CatSongs.Song[SongIndex] := AktSong; end else begin diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas index 011e4b26..9b811a62 100644 --- a/Game/Code/Screens/UScreenSong.pas +++ b/Game/Code/Screens/UScreenSong.pas @@ -40,6 +40,7 @@ type ChooseableSongs: integer; isScrolling: boolean; FadeOut: boolean; + ShowSongQuality: boolean; public Sel3: integer; //Selection in party mode (0=current, -1=left, 1=right) @@ -517,6 +518,12 @@ begin Music.EnableVocalRemover; end; + SDLK_I: + begin + if (Mode = smNormal) then + ShowSongQuality := not ShowSongQuality; + end; + SDLK_O: begin if (Mode = smNormal) then @@ -1388,6 +1395,8 @@ begin EqualizerBands[I] := 3; MP3Volume := Ini.PreviewVolume * 10; + + ShowSongQuality := false; end; procedure TScreenSong.ChangeSorting(tabs: boolean; sorting: integer); @@ -2681,6 +2690,34 @@ begin DrawExtensions; + // Song Quality + if ShowSongQuality and not CatSongs.Song[Interaction].Main then + begin + SetFontStyle(0); + SetFontItalic(false); + SetFontSize(6); + + glColor4f(1, 1, 1, 1); + + SetFontPos (525, 80); + glPrint(PChar(FormatFloat('STX: 000%', CatSongs.Song[Interaction].Quality.Syntax))); + + SetFontPos (600, 80); + glPrint(PChar(FormatFloat('BPM: 000%', CatSongs.Song[Interaction].Quality.BPM))); + + SetFontPos (675, 80); + glPrint(PChar(FormatFloat('NGP: 000%', CatSongs.Song[Interaction].Quality.NoteGaps))); + + SetFontPos (525, 95); + glPrint(PChar(FormatFloat('NJP: 000%', CatSongs.Song[Interaction].Quality.NoteJumps))); + + SetFontPos (600, 95); + glPrint(PChar(FormatFloat('SCO: 000%', CatSongs.Song[Interaction].Quality.Scores))); + + SetFontPos (675, 95); + glPrint(PChar(FormatFloat('VAL: 000%', CatSongs.Song[Interaction].Quality.Value))); + end; + StartPreview; end; -- cgit v1.2.3