From 1db7c89df8670ef1129e172fdc8b5534f4b792d6 Mon Sep 17 00:00:00 2001 From: tobigun Date: Thu, 7 Aug 2008 18:09:21 +0000 Subject: - Introduced TStatType. - Replaced TSQLiteTable with the new TSQLiteUniTable. The ..UniTable-version does not retrieve data at once (this feature is not needed/wanted in most cases). The major advantage of this version is a better handling of datatypes. TSQLiteTable does not handle datatypes correctly (and even crashes) if the field-types are not one of the SQLite types (e.g. an INT(12) field will crash if it accessed by FieldAsInteger, the same applies to "integer" but the upper-case version "INTEGER" works). With TSQLiteUniTable those crashes should not occur. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1228 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenStatMain.pas | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Game/Code/Screens/UScreenStatMain.pas') diff --git a/Game/Code/Screens/UScreenStatMain.pas b/Game/Code/Screens/UScreenStatMain.pas index 9d0349ed..9e581a82 100644 --- a/Game/Code/Screens/UScreenStatMain.pas +++ b/Game/Code/Screens/UScreenStatMain.pas @@ -81,7 +81,7 @@ begin else //One of the Stats Buttons Pressed begin AudioPlayback.PlaySound(SoundLib.Back); - ScreenStatDetail.Typ := Interaction; + ScreenStatDetail.Typ := TStatType(Interaction); FadeTo(@ScreenStatDetail); end; end; @@ -213,12 +213,12 @@ begin %3:d Count of Songs with Video (A3) %4:s Name of the most popular Song} A1 := Songs.SongList.Count; - A2 := Database.GetTotalEntrys(2); + A2 := Database.GetTotalEntrys(stMostSungSong); A3 := SongswithVid; SetLength(Result1, 1); - Database.GetStats(Result1, 2, 1, 0, False); + Database.GetStats(Result1, stMostSungSong, 1, 0, False); A4 := Result1[0].Artist; A5 := Result1[0].Title; @@ -237,13 +237,13 @@ begin %2:d Best Players Score %3:s Best Score Player (Result2) %4:d Best Score} - A1 := Database.GetTotalEntrys(1); + A1 := Database.GetTotalEntrys(stBestSingers); SetLength(Result1, 1); - Database.GetStats(Result1, 1, 1, 0, False); + Database.GetStats(Result1, stBestSingers, 1, 0, False); SetLength(Result2, 1); - Database.GetStats(Result2, 0, 1, 0, False); + Database.GetStats(Result2, stBestScores, 1, 0, False); try Overview := Overview + '\n \n' + Format(Formatstr, [A1, Result1[0].Player, Result1[0].AverageScore, Result2[0].Singer, Result2[0].Score]); -- cgit v1.2.3