aboutsummaryrefslogtreecommitdiffstats
path: root/unicode/src/screens/UScreenTop5.pas
diff options
context:
space:
mode:
Diffstat (limited to 'unicode/src/screens/UScreenTop5.pas')
-rw-r--r--unicode/src/screens/UScreenTop5.pas87
1 files changed, 50 insertions, 37 deletions
diff --git a/unicode/src/screens/UScreenTop5.pas b/unicode/src/screens/UScreenTop5.pas
index ba990dc6..eaa90ab1 100644
--- a/unicode/src/screens/UScreenTop5.pas
+++ b/unicode/src/screens/UScreenTop5.pas
@@ -34,10 +34,10 @@ interface
{$I switches.inc}
uses
- SDL,
SysUtils,
- UMenu,
+ SDL,
UDisplay,
+ UMenu,
UMusic,
USongs,
UThemes;
@@ -45,17 +45,18 @@ uses
type
TScreenTop5 = class(TMenu)
public
- TextLevel: integer;
- TextArtistTitle: integer;
+ TextLevel: integer;
+ TextArtistTitle: integer;
- StaticNumber: array[1..5] of integer;
- TextNumber: array[1..5] of integer;
- TextName: array[1..5] of integer;
- TextScore: array[1..5] of integer;
+ StaticNumber: array[1..5] of integer;
+ TextNumber: array[1..5] of integer;
+ TextName: array[1..5] of integer;
+ TextScore: array[1..5] of integer;
+
+ Fadeout: boolean;
- Fadeout: boolean;
constructor Create; override;
- function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override;
+ function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
procedure onShow; override;
function Draw: boolean; override;
end;
@@ -63,16 +64,18 @@ type
implementation
uses
- UGraphic,
UDataBase,
+ UGraphic,
UMain,
UIni,
+ UNote,
UUnicodeUtils;
-function TScreenTop5.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean;
+function TScreenTop5.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
begin
Result := true;
- If (PressedDown) Then begin
+ if (PressedDown) then
+ begin
// check normal keys
case UCS4UpperCase(CharCode) of
Ord('Q'):
@@ -81,14 +84,15 @@ begin
Exit;
end;
end;
-
+
// check special keys
case PressedKey of
SDLK_ESCAPE,
SDLK_BACKSPACE,
SDLK_RETURN:
begin
- if (not Fadeout) then begin
+ if (not Fadeout) then
+ begin
FadeTo(@ScreenSong);
Fadeout := true;
end;
@@ -103,7 +107,7 @@ end;
constructor TScreenTop5.Create;
var
- I: integer;
+ I: integer;
begin
inherited Create;
@@ -127,8 +131,8 @@ end;
procedure TScreenTop5.onShow;
var
- I: integer;
- PMax: integer;
+ I: integer;
+ PMax: integer;
begin
inherited;
@@ -147,7 +151,8 @@ begin
Text[TextArtistTitle].Text := CurrentSong.Artist + ' - ' + CurrentSong.Title;
- for I := 1 to Length(CurrentSong.Score[Ini.Difficulty]) do begin
+ for I := 1 to Length(CurrentSong.Score[Ini.Difficulty]) do
+ begin
Static[StaticNumber[I]].Visible := true;
Text[TextNumber[I]].Visible := true;
Text[TextName[I]].Visible := true;
@@ -157,7 +162,8 @@ begin
Text[TextScore[I]].Text := IntToStr(CurrentSong.Score[Ini.Difficulty, I-1].Score);
end;
- for I := Length(CurrentSong.Score[Ini.Difficulty])+1 to 5 do begin
+ for I := Length(CurrentSong.Score[Ini.Difficulty])+1 to 5 do
+ begin
Static[StaticNumber[I]].Visible := false;
Text[TextNumber[I]].Visible := false;
Text[TextName[I]].Visible := false;
@@ -169,25 +175,30 @@ end;
function TScreenTop5.Draw: boolean;
//var
-{ Min: real;
- Max: real;
- Wsp: real;
- Wsp2: real;
- Pet: integer;}
-
-{ Item: integer;
- P: integer;
- C: integer;}
+{
+ Min: real;
+ Max: real;
+ Factor: real;
+ Factor2: real;
+
+ Item: integer;
+ P: integer;
+ C: integer;
+}
begin
// Singstar - let it be...... with 6 statics
-(* if PlayersPlay = 6 then begin
- for Item := 4 to 6 do begin
+(*
+ if PlayersPlay = 6 then
+ begin
+ for Item := 4 to 6 do
+ begin
if ScreenAct = 1 then P := Item-4;
if ScreenAct = 2 then P := Item-1;
FillPlayer(Item, P);
-
-{ if ScreenAct = 1 then begin
+{
+ if ScreenAct = 1 then
+ begin
LoadColor(
Static[StaticBoxLightest[Item]].Texture.ColR,
Static[StaticBoxLightest[Item]].Texture.ColG,
@@ -195,16 +206,18 @@ begin
'P1Dark');
end;
- if ScreenAct = 2 then begin
+ if ScreenAct = 2 then
+ begin
LoadColor(
Static[StaticBoxLightest[Item]].Texture.ColR,
Static[StaticBoxLightest[Item]].Texture.ColG,
Static[StaticBoxLightest[Item]].Texture.ColB,
'P4Dark');
- end; }
-
+ end;
+}
end;
- end; *)
+ end;
+*)
Result := inherited Draw;
end;