aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens/UScreenStatMain.pas
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-08-07 18:09:21 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-08-07 18:09:21 +0000
commit1db7c89df8670ef1129e172fdc8b5534f4b792d6 (patch)
tree7f0f0a8529287ba4c0e71e7648d07f6bdfd25b44 /Game/Code/Screens/UScreenStatMain.pas
parent507d210257a8e92246aae9d7bfa7c62f78d104ce (diff)
downloadusdx-1db7c89df8670ef1129e172fdc8b5534f4b792d6.tar.gz
usdx-1db7c89df8670ef1129e172fdc8b5534f4b792d6.tar.xz
usdx-1db7c89df8670ef1129e172fdc8b5534f4b792d6.zip
- 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
Diffstat (limited to 'Game/Code/Screens/UScreenStatMain.pas')
-rw-r--r--Game/Code/Screens/UScreenStatMain.pas12
1 files changed, 6 insertions, 6 deletions
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]);