aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code
diff options
context:
space:
mode:
Diffstat (limited to 'Game/Code')
-rw-r--r--Game/Code/Classes/UDraw.pas225
-rw-r--r--Game/Code/Classes/UGraphicClasses.pas13
-rw-r--r--Game/Code/Classes/UIni.pas11
-rw-r--r--Game/Code/Classes/UMusic.pas13
-rw-r--r--Game/Code/Classes/UThemes.pas121
-rw-r--r--Game/Code/Classes/UVideo.pas16
-rw-r--r--Game/Code/Screens/UScreenPartyNewRoundM2.pas2
-rw-r--r--Game/Code/Screens/UScreenSing.pas709
-rw-r--r--Game/Code/Screens/UScreenSong.pas126
-rw-r--r--Game/Code/UltraStar.bdsproj3
-rw-r--r--Game/Code/lib/acinerella/acinerella.c129
11 files changed, 1050 insertions, 318 deletions
diff --git a/Game/Code/Classes/UDraw.pas b/Game/Code/Classes/UDraw.pas
index 74b8e6b7..ad4ecae7 100644
--- a/Game/Code/Classes/UDraw.pas
+++ b/Game/Code/Classes/UDraw.pas
@@ -20,8 +20,8 @@ type
procedure SingDraw(Alpha: TAlpha);
procedure SingDrawLyricHelper(CP: integer; NR: TRecR);
-procedure SingDrawNotes(NR: TRecR; Alpha: TAlpha);
-procedure SingDrawNotesDuet(NR: TRecR; Alpha: TAlpha);
+procedure SingDrawNotes(P4Mode: boolean; NR: TRecR; Alpha: TAlpha);
+procedure SingDrawNotesDuet(P4Mode: boolean; NR: TRecR; Alpha: TAlpha);
procedure SingModiDraw(PlayerInfo: TPlayerInfo; Alpha: TAlpha);
procedure SingDrawBackground;
procedure SingDrawOscilloscope(X, Y, W, H: real; NrSound: integer);
@@ -645,12 +645,12 @@ var
ab: real;
//FS: real;
- BarAlpha: real;
+ BarAlpha: real;
- TempCol: real;
- Tekst: string;
+ TempCol: real;
+ Tekst: string;
LyricTemp: string;
- PetCz: integer;
+ PetCz: integer;
//SingBar Mod
A: Cardinal;
@@ -658,14 +658,21 @@ var
I: Integer;
//end Singbar Mod
+ P4Mode: boolean;
+
begin
// positions
- if Ini.SingWindow = 0 then begin
- NR.Left := 120;
- end else begin
+ if ((Screens = 1) and (PlayersPlay <= 3)) or (Screens = 2) then
+ begin
NR.Left := 20;
+ NR.Right := 780;
+ P4Mode := false;
+ end else
+ begin
+ NR.Left := 10;
+ NR.Right := 390;
+ P4Mode := true;
end;
- NR.Right := 780;
NR.Width := NR.Right - NR.Left;
NR.WMid := NR.Width / 2;
@@ -685,6 +692,11 @@ begin
begin
SingDrawNoteLines(Nr.Left + 10*ScreenX, Skin_P1_NotesB - 105, Nr.Right + 10*ScreenX, 15, Alpha[0]);
SingDrawNoteLines(Nr.Left + 10*ScreenX, Skin_P2_NotesB - 105, Nr.Right + 10*ScreenX, 15, Alpha[1]);
+ if P4Mode then
+ begin
+ SingDrawNoteLines(400+Nr.Left + 10*ScreenX, Skin_P1_NotesB - 105, 400+Nr.Right + 10*ScreenX, 15, Alpha[0]);
+ SingDrawNoteLines(400+Nr.Left + 10*ScreenX, Skin_P2_NotesB - 105, 400+Nr.Right + 10*ScreenX, 15, Alpha[1]);
+ end;
end;
if (PlayersPlay = 3) or (PlayersPlay = 6) then
@@ -692,6 +704,12 @@ begin
SingDrawNoteLines(Nr.Left + 10*ScreenX, 120, Nr.Right + 10*ScreenX, 12, Alpha[0]);
SingDrawNoteLines(Nr.Left + 10*ScreenX, 245, Nr.Right + 10*ScreenX, 12, Alpha[1]);
SingDrawNoteLines(Nr.Left + 10*ScreenX, 370, Nr.Right + 10*ScreenX, 12, Alpha[0]);
+ if P4Mode then
+ begin
+ SingDrawNoteLines(400+Nr.Left + 10*ScreenX, 120, 400+Nr.Right + 10*ScreenX, 12, Alpha[0]);
+ SingDrawNoteLines(400+Nr.Left + 10*ScreenX, 245, 400+Nr.Right + 10*ScreenX, 12, Alpha[1]);
+ SingDrawNoteLines(400+Nr.Left + 10*ScreenX, 370, 400+Nr.Right + 10*ScreenX, 12, Alpha[0]);
+ end;
end;
// rysuje tekst - new Lyric engine
@@ -772,21 +790,15 @@ begin
end; //if
if PlayersPlay = 1 then
begin
- //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent);
SingDrawSingbar(Theme.Sing.StaticP1SingBar.x, Theme.Sing.StaticP1SingBar.y, Theme.Sing.StaticP1SingBar.w, Theme.Sing.StaticP1SingBar.h , Player[0].ScorePercent, Player[0].ScoreMax, Player[0].ScoreTotalI);
end;
if PlayersPlay = 2 then
begin
- //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent);
- //SingDrawSingbar(620 + 10*ScreenX, 95, 100, 8, Player[1].ScorePercent);
SingDrawSingbar(Theme.Sing.StaticP1TwoPSingBar.x, Theme.Sing.StaticP1TwoPSingBar.y, Theme.Sing.StaticP1TwoPSingBar.w, Theme.Sing.StaticP1TwoPSingBar.h , Player[0].ScorePercent, Player[0].ScoreMax, Player[0].ScoreTotalI);
SingDrawSingbar(Theme.Sing.StaticP2RSingBar.x, Theme.Sing.StaticP2RSingBar.y, Theme.Sing.StaticP2RSingBar.w, Theme.Sing.StaticP2RSingBar.h , Player[1].ScorePercent, Player[1].ScoreMax, Player[1].ScoreTotalI);
end;
if PlayersPlay = 3 then
begin
- //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent);
- //SingDrawSingbar(370 + 10*ScreenX, 95, 100, 8, Player[1].ScorePercent);
- //SingDrawSingbar(670 + 10*ScreenX, 95, 100, 8, Player[2].ScorePercent);
SingDrawSingbar(Theme.Sing.StaticP1ThreePSingBar.x, Theme.Sing.StaticP1ThreePSingBar.y, Theme.Sing.StaticP1ThreePSingBar.w, Theme.Sing.StaticP1ThreePSingBar.h , Player[0].ScorePercent, Player[0].ScoreMax, Player[0].ScoreTotalI);
SingDrawSingbar(Theme.Sing.StaticP2MSingBar.x, Theme.Sing.StaticP2MSingBar.y, Theme.Sing.StaticP2MSingBar.w, Theme.Sing.StaticP2MSingBar.h , Player[1].ScorePercent, Player[1].ScoreMax, Player[1].ScoreTotalI);
SingDrawSingbar(Theme.Sing.StaticP3SingBar.x, Theme.Sing.StaticP3SingBar.y, Theme.Sing.StaticP3SingBar.w, Theme.Sing.StaticP3SingBar.h , Player[2].ScorePercent, Player[2].ScoreMax, Player[2].ScoreTotalI);
@@ -795,35 +807,36 @@ begin
begin
if ScreenAct = 1 then
begin
- //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent);
- //SingDrawSingbar(620 + 10*ScreenX, 95, 100, 8, Player[1].ScorePercent);
- SingDrawSingbar(Theme.Sing.StaticP1TwoPSingBar.x, Theme.Sing.StaticP1TwoPSingBar.y, Theme.Sing.StaticP1TwoPSingBar.w, Theme.Sing.StaticP1TwoPSingBar.h , Player[0].ScorePercent, Player[0].ScoreMax, Player[0].ScoreTotalI);
- SingDrawSingbar(Theme.Sing.StaticP2RSingBar.x, Theme.Sing.StaticP2RSingBar.y, Theme.Sing.StaticP2RSingBar.w, Theme.Sing.StaticP2RSingBar.h , Player[1].ScorePercent, Player[1].ScoreMax, Player[1].ScoreTotalI);
+ SingDrawSingbar(Theme.Sing.StaticP1TwoPSingBar.x, Theme.Sing.StaticP1TwoPSingBar.y, Theme.Sing.StaticP1TwoPSingBar.w, Theme.Sing.StaticP1TwoPSingBar.h , Player[0].ScorePercent, Player[0].ScoreMax, Player[0].ScoreTotalI);
+ SingDrawSingbar(Theme.Sing.StaticP2RSingBar.x, Theme.Sing.StaticP2RSingBar.y, Theme.Sing.StaticP2RSingBar.w, Theme.Sing.StaticP2RSingBar.h , Player[1].ScorePercent, Player[1].ScoreMax, Player[1].ScoreTotalI);
+ if P4Mode then
+ begin
+ SingDrawSingbar(Theme.Sing.StaticP3FourPSingBar.x, Theme.Sing.StaticP3FourPSingBar.y, Theme.Sing.StaticP3FourPSingBar.w, Theme.Sing.StaticP3FourPSingBar.h , Player[2].ScorePercent, Player[2].ScoreMax, Player[2].ScoreTotalI);
+ SingDrawSingbar(Theme.Sing.StaticP4FourPSingBar.x, Theme.Sing.StaticP4FourPSingBar.y, Theme.Sing.StaticP4FourPSingBar.w, Theme.Sing.StaticP4FourPSingBar.h , Player[3].ScorePercent, Player[3].ScoreMax, Player[3].ScoreTotalI);
+ end;
end;
if ScreenAct = 2 then
begin
- //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[2].ScorePercent);
- //SingDrawSingbar(620 + 10*ScreenX, 95, 100, 8, Player[3].ScorePercent);
- SingDrawSingbar(Theme.Sing.StaticP1TwoPSingBar.x, Theme.Sing.StaticP1TwoPSingBar.y, Theme.Sing.StaticP1TwoPSingBar.w, Theme.Sing.StaticP1TwoPSingBar.h , Player[2].ScorePercent, Player[2].ScoreMax, Player[2].ScoreTotalI);
- SingDrawSingbar(Theme.Sing.StaticP2RSingBar.x, Theme.Sing.StaticP2RSingBar.y, Theme.Sing.StaticP2RSingBar.w, Theme.Sing.StaticP2RSingBar.h , Player[3].ScorePercent, Player[3].ScoreMax, Player[3].ScoreTotalI);
+ SingDrawSingbar(Theme.Sing.StaticP1TwoPSingBar.x, Theme.Sing.StaticP1TwoPSingBar.y, Theme.Sing.StaticP1TwoPSingBar.w, Theme.Sing.StaticP1TwoPSingBar.h , Player[2].ScorePercent, Player[2].ScoreMax, Player[2].ScoreTotalI);
+ SingDrawSingbar(Theme.Sing.StaticP2RSingBar.x, Theme.Sing.StaticP2RSingBar.y, Theme.Sing.StaticP2RSingBar.w, Theme.Sing.StaticP2RSingBar.h , Player[3].ScorePercent, Player[3].ScoreMax, Player[3].ScoreTotalI);
end;
end;
if PlayersPlay = 6 then
begin
if ScreenAct = 1 then
begin
- //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent);
- //SingDrawSingbar(370 + 10*ScreenX, 95, 100, 8, Player[1].ScorePercent);
- //SingDrawSingbar(670 + 10*ScreenX, 95, 100, 8, Player[2].ScorePercent);
SingDrawSingbar(Theme.Sing.StaticP1ThreePSingBar.x, Theme.Sing.StaticP1ThreePSingBar.y, Theme.Sing.StaticP1ThreePSingBar.w, Theme.Sing.StaticP1ThreePSingBar.h , Player[0].ScorePercent, Player[0].ScoreMax, Player[0].ScoreTotalI);
SingDrawSingbar(Theme.Sing.StaticP2MSingBar.x, Theme.Sing.StaticP2MSingBar.y, Theme.Sing.StaticP2MSingBar.w, Theme.Sing.StaticP2MSingBar.h , Player[1].ScorePercent, Player[1].ScoreMax, Player[1].ScoreTotalI);
SingDrawSingbar(Theme.Sing.StaticP3SingBar.x, Theme.Sing.StaticP3SingBar.y, Theme.Sing.StaticP3SingBar.w, Theme.Sing.StaticP3SingBar.h , Player[2].ScorePercent, Player[2].ScoreMax, Player[2].ScoreTotalI);
- end;
+ if P4Mode then
+ begin
+ SingDrawSingbar(Theme.Sing.StaticP4SixPSingBar.x, Theme.Sing.StaticP4SixPSingBar.y, Theme.Sing.StaticP4SixPSingBar.w, Theme.Sing.StaticP4SixPSingBar.h , Player[3].ScorePercent, Player[3].ScoreMax, Player[3].ScoreTotalI);
+ SingDrawSingbar(Theme.Sing.StaticP5SingBar.x, Theme.Sing.StaticP5SingBar.y, Theme.Sing.StaticP5SingBar.w, Theme.Sing.StaticP5SingBar.h , Player[4].ScorePercent, Player[4].ScoreMax, Player[4].ScoreTotalI);
+ SingDrawSingbar(Theme.Sing.StaticP6SingBar.x, Theme.Sing.StaticP6SingBar.y, Theme.Sing.StaticP6SingBar.w, Theme.Sing.StaticP6SingBar.h , Player[5].ScorePercent, Player[5].ScoreMax, Player[5].ScoreTotalI);
+ end;
+ end;
if ScreenAct = 2 then
begin
- //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[3].ScorePercent);
- //SingDrawSingbar(370 + 10*ScreenX, 95, 100, 8, Player[4].ScorePercent);
- //SingDrawSingbar(670 + 10*ScreenX, 95, 100, 8, Player[5].ScorePercent);
SingDrawSingbar(Theme.Sing.StaticP1ThreePSingBar.x, Theme.Sing.StaticP1ThreePSingBar.y, Theme.Sing.StaticP1ThreePSingBar.w, Theme.Sing.StaticP1ThreePSingBar.h , Player[3].ScorePercent, Player[3].ScoreMax, Player[3].ScoreTotalI);
SingDrawSingbar(Theme.Sing.StaticP2MSingBar.x, Theme.Sing.StaticP2MSingBar.y, Theme.Sing.StaticP2MSingBar.w, Theme.Sing.StaticP2MSingBar.h , Player[4].ScorePercent, Player[4].ScoreMax, Player[4].ScoreTotalI);
SingDrawSingbar(Theme.Sing.StaticP3SingBar.x, Theme.Sing.StaticP3SingBar.y, Theme.Sing.StaticP3SingBar.w, Theme.Sing.StaticP3SingBar.h , Player[5].ScorePercent, Player[5].ScoreMax, Player[5].ScoreTotalI);
@@ -883,7 +896,7 @@ begin
SingDrawLineBonus( Player[0].LineBonus_PosX, Player[0].LineBonus_PosY, Player[0].LineBonus_Color, Player[0].LineBonus_Alpha, Player[0].LineBonus_Text, Player[0].LineBonus_Age);
SingDrawLineBonus( Player[1].LineBonus_PosX, Player[1].LineBonus_PosY, Player[1].LineBonus_Color, Player[1].LineBonus_Alpha, Player[1].LineBonus_Text, Player[1].LineBonus_Age);
end;
- if ScreenAct = 2 then
+ if P4Mode or (ScreenAct = 2) then
begin
SingDrawLineBonus( Player[2].LineBonus_PosX, Player[2].LineBonus_PosY, Player[2].LineBonus_Color, Player[2].LineBonus_Alpha, Player[2].LineBonus_Text, Player[2].LineBonus_Age);
SingDrawLineBonus( Player[3].LineBonus_PosX, Player[3].LineBonus_PosY, Player[3].LineBonus_Color, Player[3].LineBonus_Alpha, Player[3].LineBonus_Text, Player[3].LineBonus_Age);
@@ -897,7 +910,7 @@ begin
SingDrawLineBonus( Player[1].LineBonus_PosX, Player[1].LineBonus_PosY, Player[1].LineBonus_Color, Player[1].LineBonus_Alpha, Player[1].LineBonus_Text, Player[1].LineBonus_Age);
SingDrawLineBonus( Player[2].LineBonus_PosX, Player[2].LineBonus_PosY, Player[2].LineBonus_Color, Player[2].LineBonus_Alpha, Player[2].LineBonus_Text, Player[2].LineBonus_Age);
end;
- if ScreenAct = 2 then
+ if P4Mode or (ScreenAct = 2) then
begin
SingDrawLineBonus( Player[3].LineBonus_PosX, Player[3].LineBonus_PosY, Player[3].LineBonus_Color, Player[3].LineBonus_Alpha, Player[3].LineBonus_Text, Player[3].LineBonus_Age);
SingDrawLineBonus( Player[4].LineBonus_PosX, Player[4].LineBonus_PosY, Player[4].LineBonus_Color, Player[4].LineBonus_Alpha, Player[4].LineBonus_Text, Player[4].LineBonus_Age);
@@ -926,15 +939,15 @@ begin
end;
if AktSong.isDuet then
- SingDrawNotesDuet(NR, Alpha)
+ SingDrawNotesDuet(P4Mode, NR, Alpha)
else
- SingDrawNotes(NR, Alpha);
+ SingDrawNotes(P4Mode, NR, Alpha);
glDisable(GL_BLEND);
glDisable(GL_TEXTURE_2D);
end;
-procedure SingDrawNotes(NR: TRecR; Alpha: TAlpha);
+procedure SingDrawNotes(P4Mode: boolean; NR: TRecR; Alpha: TAlpha);
begin
if PlayersPlay = 1 then
begin
@@ -975,11 +988,13 @@ begin
if PlayersPlay = 4 then
begin
- if ScreenAct = 1 then begin
+ if ScreenAct = 1 then
+ begin
SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Right - 20, 0, 0, 15, Alpha[0]);
SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Right - 20, 0, 1, 15, Alpha[0]);
end;
- if ScreenAct = 2 then begin
+ if ScreenAct = 2 then
+ begin
SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Right - 20, 0, 2, 15, Alpha[0]);
SingDrawPlayerBGCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Right - 20, 0, 3, 15, Alpha[0]);
end;
@@ -987,26 +1002,43 @@ begin
SingDrawCzesc(NR.Left + 20, Skin_P1_NotesB, NR.Right - 20, 0, 15, Alpha[0]);
SingDrawCzesc(NR.Left + 20, Skin_P2_NotesB, NR.Right - 20, 0, 15, Alpha[0]);
- if ScreenAct = 1 then begin
+ if ScreenAct = 1 then
+ begin
SingDrawPlayerCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Width - 40, 0, 0, 15, Alpha[0]);
SingDrawPlayerCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 0, 1, 15, Alpha[0]);
end;
- if ScreenAct = 2 then begin
+ if ScreenAct = 2 then
+ begin
SingDrawPlayerCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Width - 40, 0, 2, 15, Alpha[0]);
SingDrawPlayerCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 0, 3, 15, Alpha[0]);
end;
+
+ if P4Mode then
+ begin
+ SingDrawPlayerBGCzesc(400+Nr.Left + 20, Skin_P1_NotesB, 400+Nr.Right - 20, 0, 2, 15, Alpha[0]);
+ SingDrawPlayerBGCzesc(400+Nr.Left + 20, Skin_P2_NotesB, 400+Nr.Right - 20, 0, 3, 15, Alpha[0]);
+
+ SingDrawCzesc(400+NR.Left + 20, Skin_P1_NotesB, 400+NR.Right - 20, 0, 15, Alpha[0]);
+ SingDrawCzesc(400+NR.Left + 20, Skin_P2_NotesB, 400+NR.Right - 20, 0, 15, Alpha[0]);
+
+ SingDrawPlayerCzesc(400+Nr.Left + 20, Skin_P1_NotesB, 400+Nr.Width - 40, 0, 2, 15, Alpha[0]);
+ SingDrawPlayerCzesc(400+Nr.Left + 20, Skin_P2_NotesB, 400+Nr.Width - 40, 0, 3, 15, Alpha[0]);
+ end;
end;
- if PlayersPlay = 6 then begin
+ if PlayersPlay = 6 then
+ begin
NotesW := NotesW * 0.8;
NotesH := NotesH * 0.8;
- if ScreenAct = 1 then begin
+ if ScreenAct = 1 then
+ begin
SingDrawPlayerBGCzesc(Nr.Left + 20, 120+95, Nr.Right - 20, 0, 0, 12, Alpha[0]);
SingDrawPlayerBGCzesc(Nr.Left + 20, 245+95, Nr.Right - 20, 0, 1, 12, Alpha[0]);
SingDrawPlayerBGCzesc(Nr.Left + 20, 370+95, Nr.Right - 20, 0, 2, 12, Alpha[0]);
end;
- if ScreenAct = 2 then begin
+ if ScreenAct = 2 then
+ begin
SingDrawPlayerBGCzesc(Nr.Left + 20, 120+95, Nr.Right - 20, 0, 3, 12, Alpha[0]);
SingDrawPlayerBGCzesc(Nr.Left + 20, 245+95, Nr.Right - 20, 0, 4, 12, Alpha[0]);
SingDrawPlayerBGCzesc(Nr.Left + 20, 370+95, Nr.Right - 20, 0, 5, 12, Alpha[0]);
@@ -1016,20 +1048,37 @@ begin
SingDrawCzesc(NR.Left + 20, 245+95, NR.Right - 20, 0, 12, Alpha[0]);
SingDrawCzesc(NR.Left + 20, 370+95, NR.Right - 20, 0, 12, Alpha[0]);
- if ScreenAct = 1 then begin
+ if ScreenAct = 1 then
+ begin
SingDrawPlayerCzesc(Nr.Left + 20, 120+95, Nr.Width - 40, 0, 0, 12, Alpha[0]);
SingDrawPlayerCzesc(Nr.Left + 20, 245+95, Nr.Width - 40, 0, 1, 12, Alpha[0]);
SingDrawPlayerCzesc(Nr.Left + 20, 370+95, Nr.Width - 40, 0, 2, 12, Alpha[0]);
end;
- if ScreenAct = 2 then begin
+ if ScreenAct = 2 then
+ begin
SingDrawPlayerCzesc(Nr.Left + 20, 120+95, Nr.Width - 40, 0, 3, 12, Alpha[0]);
SingDrawPlayerCzesc(Nr.Left + 20, 245+95, Nr.Width - 40, 0, 4, 12, Alpha[0]);
SingDrawPlayerCzesc(Nr.Left + 20, 370+95, Nr.Width - 40, 0, 5, 12, Alpha[0]);
end;
+
+ if P4Mode then
+ begin
+ SingDrawPlayerBGCzesc(400+Nr.Left + 20, 120+95, 400+Nr.Right - 20, 0, 3, 12, Alpha[0]);
+ SingDrawPlayerBGCzesc(400+Nr.Left + 20, 245+95, 400+Nr.Right - 20, 0, 4, 12, Alpha[0]);
+ SingDrawPlayerBGCzesc(400+Nr.Left + 20, 370+95, 400+Nr.Right - 20, 0, 5, 12, Alpha[0]);
+
+ SingDrawCzesc(400+NR.Left + 20, 120+95, 400+NR.Right - 20, 0, 12, Alpha[0]);
+ SingDrawCzesc(400+NR.Left + 20, 245+95, 400+NR.Right - 20, 0, 12, Alpha[0]);
+ SingDrawCzesc(400+NR.Left + 20, 370+95, 400+NR.Right - 20, 0, 12, Alpha[0]);
+
+ SingDrawPlayerCzesc(400+Nr.Left + 20, 120+95, 400+Nr.Width - 40, 0, 3, 12, Alpha[0]);
+ SingDrawPlayerCzesc(400+Nr.Left + 20, 245+95, 400+Nr.Width - 40, 0, 4, 12, Alpha[0]);
+ SingDrawPlayerCzesc(400+Nr.Left + 20, 370+95, 400+Nr.Width - 40, 0, 5, 12, Alpha[0]);
+ end;
end;
end;
-procedure SingDrawNotesDuet(NR: TRecR; Alpha: TAlpha);
+procedure SingDrawNotesDuet(P4Mode: boolean; NR: TRecR; Alpha: TAlpha);
begin
if PlayersPlay = 1 then
begin
@@ -1090,6 +1139,18 @@ begin
SingDrawPlayerCzesc(Nr.Left + 20, Skin_P1_NotesB, Nr.Width - 40, 0, 2, 15, Alpha[0]);
SingDrawPlayerCzesc(Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 1, 3, 15, Alpha[1]);
end;
+
+ if P4Mode then
+ begin
+ SingDrawPlayerBGCzesc(400+Nr.Left + 20, Skin_P1_NotesB, 400+Nr.Right - 20, 0, 2, 15, Alpha[0]);
+ SingDrawPlayerBGCzesc(400+Nr.Left + 20, Skin_P2_NotesB, 400+Nr.Right - 20, 1, 3, 15, Alpha[1]);
+
+ SingDrawCzesc(400+NR.Left + 20, Skin_P1_NotesB, 400+NR.Right - 20, 0, 15, Alpha[0]);
+ SingDrawCzesc(400+NR.Left + 20, Skin_P2_NotesB, 400+NR.Right - 20, 1, 15, Alpha[1]);
+
+ SingDrawPlayerCzesc(400+Nr.Left + 20, Skin_P1_NotesB, 400+Nr.Width - 40, 0, 2, 15, Alpha[0]);
+ SingDrawPlayerCzesc(400+Nr.Left + 20, Skin_P2_NotesB, 400+Nr.Width - 40, 1, 3, 15, Alpha[1]);
+ end;
end;
if PlayersPlay = 6 then begin
@@ -1121,6 +1182,21 @@ begin
SingDrawPlayerCzesc(Nr.Left + 20, 245+95, Nr.Width - 40, 1, 4, 12, Alpha[1]);
SingDrawPlayerCzesc(Nr.Left + 20, 370+95, Nr.Width - 40, 0, 5, 12, Alpha[0]);
end;
+
+ if P4Mode then
+ begin
+ SingDrawPlayerBGCzesc(400+Nr.Left + 20, 120+95, 400+Nr.Right - 20, 0, 3, 12, Alpha[0]);
+ SingDrawPlayerBGCzesc(400+Nr.Left + 20, 245+95, 400+Nr.Right - 20, 1, 4, 12, Alpha[1]);
+ SingDrawPlayerBGCzesc(400+Nr.Left + 20, 370+95, 400+Nr.Right - 20, 0, 5, 12, Alpha[0]);
+
+ SingDrawCzesc(400+NR.Left + 20, 120+95, 400+NR.Right - 20, 0, 12, Alpha[0]);
+ SingDrawCzesc(400+NR.Left + 20, 245+95, 400+NR.Right - 20, 1, 12, Alpha[1]);
+ SingDrawCzesc(400+NR.Left + 20, 370+95, 400+NR.Right - 20, 0, 12, Alpha[0]);
+
+ SingDrawPlayerCzesc(400+Nr.Left + 20, 120+95, 400+Nr.Width - 40, 0, 3, 12, Alpha[0]);
+ SingDrawPlayerCzesc(400+Nr.Left + 20, 245+95, 400+Nr.Width - 40, 1, 4, 12, Alpha[1]);
+ SingDrawPlayerCzesc(400+Nr.Left + 20, 370+95, 400+Nr.Width - 40, 0, 5, 12, Alpha[0]);
+ end;
end;
end;
@@ -1155,14 +1231,15 @@ var
begin
// positions
- if Ini.SingWindow = 0 then
+ if ((Screens = 1) and (PlayersPlay <= 3)) or (Screens = 2) then
begin
- NR.Left := 120;
+ NR.Left := 20;
+ NR.Right := 780;
end else
begin
- NR.Left := 20;
+ NR.Left := 10;
+ NR.Right := 390;
end;
- NR.Right := 780;
NR.Width := NR.Right - NR.Left;
NR.WMid := NR.Width / 2;
@@ -1949,45 +2026,19 @@ begin
for I := 1 to num do
begin
if (I<=round(Volume/step)) then
- begin
- glColor4f(0.0, 0.8, 0.0, 0.8);
- glEnable(GL_BLEND);
- glbegin(gl_quads);
- glVertex2f(x+(I-1)*(w/num), y);
- glVertex2f(x+(I-1)*(w/num), y+h);
- glVertex2f(x+(I)*(w/num)-2, y+h);
- glVertex2f(x+(I)*(w/num)-2, y);
- glEnd;
- glDisable(GL_BLEND);
- end else
- begin
+ glColor4f(0.0, 0.8, 0.0, 0.8)
+ else
glColor4f(0.7, 0.7, 0.7, 0.6);
- glEnable(GL_BLEND);
- glbegin(gl_quads);
- glVertex2f(x+(I-1)*(w/num), y);
- glVertex2f(x+(I-1)*(w/num), y+h);
- glVertex2f(x+(I)*(w/num)-2, y+h);
- glVertex2f(x+(I)*(w/num)-2, y);
- glEnd;
- glDisable(GL_BLEND);
- end;
- end;
- {
- //print Text
- str := IntToStr(MP3Volume)+ '%';
-
- glColor4f(1, 1, 1, 1);
-
- h := 8;
- SetFontStyle(1);
- SetFontItalic(false);
- SetFontSize(h);
- w := glTextWidth(PChar(str));
-
- SetFontPos (x+2, y+2);
- txt := Addr(str[1]);
- glPrint(txt); }
+ glEnable(GL_BLEND);
+ glbegin(gl_quads);
+ glVertex2f(x+(I-1)*(w/num), y);
+ glVertex2f(x+(I-1)*(w/num), y+h);
+ glVertex2f(x+(I)*(w/num)-2, y+h);
+ glVertex2f(x+(I)*(w/num)-2, y);
+ glEnd;
+ glDisable(GL_BLEND);
+ end;
end;
end.
diff --git a/Game/Code/Classes/UGraphicClasses.pas b/Game/Code/Classes/UGraphicClasses.pas
index a26ea2f3..ac19af6c 100644
--- a/Game/Code/Classes/UGraphicClasses.pas
+++ b/Game/Code/Classes/UGraphicClasses.pas
@@ -602,12 +602,17 @@ begin
// calculation of coordinates done with hardcoded values like in UDraw.pas
// might need to be adjusted if drawing of SingScreen is modified
// coordinates may still be a bit weird and need adjustment
- if Ini.SingWindow = 0 then begin
- Left := 130;
- end else begin
+
+ if ((Screens = 1) and (PlayersPlay <= 3)) or (Screens = 2) then
+ begin
Left := 30;
+ Right := 770;
+ end else
+ begin
+ Left := 15;
+ Right := 385;
end;
- Right := 770;
+
// spawn effect for every player with a perfect line
for P:=0 to PlayersPlay-1 do
if Player[P].LastSentencePerfect then
diff --git a/Game/Code/Classes/UIni.pas b/Game/Code/Classes/UIni.pas
index 2c84cec3..0f1b26ce 100644
--- a/Game/Code/Classes/UIni.pas
+++ b/Game/Code/Classes/UIni.pas
@@ -31,7 +31,6 @@ type
Depth: integer;
FullScreen: integer;
TextureSize: integer;
- SingWindow: integer;
Oscilloscope: integer;
Spectrum: integer;
Spectrograph: integer;
@@ -138,7 +137,6 @@ const
IFullScreen: array[0..1] of string = ('Off', 'On');
IDepth: array[0..1] of string = ('16 bit', '32 bit');
ITextureSize: array[0..2] of string = ('128', '256', '512');
- ISingWindow: array[0..1] of string = ('Small', 'Big');
//SingBar Mod
IOscilloscope: array[0..2] of string = ('Off', 'Osci', 'Bar');
@@ -340,11 +338,6 @@ begin
for Pet := 0 to High(ITextureSize) do
if Tekst = ITextureSize[Pet] then Ini.TextureSize := Pet;
- // SingWindow
- Tekst := IniFile.ReadString('Graphics', 'SingWindow', 'Big');
- for Pet := 0 to High(ISingWindow) do
- if Tekst = ISingWindow[Pet] then Ini.SingWindow := Pet;
-
// Oscilloscope
Tekst := IniFile.ReadString('Graphics', 'Oscilloscope', 'Bar');
for Pet := 0 to High(IOscilloscope) do
@@ -701,10 +694,6 @@ begin
Tekst := ITextureSize[Ini.TextureSize];
IniFile.WriteString('Graphics', 'TextureSize', Tekst);
- // Sing Window
- Tekst := ISingWindow[Ini.SingWindow];
- IniFile.WriteString('Graphics', 'SingWindow', Tekst);
-
// Oscilloscope
Tekst := IOscilloscope[Ini.Oscilloscope];
IniFile.WriteString('Graphics', 'Oscilloscope', Tekst);
diff --git a/Game/Code/Classes/UMusic.pas b/Game/Code/Classes/UMusic.pas
index 6af444c8..13d7fcb6 100644
--- a/Game/Code/Classes/UMusic.pas
+++ b/Game/Code/Classes/UMusic.pas
@@ -539,12 +539,11 @@ begin
{ MediaPlayer.FileName := Name;
MediaPlayer.Open;}
- Bass := Bass_StreamCreateFile(false, PChar(Name), 0, 0, 0);
+ Bass := Bass_StreamCreateFile(false, PChar(Name), 0, 0, BASS_STREAM_PRESCAN);
if (Bass>0) then
Loaded := true
else
begin
- Loaded := false;
errorCode := BASS_ErrorGetCode();
Log.LogError('Error (' + IntToStr(errorCode) + ') on open File: ' + Name);
end;
@@ -580,7 +579,8 @@ end;
procedure TMusic.Play;
begin
- if Loaded then begin
+ if Loaded then
+ begin
// MediaPlayer.Play;
if Loop then BASS_ChannelPlay(Bass, True); // start from beginning... actually bass itself does not loop, nor does this TMusic Class
BASS_ChannelPlay(Bass, False); // for setting position before playing
@@ -589,7 +589,8 @@ end;
procedure TMusic.Pause; //Pause Mod
begin
- if Loaded then begin
+ if Loaded then
+ begin
BASS_ChannelPause(Bass); // Pauses Song
end;
end;
@@ -607,6 +608,7 @@ procedure TMusic.Close;
begin
Bass_StreamFree(Bass);
DSP_VocalRemover:=0;
+ Loaded := false;
// Player.Free;
// MediaPlayer.Close;
end;
@@ -645,7 +647,8 @@ function TMusic.Finished: boolean;
begin
Result := false;
// if ModeStr[MediaPlayer.Mode] = 'Stopped' then Result := true;
- if BASS_ChannelIsActive(BASS) = BASS_ACTIVE_STOPPED then begin
+ if BASS_ChannelIsActive(BASS) = BASS_ACTIVE_STOPPED then
+ begin
// beep;
Result := true;
end;
diff --git a/Game/Code/Classes/UThemes.pas b/Game/Code/Classes/UThemes.pas
index 12fd5d12..38d11db4 100644
--- a/Game/Code/Classes/UThemes.pas
+++ b/Game/Code/Classes/UThemes.pas
@@ -346,11 +346,6 @@ type
TextTimeText : TThemeText;
//eoa TimeBar mod
- StaticP1: TThemeStatic;
- TextP1: TThemeText;
- StaticP1ScoreBG: TThemeStatic; //Static for ScoreBG
- TextP1Score: TThemeText;
-
//moveable singbar mod
StaticP1SingBar: TThemeStatic;
StaticP1ThreePSingBar: TThemeStatic;
@@ -358,8 +353,19 @@ type
StaticP2RSingBar: TThemeStatic;
StaticP2MSingBar: TThemeStatic;
StaticP3SingBar: TThemeStatic;
+
+ StaticP3FourPSingbar: TThemeStatic;
+ StaticP4FourPSingbar: TThemeStatic;
+ StaticP4SixPSingbar: TThemeStatic;
+ StaticP5Singbar: TThemeStatic;
+ StaticP6Singbar: TThemeStatic;
//eoa moveable singbar
+ StaticP1: TThemeStatic;
+ TextP1: TThemeText;
+ StaticP1ScoreBG: TThemeStatic; //Static for ScoreBG
+ TextP1Score: TThemeText;
+
//added for ps3 skin
//game in 2/4 player modi
StaticP1TwoP: TThemeStatic;
@@ -388,6 +394,39 @@ type
TextP3R: TThemeText;
TextP3RScore: TThemeText;
+ // 4 and 6 player on one screen:
+ StaticP3FourP: TThemeStatic;
+ StaticP3FourPScoreBG: TThemeStatic; //Static for ScoreBG
+ TextP3FourP: TThemeText;
+ TextP3FourPScore: TThemeText;
+
+ StaticP4FourP: TThemeStatic;
+ StaticP4FourPScoreBG: TThemeStatic; //Static for ScoreBG
+ TextP4FourP: TThemeText;
+ TextP4FourPScore: TThemeText;
+
+ StaticP4SixP: TThemeStatic;
+ StaticP4SixPScoreBG: TThemeStatic; //Static for ScoreBG
+ TextP4SixP: TThemeText;
+ TextP4SixPScore: TThemeText;
+
+ StaticP5: TThemeStatic;
+ StaticP5ScoreBG: TThemeStatic; //Static for ScoreBG
+ TextP5: TThemeText;
+ TextP5Score: TThemeText;
+
+ StaticP6: TThemeStatic;
+ StaticP6ScoreBG: TThemeStatic; //Static for ScoreBG
+ TextP6: TThemeText;
+ TextP6Score: TThemeText;
+
+ OFF_P1: integer;
+ OFF_P2: integer;
+ OFF_P3: integer;
+ OFF_P4: integer;
+ OFF_P5: integer;
+ OFF_P6: integer;
+
//Linebonus Translations
LineBonusText: Array [0..8] of String;
@@ -1205,6 +1244,29 @@ begin
ThemeLoadStatic(Sing.StaticP2RSingBar, 'SingP2RSingBar');
ThemeLoadStatic(Sing.StaticP2MSingBar, 'SingP2MSingBar');
ThemeLoadStatic(Sing.StaticP3SingBar, 'SingP3SingBar');
+
+ ThemeLoadStatic(Sing.StaticP3FourPSingbar, 'SingP1TwoPSingBar');
+ ThemeLoadStatic(Sing.StaticP4FourPSingbar, 'SingP2RSingBar');
+ ThemeLoadStatic(Sing.StaticP4SixPSingbar, 'SingP1ThreePSingBar');
+ ThemeLoadStatic(Sing.StaticP5Singbar, 'SingP2MSingBar');
+ ThemeLoadStatic(Sing.StaticP6Singbar, 'SingP3SingBar');
+
+ Sing.OFF_P1 := -20;
+ Sing.OFF_P2 := -180;
+ Sing.OFF_P3 := -380;
+ Sing.OFF_P4 := 380;
+ Sing.OFF_P5 := 180;
+ Sing.OFF_P6 := 20;
+
+ {Sing.StaticP3FourPSingbar.X := Sing.StaticP3FourPSingbar.X +
+ (800-Sing.StaticP3FourPSingbar.X) div 2;
+ Sing.StaticP4FourPSingbar.X := Sing.StaticP4FourPSingbar.X +
+ (800-Sing.StaticP4FourPSingbar.X) div 2;}
+
+ Sing.StaticP4SixPSingbar.X := Sing.StaticP4SixPSingbar.X + Sing.OFF_P4;
+ Sing.StaticP5Singbar.X := Sing.StaticP5Singbar.X + Sing.OFF_P5;
+ Sing.StaticP6Singbar.X := Sing.StaticP6Singbar.X + Sing.OFF_P6;
+
//eoa moveable singbar
ThemeLoadStatic(Sing.StaticP1, 'SingP1Static');
@@ -1213,7 +1275,7 @@ begin
ThemeLoadText(Sing.TextP1Score, 'SingP1TextScore');
//Added for ps3 skin
//This one is shown in 2/4P mode
- //if it exists, otherwise the one Player equivaltents are used
+ //if it exists, otherwise the one Player equivalents are used
if (ThemeIni.SectionExists('SingP1TwoPTextScore')) then
begin
ThemeLoadStatic(Sing.StaticP1TwoP, 'SingP1TwoPStatic');
@@ -1261,6 +1323,53 @@ begin
ThemeLoadStatic(Sing.StaticP3RScoreBG, 'SingP3RStatic2');
ThemeLoadText(Sing.TextP3RScore, 'SingP3RTextScore');
+ // 4 and 6 player on one screen:
+ ThemeLoadStatic(Sing.StaticP3FourP, 'SingP1TwoPStatic');
+ ThemeLoadText(Sing.TextP3FourP, 'SingP1TwoPText');
+ ThemeLoadStatic(Sing.StaticP3FourPScoreBG, 'SingP1TwoPStatic2');
+ ThemeLoadText(Sing.TextP3FourPScore, 'SingP1TwoPTextScore');
+
+ ThemeLoadStatic(Sing.StaticP4FourP, 'SingP2RStatic');
+ ThemeLoadText(Sing.TextP4FourP, 'SingP2RText');
+ ThemeLoadStatic(Sing.StaticP4FourPScoreBG, 'SingP2RStatic2');
+ ThemeLoadText(Sing.TextP4FourPScore, 'SingP2RTextScore');
+
+ ThemeLoadStatic(Sing.StaticP4SixP, 'SingP1ThreePStatic');
+ ThemeLoadText(Sing.TextP4SixP, 'SingP1ThreePText');
+ ThemeLoadStatic(Sing.StaticP4SixPScoreBG, 'SingP1ThreePStatic2');
+ ThemeLoadText(Sing.TextP4SixPScore, 'SingP1ThreePTextScore');
+
+ ThemeLoadStatic(Sing.StaticP5, 'SingP2MStatic');
+ ThemeLoadText(Sing.TextP5, 'SingP2MText');
+ ThemeLoadStatic(Sing.StaticP5ScoreBG, 'SingP2MStatic2');
+ ThemeLoadText(Sing.TextP5Score, 'SingP2MTextScore');
+
+ ThemeLoadStatic(Sing.StaticP6, 'SingP3RStatic');
+ ThemeLoadText(Sing.TextP6, 'SingP3RText');
+ ThemeLoadStatic(Sing.StaticP6ScoreBG, 'SingP3RStatic2');
+ ThemeLoadText(Sing.TextP6Score, 'SingP3RTextScore');
+
+ Sing.StaticP3FourP.X := Sing.StaticP3FourP.X + 400;
+ Sing.StaticP4FourP.X := Sing.StaticP4FourP.X + 400;
+ Sing.TextP3FourP.X := Sing.TextP3FourP.X + 400;
+ Sing.TextP4FourP.X := Sing.TextP4FourP.X + 400;
+
+ Sing.StaticP4SixP.X := Sing.StaticP4SixP.X + Sing.OFF_P4;
+ Sing.StaticP5.X := Sing.StaticP5.X + Sing.OFF_P5;
+ Sing.StaticP6.X := Sing.StaticP6.X + Sing.OFF_P6;
+
+ Sing.StaticP4SixPScoreBG.X := Sing.StaticP4SixPScoreBG.X + Sing.OFF_P4;
+ Sing.StaticP5ScoreBG.X := Sing.StaticP5ScoreBG.X + Sing.OFF_P5;
+ Sing.StaticP6ScoreBG.X := Sing.StaticP6ScoreBG.X + Sing.OFF_P6;
+
+ Sing.TextP4SixP.X := Sing.TextP4SixP.X + Sing.OFF_P4;
+ Sing.TextP5.X := Sing.TextP5.X + Sing.OFF_P5;
+ Sing.TextP6.X := Sing.TextP6.X + Sing.OFF_P6;
+
+ Sing.TextP4SixPScore.X := Sing.TextP4SixPScore.X + Sing.OFF_P4;
+ Sing.TextP5Score.X := Sing.TextP5Score.X + Sing.OFF_P5;
+ Sing.TextP6Score.X := Sing.TextP6Score.X + Sing.OFF_P6;
+
//Line Bonus Texts
Sing.LineBonusText[0] := Language.Translate('POPUP_AWFUL');
Sing.LineBonusText[1] := Sing.LineBonusText[0];
diff --git a/Game/Code/Classes/UVideo.pas b/Game/Code/Classes/UVideo.pas
index 7342314c..6f646093 100644
--- a/Game/Code/Classes/UVideo.pas
+++ b/Game/Code/Classes/UVideo.pas
@@ -154,8 +154,12 @@ begin
SkipLines := 0;
LastSkipLines := 0;
Counter := 0;
- PIXEL_FORMAT := GL_RGB;
- numBytes := 3;
+ numBytes := 4;
+ if (numBytes=3) then
+ PIXEL_FORMAT := GL_BGR
+ else
+ PIXEL_FORMAT := GL_RGBA;
+
EnableVideoDraw := true;
end;
@@ -201,7 +205,11 @@ begin
if videodecoder = nil then
begin
VideoStreamIndex:=I;
- inst^.output_format := AC_OUTPUT_RGB24;
+ if (numBytes=3) then
+ inst^.output_format := AC_OUTPUT_BGR24
+ else
+ inst^.output_format := AC_OUTPUT_BGRA32;
+
videodecoder := ac_create_decoder(inst, I);
end;
end;
@@ -921,7 +929,7 @@ begin
end;
{$endif}
- if Ini.Debug = 1 then
+ if (Ini.Debug = 1) then
begin
glColor4f(0, 0, 0, 0.2);
glbegin(gl_quads);
diff --git a/Game/Code/Screens/UScreenPartyNewRoundM2.pas b/Game/Code/Screens/UScreenPartyNewRoundM2.pas
index 7fe94ac2..de97de72 100644
--- a/Game/Code/Screens/UScreenPartyNewRoundM2.pas
+++ b/Game/Code/Screens/UScreenPartyNewRoundM2.pas
@@ -194,7 +194,7 @@ begin
if PartySessionM2.Option_Plugins then
begin
Text[TextNextRound].Text := Language.Translate('PARTY_ROUND') + ' ' + IntToStr(PartySessionM2.CurRound + 1) +
- ': ' + PartySessionM2.Plugins[PartySessionM2.Rounds[PartySessionM2.CurRound].PluginNr].Name;
+ ': ' + PartySessionM2.Plugins[PartySessionM2.Rounds[PartySessionM2.CurRound].PluginNr].Desc;
end else
Text[TextNextRound].Text := Language.Translate('PARTY_ROUND') + ' ' + IntToStr(PartySessionM2.CurRound + 1);
diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas
index 2844cc46..f840a465 100644
--- a/Game/Code/Screens/UScreenSing.pas
+++ b/Game/Code/Screens/UScreenSing.pas
@@ -11,6 +11,18 @@ type
change_time: real;
end;
+ TPlayerSkin = record
+ StaticP: real;
+ StaticScoreBG : real;
+ TextP: real;
+ TextPScore: real;
+ end;
+
+ TSaveCoords = record
+ Singbar: array[1..6] of real;
+ PlayerS: array[1..6] of TPlayerSkin;
+ end;
+
TScreenSing = class(TMenu)
protected
paused: boolean; //Pause Mod
@@ -30,6 +42,8 @@ type
TextTimeText: integer;
//eoa TimeBar mod
+ SaveCoords: TSaveCoords;
+
StaticP1: integer;
StaticP1ScoreBG: integer;
TextP1: integer;
@@ -44,6 +58,12 @@ type
StaticP2RSingBar: integer;
StaticP2MSingBar: integer;
StaticP3SingBar: integer;
+
+ StaticP3FourPSingbar: integer;
+ StaticP4FourPSingbar: integer;
+ StaticP4SixPSingbar: integer;
+ StaticP5Singbar: integer;
+ StaticP6Singbar: integer;
//eoa moveable singbar
//Added for ps3 skin
@@ -74,6 +94,33 @@ type
TextP3R: integer;
TextP3RScore: integer;
+ // 4 and 6 player on one screen
+ P4Mode: boolean;
+ StaticP3FourP: integer;
+ StaticP3FourPScoreBG: integer;
+ TextP3FourP: integer;
+ TextP3FourPScore: integer;
+
+ StaticP4FourP: integer;
+ StaticP4FourPScoreBG: integer;
+ TextP4FourP: integer;
+ TextP4FourPScore: integer;
+
+ StaticP4SixP: integer;
+ StaticP4SixPScoreBG: integer;
+ TextP4SixP: integer;
+ TextP4SixPScore: integer;
+
+ StaticP5: integer;
+ StaticP5ScoreBG: integer;
+ TextP5: integer;
+ TextP5Score: integer;
+
+ StaticP6: integer;
+ StaticP6ScoreBG: integer;
+ TextP6: integer;
+ TextP6Score: integer;
+
Tex_Background: TTexture;
FadeOut: boolean;
LyricMain: array [0..1] of TLyric;
@@ -275,20 +322,34 @@ begin
TextTimeText := AddText(Theme.Sing.TextTimeText);
//eoa TimeBar mod
- StaticP1 := AddStatic(Theme.Sing.StaticP1);
- StaticP1ScoreBG := AddStatic(Theme.Sing.StaticP1ScoreBG);
- TextP1 := AddText(Theme.Sing.TextP1);
- TextP1Score := AddText(Theme.Sing.TextP1Score);
-
//moveable singbar mod
StaticP1SingBar := AddStatic(Theme.Sing.StaticP1SingBar);
StaticP1ThreePSingBar := AddStatic(Theme.Sing.StaticP1ThreePSingBar);
- StaticP1TwoPSingBar := AddStatic(Theme.Sing.StaticP2RSingBar);
+ StaticP1TwoPSingBar := AddStatic(Theme.Sing.StaticP1TwoPSingBar);
StaticP2RSingBar := AddStatic(Theme.Sing.StaticP2RSingBar);
StaticP2MSingBar := AddStatic(Theme.Sing.StaticP2MSingBar);
StaticP3SingBar := AddStatic(Theme.Sing.StaticP3SingBar);
+
+ StaticP3FourPSingbar := AddStatic(Theme.Sing.StaticP3FourPSingbar);
+ StaticP4FourPSingbar := AddStatic(Theme.Sing.StaticP4FourPSingbar);
+ StaticP4SixPSingbar := AddStatic(Theme.Sing.StaticP4SixPSingbar);
+ StaticP5Singbar := AddStatic(Theme.Sing.StaticP5Singbar);
+ StaticP6Singbar := AddStatic(Theme.Sing.StaticP6Singbar);
+
+ //save coordinates
+ SaveCoords.Singbar[1] := Theme.Sing.StaticP1SingBar.X;
+ SaveCoords.Singbar[2] := Theme.Sing.StaticP1TwoPSingBar.X;
+ SaveCoords.Singbar[3] := Theme.Sing.StaticP1ThreePSingBar.X;
+ SaveCoords.Singbar[4] := Theme.Sing.StaticP2RSingBar.X;
+ SaveCoords.Singbar[5] := Theme.Sing.StaticP2MSingBar.X;
+ SaveCoords.Singbar[6] := Theme.Sing.StaticP3SingBar.X;
//eoa moveable singbar
+ StaticP1 := AddStatic(Theme.Sing.StaticP1);
+ StaticP1ScoreBG := AddStatic(Theme.Sing.StaticP1ScoreBG);
+ TextP1 := AddText(Theme.Sing.TextP1);
+ TextP1Score := AddText(Theme.Sing.TextP1Score);
+
//Added for ps3 skin
//This one is shown in 2/4P mode
StaticP1TwoP := AddStatic(Theme.Sing.StaticP1TwoP);
@@ -318,6 +379,63 @@ begin
TextP3R := AddText(Theme.Sing.TextP3R);
TextP3RScore := AddText(Theme.Sing.TextP3RScore);
+ // 4 and 6 player on one screen:
+ StaticP3FourP := AddStatic(Theme.Sing.StaticP3FourP);
+ StaticP3FourPScoreBG := AddStatic(Theme.Sing.StaticP3FourPScoreBG);
+ TextP3FourP := AddText(Theme.Sing.TextP3FourP);
+ TextP3FourPScore := AddText(Theme.Sing.TextP3FourPScore);
+
+ StaticP4FourP := AddStatic(Theme.Sing.StaticP4FourP);
+ StaticP4FourPScoreBG := AddStatic(Theme.Sing.StaticP4FourPScoreBG);
+ TextP4FourP := AddText(Theme.Sing.TextP4FourP);
+ TextP4FourPScore := AddText(Theme.Sing.TextP4FourPScore);
+
+ StaticP4SixP := AddStatic(Theme.Sing.StaticP4SixP);
+ StaticP4SixPScoreBG := AddStatic(Theme.Sing.StaticP4SixPScoreBG);
+ TextP4SixP := AddText(Theme.Sing.TextP4SixP);
+ TextP4SixPScore := AddText(Theme.Sing.TextP4SixPScore);
+
+ StaticP5 := AddStatic(Theme.Sing.StaticP5);
+ StaticP5ScoreBG := AddStatic(Theme.Sing.StaticP5ScoreBG);
+ TextP5 := AddText(Theme.Sing.TextP5);
+ TextP5Score := AddText(Theme.Sing.TextP5Score);
+
+ StaticP6 := AddStatic(Theme.Sing.StaticP6);
+ StaticP6ScoreBG := AddStatic(Theme.Sing.StaticP6ScoreBG);
+ TextP6 := AddText(Theme.Sing.TextP6);
+ TextP6Score := AddText(Theme.Sing.TextP6Score);
+
+ //save coordinates
+ SaveCoords.PlayerS[1].StaticP := Theme.Sing.StaticP1.X;
+ SaveCoords.PlayerS[1].StaticScoreBG := Theme.Sing.StaticP1ScoreBG.X;
+ SaveCoords.PlayerS[1].TextP := Theme.Sing.TextP1.X;
+ SaveCoords.PlayerS[1].TextPScore := Theme.Sing.TextP1Score.X;
+
+ SaveCoords.PlayerS[2].StaticP := Theme.Sing.StaticP1TwoP.X;
+ SaveCoords.PlayerS[2].StaticScoreBG := Theme.Sing.StaticP1TwoPScoreBG.X;
+ SaveCoords.PlayerS[2].TextP := Theme.Sing.TextP1TwoP.X;
+ SaveCoords.PlayerS[2].TextPScore := Theme.Sing.TextP1TwoPScore.X;
+
+ SaveCoords.PlayerS[3].StaticP := Theme.Sing.StaticP1ThreeP.X;
+ SaveCoords.PlayerS[3].StaticScoreBG := Theme.Sing.StaticP1ThreePScoreBG.X;
+ SaveCoords.PlayerS[3].TextP := Theme.Sing.TextP1ThreeP.X;
+ SaveCoords.PlayerS[3].TextPScore := Theme.Sing.TextP1ThreePScore.X;
+
+ SaveCoords.PlayerS[4].StaticP := Theme.Sing.StaticP2R.X;
+ SaveCoords.PlayerS[4].StaticScoreBG := Theme.Sing.StaticP2RScoreBG.X;
+ SaveCoords.PlayerS[4].TextP := Theme.Sing.TextP2R.X;
+ SaveCoords.PlayerS[4].TextPScore := Theme.Sing.TextP2RScore.X;
+
+ SaveCoords.PlayerS[5].StaticP := Theme.Sing.StaticP2M.X;
+ SaveCoords.PlayerS[5].StaticScoreBG := Theme.Sing.StaticP2MScoreBG.X;
+ SaveCoords.PlayerS[5].TextP := Theme.Sing.TextP2M.X;
+ SaveCoords.PlayerS[5].TextPScore := Theme.Sing.TextP2MScore.X;
+
+ SaveCoords.PlayerS[6].StaticP := Theme.Sing.StaticP3R.X;
+ SaveCoords.PlayerS[6].StaticScoreBG := Theme.Sing.StaticP3RScoreBG.X;
+ SaveCoords.PlayerS[6].TextP := Theme.Sing.TextP3R.X;
+ SaveCoords.PlayerS[6].TextPScore := Theme.Sing.TextP3RScore.X;
+
SongNameStatic := AddStatic(Theme.Sing.StaticSongName);
SongNameText := AddText(Theme.Sing.TextSongName);
@@ -341,6 +459,11 @@ var
V2R: boolean;
V2M: boolean;
V3R: boolean;
+ V3FourP: boolean;
+ V4FourP: boolean;
+ V4SixP: boolean;
+ V5: boolean;
+ V6: boolean;
NR: TRecR; //Line Bonus Mod
begin
Log.LogStatus('Begin', 'onShow');
@@ -375,7 +498,51 @@ begin
SetLength(Player, PlayersPlay);
// Player[0].ScoreTotalI := 0;
- case PlayersPlay of
+ // positions
+ if ((Screens = 1) and (PlayersPlay <= 3)) or (Screens = 2) then
+ begin
+ P4Mode := false;
+ NR.Left := 20;
+ NR.Right := 780;
+
+ Theme.Sing.StaticP1SingBar.X := Round(SaveCoords.Singbar[1]);
+ Theme.Sing.StaticP1TwoPSingBar.X := Round(SaveCoords.Singbar[2]);
+ Theme.Sing.StaticP1ThreePSingBar.X := Round(SaveCoords.Singbar[3]);
+ Theme.Sing.StaticP2RSingBar.X := Round(SaveCoords.Singbar[4]);
+ Theme.Sing.StaticP2MSingBar.X := Round(SaveCoords.Singbar[5]);
+ Theme.Sing.StaticP3SingBar.X := Round(SaveCoords.Singbar[6]);
+
+ Theme.Sing.StaticP1.X := Round(SaveCoords.PlayerS[1].StaticP);
+ Theme.Sing.StaticP1ScoreBG.X := Round(SaveCoords.PlayerS[1].StaticScoreBG);
+ Theme.Sing.TextP1.X := Round(SaveCoords.PlayerS[1].TextP);
+ Theme.Sing.TextP1Score.X := Round(SaveCoords.PlayerS[1].TextPScore);
+
+ Theme.Sing.StaticP1TwoP.X := Round(SaveCoords.PlayerS[2].StaticP);
+ Theme.Sing.StaticP1TwoPScoreBG.X := Round(SaveCoords.PlayerS[2].StaticScoreBG);
+ Theme.Sing.TextP1TwoP.X := Round(SaveCoords.PlayerS[2].TextP);
+ Theme.Sing.TextP1TwoPScore.X := Round(SaveCoords.PlayerS[2].TextPScore);
+
+ Theme.Sing.StaticP1ThreeP.X := Round(SaveCoords.PlayerS[3].StaticP);
+ Theme.Sing.StaticP1ThreePScoreBG.X := Round(SaveCoords.PlayerS[3].StaticScoreBG);
+ Theme.Sing.TextP1ThreeP.X := Round(SaveCoords.PlayerS[3].TextP);
+ Theme.Sing.TextP1ThreePScore.X := Round(SaveCoords.PlayerS[3].TextPScore);
+
+ Theme.Sing.StaticP2R.X := Round(SaveCoords.PlayerS[4].StaticP);
+ Theme.Sing.StaticP2RScoreBG.X := Round(SaveCoords.PlayerS[4].StaticScoreBG);
+ Theme.Sing.TextP2R.X := Round(SaveCoords.PlayerS[4].TextP);
+ Theme.Sing.TextP2RScore.X := Round(SaveCoords.PlayerS[4].TextPScore);
+
+ Theme.Sing.StaticP2M.X := Round(SaveCoords.PlayerS[5].StaticP);
+ Theme.Sing.StaticP2MScoreBG.X := Round(SaveCoords.PlayerS[5].StaticScoreBG);
+ Theme.Sing.TextP2M.X := Round(SaveCoords.PlayerS[5].TextP);
+ Theme.Sing.TextP2MScore.X := Round(SaveCoords.PlayerS[5].TextPScore);
+
+ Theme.Sing.StaticP3R.X := Round(SaveCoords.PlayerS[6].StaticP);
+ Theme.Sing.StaticP3RScoreBG.X := Round(SaveCoords.PlayerS[6].StaticScoreBG);
+ Theme.Sing.TextP3R.X := Round(SaveCoords.PlayerS[6].TextP);
+ Theme.Sing.TextP3RScore.X := Round(SaveCoords.PlayerS[6].TextPScore);
+
+ case PlayersPlay of
1: begin
V1 := true;
V1TwoP := false; //added for ps3 skin
@@ -383,6 +550,11 @@ begin
V2R := false;
V2M := false;
V3R := false;
+ V3FourP := false;
+ V4FourP := false;
+ V4SixP := false;
+ V5 := false;
+ V6 := false;
end;
2: begin
V1 := false;
@@ -391,6 +563,11 @@ begin
V2R := true;
V2M := false;
V3R := false;
+ V3FourP := false;
+ V4FourP := false;
+ V4SixP := false;
+ V5 := false;
+ V6 := false;
end;
3: begin
V1 := false;
@@ -399,6 +576,11 @@ begin
V2R := false;
V2M := true;
V3R := true;
+ V3FourP := false;
+ V4FourP := false;
+ V4SixP := false;
+ V5 := false;
+ V6 := false;
end;
4: begin // double screen
V1 := false;
@@ -407,6 +589,11 @@ begin
V2R := true;
V2M := false;
V3R := false;
+ V3FourP := false;
+ V4FourP := false;
+ V4SixP := false;
+ V5 := false;
+ V6 := false;
end;
6: begin // double screen
V1 := false;
@@ -415,6 +602,11 @@ begin
V2R := false;
V2M := true;
V3R := true;
+ V3FourP := false;
+ V4FourP := false;
+ V4SixP := false;
+ V5 := false;
+ V6 := false;
end;
else begin //should not happen
V1 := true;
@@ -423,20 +615,187 @@ begin
V2R := false;
V2M := false;
V3R := false;
+ V3FourP := false;
+ V4FourP := false;
+ V4SixP := false;
+ V5 := false;
+ V6 := false;
+ end;
+ end;
+ end else
+ begin
+ P4Mode := true;
+ NR.Left := 10;
+ NR.Right := 390;
+
+ Theme.Sing.StaticP1SingBar.X := Round(SaveCoords.Singbar[1]);
+ Theme.Sing.StaticP1TwoPSingBar.X := Round(SaveCoords.Singbar[2]-400);
+ Theme.Sing.StaticP1ThreePSingBar.X := Round(SaveCoords.Singbar[3]+Theme.Sing.OFF_P1);
+ Theme.Sing.StaticP2RSingBar.X := Round(SaveCoords.Singbar[4]-400);
+ Theme.Sing.StaticP2MSingBar.X := Round(SaveCoords.Singbar[5]+Theme.Sing.OFF_P2);
+ Theme.Sing.StaticP3SingBar.X := Round(SaveCoords.Singbar[6]+Theme.Sing.OFF_P3);
+
+ Theme.Sing.StaticP1.X := Round(SaveCoords.PlayerS[1].StaticP);
+ Theme.Sing.StaticP1ScoreBG.X := Round(SaveCoords.PlayerS[1].StaticScoreBG);
+ Theme.Sing.TextP1.X := Round(SaveCoords.PlayerS[1].TextP);
+ Theme.Sing.TextP1Score.X := Round(SaveCoords.PlayerS[1].TextPScore);
+
+ Theme.Sing.StaticP1TwoP.X := Round(SaveCoords.PlayerS[2].StaticP);
+ Theme.Sing.StaticP1TwoPScoreBG.X := Round(SaveCoords.PlayerS[2].StaticScoreBG-400);
+ Theme.Sing.TextP1TwoP.X := Round(SaveCoords.PlayerS[2].TextP);
+ Theme.Sing.TextP1TwoPScore.X := Round(SaveCoords.PlayerS[2].TextPScore-400);
+
+ Theme.Sing.StaticP1ThreeP.X := Round(SaveCoords.PlayerS[3].StaticP+Theme.Sing.OFF_P1);
+ Theme.Sing.StaticP1ThreePScoreBG.X := Round(SaveCoords.PlayerS[3].StaticScoreBG+Theme.Sing.OFF_P1);
+ Theme.Sing.TextP1ThreeP.X := Round(SaveCoords.PlayerS[3].TextP+Theme.Sing.OFF_P1);
+ Theme.Sing.TextP1ThreePScore.X := Round(SaveCoords.PlayerS[3].TextPScore+Theme.Sing.OFF_P1);
+
+ Theme.Sing.StaticP2R.X := Round(SaveCoords.PlayerS[4].StaticP);
+ Theme.Sing.StaticP2RScoreBG.X := Round(SaveCoords.PlayerS[4].StaticScoreBG-400);
+ Theme.Sing.TextP2R.X := Round(SaveCoords.PlayerS[4].TextP);
+ Theme.Sing.TextP2RScore.X := Round(SaveCoords.PlayerS[4].TextPScore-400);
+
+ Theme.Sing.StaticP2M.X := Round(SaveCoords.PlayerS[5].StaticP+Theme.Sing.OFF_P2);
+ Theme.Sing.StaticP2MScoreBG.X := Round(SaveCoords.PlayerS[5].StaticScoreBG+Theme.Sing.OFF_P2);
+ Theme.Sing.TextP2M.X := Round(SaveCoords.PlayerS[5].TextP+Theme.Sing.OFF_P2);
+ Theme.Sing.TextP2MScore.X := Round(SaveCoords.PlayerS[5].TextPScore+Theme.Sing.OFF_P2);
+
+ Theme.Sing.StaticP3R.X := Round(SaveCoords.PlayerS[6].StaticP+Theme.Sing.OFF_P3);
+ Theme.Sing.StaticP3RScoreBG.X := Round(SaveCoords.PlayerS[6].StaticScoreBG+Theme.Sing.OFF_P3);
+ Theme.Sing.TextP3R.X := Round(SaveCoords.PlayerS[6].TextP+Theme.Sing.OFF_P3);
+ Theme.Sing.TextP3RScore.X := Round(SaveCoords.PlayerS[6].TextPScore+Theme.Sing.OFF_P3);
+
+ case PlayersPlay of
+ 1: begin
+ V1 := true;
+ V1TwoP := false; //added for ps3 skin
+ V1ThreeP := false; //added for ps3 skin
+ V2R := false;
+ V2M := false;
+ V3R := false;
+ V3FourP := false;
+ V4FourP := false;
+ V4SixP := false;
+ V5 := false;
+ V6 := false;
end;
+ 2: begin
+ V1 := false;
+ V1TwoP := true; //added for ps3 skin
+ V1ThreeP := false; //added for ps3 skin
+ V2R := true;
+ V2M := false;
+ V3R := false;
+ V3FourP := false;
+ V4FourP := false;
+ V4SixP := false;
+ V5 := false;
+ V6 := false;
+ end;
+ 3: begin
+ V1 := false;
+ V1TwoP := false; //added for ps3 skin
+ V1ThreeP := true; //added for ps3 skin
+ V2R := false;
+ V2M := true;
+ V3R := true;
+ V3FourP := false;
+ V4FourP := false;
+ V4SixP := false;
+ V5 := false;
+ V6 := false;
+ end;
+ 4: begin // double screen
+ V1 := false;
+ V1TwoP := true; //added for ps3 skin
+ V1ThreeP := false; //added for ps3 skin
+ V2R := true;
+ V2M := false;
+ V3R := false;
+ V3FourP := true;
+ V4FourP := true;
+ V4SixP := false;
+ V5 := false;
+ V6 := false;
+ end;
+ 6: begin // double screen
+ V1 := false;
+ V1TwoP := false; //added for ps3 skin
+ V1ThreeP := true; //added for ps3 skin
+ V2R := false;
+ V2M := true;
+ V3R := true;
+ V3FourP := false;
+ V4FourP := false;
+ V4SixP := true;
+ V5 := true;
+ V6 := true;
+ end;
+ else begin //should not happen
+ V1 := true;
+ V1TwoP := false;
+ V1ThreeP := false;
+ V2R := false;
+ V2M := false;
+ V3R := false;
+ V3FourP := false;
+ V4FourP := false;
+ V4SixP := false;
+ V5 := false;
+ V6 := false;
+ end;
+ end;
end;
+ Static[StaticP1].Texture.X := Theme.Sing.StaticP1.X;
+ Static[StaticP1ScoreBG].Texture.X := Theme.Sing.StaticP1ScoreBG.X;
+ Text[TextP1].X := Theme.Sing.TextP1.X;
+ Text[TextP1Score].X := Theme.Sing.TextP1Score.X;
+
+ Static[StaticP1TwoP].Texture.X := Theme.Sing.StaticP1TwoP.X;
+ Static[StaticP1TwoPScoreBG].Texture.X := Theme.Sing.StaticP1TwoPScoreBG.X;
+ Text[TextP1TwoP].X := Theme.Sing.TextP1TwoP.X;
+ Text[TextP1TwoPScore].X := Theme.Sing.TextP1TwoPScore.X;
+
+ Static[StaticP1ThreeP].Texture.X := Theme.Sing.StaticP1ThreeP.X;
+ Static[StaticP1ThreePScoreBG].Texture.X := Theme.Sing.StaticP1ThreePScoreBG.X;
+ Text[TextP1ThreeP].X := Theme.Sing.TextP1ThreeP.X;
+ Text[TextP1ThreePScore].X := Theme.Sing.TextP1ThreePScore.X;
+
+ Static[StaticP2R].Texture.X := Theme.Sing.StaticP2R.X;
+ Static[StaticP2RScoreBG].Texture.X := Theme.Sing.StaticP2RScoreBG.X;
+ Text[TextP2R].X := Theme.Sing.TextP2R.X;
+ Text[TextP2RScore].X := Theme.Sing.TextP2RScore.X;
+
+ Static[StaticP2M].Texture.X := Theme.Sing.StaticP2M.X;
+ Static[StaticP2MScoreBG].Texture.X := Theme.Sing.StaticP2MScoreBG.X;
+ Text[TextP2M].X := Theme.Sing.TextP2M.X;
+ Text[TextP2MScore].X := Theme.Sing.TextP2MScore.X;
+
+ Static[StaticP3R].Texture.X := Theme.Sing.StaticP3R.X;
+ Static[StaticP3RScoreBG].Texture.X := Theme.Sing.StaticP3RScoreBG.X;
+ Text[TextP3R].X := Theme.Sing.TextP3R.X;
+ Text[TextP3RScore].X := Theme.Sing.TextP3RScore.X;
+
+ NR.Width := NR.Right - NR.Left;
+ NR.WMid := NR.Width / 2;
+ NR.Mid := NR.Left + NR.WMid;
+
+
+
//Added for ps3 skin
//This one is shown in 1P mode
Static[StaticP1].Visible := V1;
Static[StaticP1ScoreBG].Visible := V1;
Text[TextP1].Visible := V1;
Text[TextP1Score].Visible := V1;
+
//This one is shown in 2/4P mode
Static[StaticP1TwoP].Visible := V1TwoP;
Static[StaticP1TwoPScoreBG].Visible := V1TwoP;
Text[TextP1TwoP].Visible := V1TwoP;
Text[TextP1TwoPScore].Visible := V1TwoP;
+
//This one is shown in 3/6P mode
Static[StaticP1ThreeP].Visible := V1ThreeP;
Static[StaticP1ThreePScoreBG].Visible := V1ThreeP;
@@ -459,10 +818,35 @@ begin
Text[TextP3R].Visible := V3R;
Text[TextP3RScore].Visible := V3R;
+ Static[StaticP3FourP].Visible := V3FourP;
+ Static[StaticP3FourPScoreBG].Visible := V3FourP;
+ Text[TextP3FourP].Visible := V3FourP;
+ Text[TextP3FourPScore].Visible := V3FourP;
+
+ Static[StaticP4FourP].Visible := V4FourP;
+ Static[StaticP4FourPScoreBG].Visible := V4FourP;
+ Text[TextP4FourP].Visible := V4FourP;
+ Text[TextP4FourPScore].Visible := V4FourP;
+
+ Static[StaticP4SixP].Visible := V4SixP;
+ Static[StaticP4SixPScoreBG].Visible := V4SixP;
+ Text[TextP4SixP].Visible := V4SixP;
+ Text[TextP4SixPScore].Visible := V4SixP;
+
+ Static[StaticP5].Visible := V5;
+ Static[StaticP5ScoreBG].Visible := V5;
+ Text[TextP5].Visible := V5;
+ Text[TextP5Score].Visible := V5;
+
+ Static[StaticP6].Visible := V6;
+ Static[StaticP6ScoreBG].Visible := V6;
+ Text[TextP6].Visible := V6;
+ Text[TextP6Score].Visible := V6;
+
//Set Position of Line Bonus - PhrasenBonus
if (Ini.LineBonus = 1) then //Show Line Bonus at Scores
begin
- Case PlayersPlay of
+ Case PlayersPlay of
1: begin
Player[0].LineBonus_TargetX := Theme.Sing.StaticP1ScoreBG.x;
Player[0].LineBonus_TargetY := Theme.Sing.TextP1Score.Y;
@@ -517,17 +901,33 @@ begin
Player[1].LineBonus_StartX := Theme.Sing.StaticP2RScoreBG.x;
Player[1].LineBonus_StartY := Theme.Sing.TextP2RScore.Y + 65;
- //P3
- Player[2].LineBonus_TargetX := Theme.Sing.StaticP1TwoPScoreBG.x;
- Player[2].LineBonus_TargetY := Theme.Sing.TextP1TwoPScore.Y;
- Player[2].LineBonus_StartX := Theme.Sing.StaticP1TwoPScoreBG.x;
- Player[2].LineBonus_StartY := Theme.Sing.TextP1TwoPScore.Y + 65;
-
- //P4
- Player[3].LineBonus_TargetX := Theme.Sing.StaticP2RScoreBG.x;
- Player[3].LineBonus_TargetY := Theme.Sing.TextP2RScore.Y;
- Player[3].LineBonus_StartX := Theme.Sing.StaticP2RScoreBG.x;
- Player[3].LineBonus_StartY := Theme.Sing.TextP2RScore.Y + 65;
+ if P4Mode then
+ begin
+ //P3
+ Player[2].LineBonus_TargetX := Theme.Sing.StaticP3FourPScoreBG.x;
+ Player[2].LineBonus_TargetY := Theme.Sing.TextP3FourPScore.Y;
+ Player[2].LineBonus_StartX := Theme.Sing.StaticP3FourPScoreBG.x;
+ Player[2].LineBonus_StartY := Theme.Sing.TextP3FourPScore.Y + 65;
+
+ //P4
+ Player[3].LineBonus_TargetX := Theme.Sing.StaticP4FourPScoreBG.x;
+ Player[3].LineBonus_TargetY := Theme.Sing.TextP4FourPScore.Y;
+ Player[3].LineBonus_StartX := Theme.Sing.StaticP4FourPScoreBG.x;
+ Player[3].LineBonus_StartY := Theme.Sing.TextP4FourPScore.Y + 65;
+ end else
+ begin
+ //P3
+ Player[2].LineBonus_TargetX := Theme.Sing.StaticP1TwoPScoreBG.x;
+ Player[2].LineBonus_TargetY := Theme.Sing.TextP1TwoPScore.Y;
+ Player[2].LineBonus_StartX := Theme.Sing.StaticP1TwoPScoreBG.x;
+ Player[2].LineBonus_StartY := Theme.Sing.TextP1TwoPScore.Y + 65;
+
+ //P4
+ Player[3].LineBonus_TargetX := Theme.Sing.StaticP2RScoreBG.x;
+ Player[3].LineBonus_TargetY := Theme.Sing.TextP2RScore.Y;
+ Player[3].LineBonus_StartX := Theme.Sing.StaticP2RScoreBG.x;
+ Player[3].LineBonus_StartY := Theme.Sing.TextP2RScore.Y + 65;
+ end;
end;
6: begin
@@ -549,44 +949,53 @@ begin
Player[2].LineBonus_StartX := Theme.Sing.StaticP3RScoreBG.x;
Player[2].LineBonus_StartY := Theme.Sing.TextP3RScore.Y + 65;
- //P4
- Player[3].LineBonus_TargetX := Theme.Sing.StaticP1ThreePScoreBG.x;
- Player[3].LineBonus_TargetY := Theme.Sing.TextP1ThreePScore.Y;
- Player[3].LineBonus_StartX := Theme.Sing.StaticP1ThreePScoreBG.x;
- Player[3].LineBonus_StartY := Theme.Sing.TextP1ThreePScore.Y + 65;
-
- //P5
- Player[4].LineBonus_TargetX := Theme.Sing.StaticP2MScoreBG.x;
- Player[4].LineBonus_TargetY := Theme.Sing.TextP2MScore.Y;
- Player[4].LineBonus_StartX := Theme.Sing.StaticP2MScoreBG.x;
- Player[4].LineBonus_StartY := Theme.Sing.TextP2MScore.Y + 65;
-
- //P6
- Player[5].LineBonus_TargetX := Theme.Sing.StaticP3RScoreBG.x;
- Player[5].LineBonus_TargetY := Theme.Sing.TextP3RScore.Y;
- Player[5].LineBonus_StartX := Theme.Sing.StaticP3RScoreBG.x;
- Player[5].LineBonus_StartY := Theme.Sing.TextP3RScore.Y + 65;
+ if P4Mode then
+ begin
+ //P4
+ Player[3].LineBonus_TargetX := Theme.Sing.StaticP4SixPScoreBG.x;
+ Player[3].LineBonus_TargetY := Theme.Sing.TextP4SixPScore.Y;
+ Player[3].LineBonus_StartX := Theme.Sing.StaticP4SixPScoreBG.x;
+ Player[3].LineBonus_StartY := Theme.Sing.TextP4SixPScore.Y + 65;
+
+ //P5
+ Player[4].LineBonus_TargetX := Theme.Sing.StaticP5ScoreBG.x;
+ Player[4].LineBonus_TargetY := Theme.Sing.TextP5Score.Y;
+ Player[4].LineBonus_StartX := Theme.Sing.StaticP5ScoreBG.x;
+ Player[4].LineBonus_StartY := Theme.Sing.TextP5Score.Y + 65;
+
+ //P6
+ Player[5].LineBonus_TargetX := Theme.Sing.StaticP6ScoreBG.x;
+ Player[5].LineBonus_TargetY := Theme.Sing.TextP6Score.Y;
+ Player[5].LineBonus_StartX := Theme.Sing.StaticP6ScoreBG.x;
+ Player[5].LineBonus_StartY := Theme.Sing.TextP6Score.Y + 65;
+ end else
+ begin
+ //P4
+ Player[3].LineBonus_TargetX := Theme.Sing.StaticP1ThreePScoreBG.x;
+ Player[3].LineBonus_TargetY := Theme.Sing.TextP1ThreePScore.Y;
+ Player[3].LineBonus_StartX := Theme.Sing.StaticP1ThreePScoreBG.x;
+ Player[3].LineBonus_StartY := Theme.Sing.TextP1ThreePScore.Y + 65;
+
+ //P5
+ Player[4].LineBonus_TargetX := Theme.Sing.StaticP2MScoreBG.x;
+ Player[4].LineBonus_TargetY := Theme.Sing.TextP2MScore.Y;
+ Player[4].LineBonus_StartX := Theme.Sing.StaticP2MScoreBG.x;
+ Player[4].LineBonus_StartY := Theme.Sing.TextP2MScore.Y + 65;
+
+ //P6
+ Player[5].LineBonus_TargetX := Theme.Sing.StaticP3RScoreBG.x;
+ Player[5].LineBonus_TargetY := Theme.Sing.TextP3RScore.Y;
+ Player[5].LineBonus_StartX := Theme.Sing.StaticP3RScoreBG.x;
+ Player[5].LineBonus_StartY := Theme.Sing.TextP3RScore.Y + 65;
+ end;
+ end;
end;
- end;
- end
- else if (Ini.LineBonus = 2) then //Show Line Bonus at Notes
+ end else if (Ini.LineBonus = 2) then //Show Line Bonus at Notes
begin
//SingDrawNoteLines(Nr.Left + 10*ScreenX, 120, Nr.Right + 10*ScreenX, 12);
//SingDrawNoteLines(Nr.Left + 10*ScreenX, 245, Nr.Right + 10*ScreenX, 12);
//SingDrawNoteLines(Nr.Left + 10*ScreenX, 370, Nr.Right + 10*ScreenX, 12);
- // positions
- if Ini.SingWindow = 0 then begin
- NR.Left := 120;
- end else begin
- NR.Left := 20;
- end;
- NR.Right := 780;
-
- NR.Width := NR.Right - NR.Left;
- NR.WMid := NR.Width / 2;
- NR.Mid := NR.Left + NR.WMid;
-
Case PlayersPlay of
1: begin
Player[0].LineBonus_TargetX := Round(Nr.Right + 10*ScreenX - 100);
@@ -642,17 +1051,33 @@ begin
Player[1].LineBonus_StartX := Round(Nr.Right + 10*ScreenX - 100);
Player[1].LineBonus_StartY := Skin_P2_NotesB - 105 + 28;
- //P3
- Player[2].LineBonus_TargetX := Round(Nr.Right + 10*ScreenX - 100);
- Player[2].LineBonus_TargetY := Skin_P1_NotesB - 105 - 65 + 28;
- Player[2].LineBonus_StartX := Round(Nr.Right + 10*ScreenX - 100);
- Player[2].LineBonus_StartY := Skin_P1_NotesB - 105 + 28;
-
- //P4
- Player[3].LineBonus_TargetX := Round(Nr.Right + 10*ScreenX - 100);
- Player[3].LineBonus_TargetY := Skin_P2_NotesB - 105 - 65 + 28;
- Player[3].LineBonus_StartX := Round(Nr.Right + 10*ScreenX - 100);
- Player[3].LineBonus_StartY := Skin_P2_NotesB - 105 + 28;
+ if P4Mode then
+ begin
+ //P3
+ Player[2].LineBonus_TargetX := Round(400 + Nr.Right + 10*ScreenX - 100);
+ Player[2].LineBonus_TargetY := Skin_P1_NotesB - 105 - 65 + 28;
+ Player[2].LineBonus_StartX := Round(400 + Nr.Right + 10*ScreenX - 100);
+ Player[2].LineBonus_StartY := Skin_P1_NotesB - 105 + 28;
+
+ //P4
+ Player[3].LineBonus_TargetX := Round(400 + Nr.Right + 10*ScreenX - 100);
+ Player[3].LineBonus_TargetY := Skin_P2_NotesB - 105 - 65 + 28;
+ Player[3].LineBonus_StartX := Round(400 + Nr.Right + 10*ScreenX - 100);
+ Player[3].LineBonus_StartY := Skin_P2_NotesB - 105 + 28;
+ end else
+ begin
+ //P3
+ Player[2].LineBonus_TargetX := Round(Nr.Right + 10*ScreenX - 100);
+ Player[2].LineBonus_TargetY := Skin_P1_NotesB - 105 - 65 + 28;
+ Player[2].LineBonus_StartX := Round(Nr.Right + 10*ScreenX - 100);
+ Player[2].LineBonus_StartY := Skin_P1_NotesB - 105 + 28;
+
+ //P4
+ Player[3].LineBonus_TargetX := Round(Nr.Right + 10*ScreenX - 100);
+ Player[3].LineBonus_TargetY := Skin_P2_NotesB - 105 - 65 + 28;
+ Player[3].LineBonus_StartX := Round(Nr.Right + 10*ScreenX - 100);
+ Player[3].LineBonus_StartY := Skin_P2_NotesB - 105 + 28;
+ end;
end;
6: begin
@@ -674,28 +1099,87 @@ begin
Player[2].LineBonus_StartX := Round(Nr.Right + 10*ScreenX - 100);
Player[2].LineBonus_StartY := 370 + 28;
- //P4
- Player[3].LineBonus_TargetX := Round(Nr.Right + 10*ScreenX - 100);
- Player[3].LineBonus_TargetY := 120 - 65 + 28;
- Player[3].LineBonus_StartX := Round(Nr.Right + 10*ScreenX - 100);
- Player[3].LineBonus_StartY := 120 + 28;
-
- //P5
- Player[4].LineBonus_TargetX := Round(Nr.Right + 10*ScreenX - 100);
- Player[4].LineBonus_TargetY := 245 - 65 + 28;
- Player[4].LineBonus_StartX := Round(Nr.Right + 10*ScreenX - 100);
- Player[4].LineBonus_StartY := 245 + 28;
-
- //P6
- Player[5].LineBonus_TargetX := Round(Nr.Right + 10*ScreenX - 100);
- Player[5].LineBonus_TargetY := 370 - 65 + 28;
- Player[5].LineBonus_StartX := Round(Nr.Right + 10*ScreenX - 100);
- Player[5].LineBonus_StartY := 370 + 28;
+ if P4Mode then
+ begin
+ //P4
+ Player[3].LineBonus_TargetX := Round(400 + Nr.Right + 10*ScreenX - 100);
+ Player[3].LineBonus_TargetY := 120 - 65 + 28;
+ Player[3].LineBonus_StartX := Round(400 + Nr.Right + 10*ScreenX - 100);
+ Player[3].LineBonus_StartY := 120 + 28;
+
+ //P5
+ Player[4].LineBonus_TargetX := Round(400 + Nr.Right + 10*ScreenX - 100);
+ Player[4].LineBonus_TargetY := 245 - 65 + 28;
+ Player[4].LineBonus_StartX := Round(400 + Nr.Right + 10*ScreenX - 100);
+ Player[4].LineBonus_StartY := 245 + 28;
+
+ //P6
+ Player[5].LineBonus_TargetX := Round(400 + Nr.Right + 10*ScreenX - 100);
+ Player[5].LineBonus_TargetY := 370 - 65 + 28;
+ Player[5].LineBonus_StartX := Round(400 + Nr.Right + 10*ScreenX - 100);
+ Player[5].LineBonus_StartY := 370 + 28;
+ end else
+ begin
+ //P4
+ Player[3].LineBonus_TargetX := Round(Nr.Right + 10*ScreenX - 100);
+ Player[3].LineBonus_TargetY := 120 - 65 + 28;
+ Player[3].LineBonus_StartX := Round(Nr.Right + 10*ScreenX - 100);
+ Player[3].LineBonus_StartY := 120 + 28;
+
+ //P5
+ Player[4].LineBonus_TargetX := Round(Nr.Right + 10*ScreenX - 100);
+ Player[4].LineBonus_TargetY := 245 - 65 + 28;
+ Player[4].LineBonus_StartX := Round(Nr.Right + 10*ScreenX - 100);
+ Player[4].LineBonus_StartY := 245 + 28;
+
+ //P6
+ Player[5].LineBonus_TargetX := Round(Nr.Right + 10*ScreenX - 100);
+ Player[5].LineBonus_TargetY := 370 - 65 + 28;
+ Player[5].LineBonus_StartX := Round(Nr.Right + 10*ScreenX - 100);
+ Player[5].LineBonus_StartY := 370 + 28;
+ end;
end;
end;
end;
//Set Position of Line Bonus - PhrasenBonus End
+ if (PlayersPlay=6) then
+ begin
+ LoadColor(Static[StaticP4SixP].Texture.ColR, Static[StaticP4SixP].Texture.ColG,
+ Static[StaticP4SixP].Texture.ColB, 'P4Dark');
+ LoadColor(Static[StaticP5].Texture.ColR, Static[StaticP5].Texture.ColG,
+ Static[StaticP5].Texture.ColB, 'P5Dark');
+ LoadColor(Static[StaticP6].Texture.ColR, Static[StaticP6].Texture.ColG,
+ Static[StaticP6].Texture.ColB, 'P6Dark');
+
+ LoadColor(Static[StaticP4SixPScoreBG].Texture.ColR, Static[StaticP4SixPScoreBG].Texture.ColG,
+ Static[StaticP4SixPScoreBG].Texture.ColB, 'P4Dark');
+ LoadColor(Static[StaticP5ScoreBG].Texture.ColR, Static[StaticP5ScoreBG].Texture.ColG,
+ Static[StaticP5ScoreBG].Texture.ColB, 'P5Dark');
+ LoadColor(Static[StaticP6ScoreBG].Texture.ColR, Static[StaticP6ScoreBG].Texture.ColG,
+ Static[StaticP6ScoreBG].Texture.ColB, 'P6Dark');
+
+ Text[TextP4SixP].Text := 'P4';
+ Text[TextP5].Text := 'P5';
+ Text[TextP6].Text := 'P6';
+ end;
+
+ if (PlayersPlay=4) then
+ begin
+ LoadColor(Static[StaticP3FourP].Texture.ColR, Static[StaticP3FourP].Texture.ColG,
+ Static[StaticP3FourP].Texture.ColB, 'P3Dark');
+ LoadColor(Static[StaticP4FourP].Texture.ColR, Static[StaticP4FourP].Texture.ColG,
+ Static[StaticP4FourP].Texture.ColB, 'P4Dark');
+
+ LoadColor(Static[StaticP3FourPScoreBG].Texture.ColR, Static[StaticP3FourPScoreBG].Texture.ColG,
+ Static[StaticP3FourPScoreBG].Texture.ColB, 'P3Dark');
+ LoadColor(Static[StaticP4FourPScoreBG].Texture.ColR, Static[StaticP4FourPScoreBG].Texture.ColG,
+ Static[StaticP4FourPScoreBG].Texture.ColB, 'P4Dark');
+
+ Text[TextP3FourP].Text := 'P3';
+ Text[TextP4FourP].Text := 'P4';
+ end;
+
LoadNextSong;
Log.LogStatus('End', 'onShow');
@@ -1206,7 +1690,7 @@ begin
// stereo
// weird stuff, maybe this is for "dual screen?", but where is player three then?
- Static[StaticP1].Texture.X := Static[StaticP1].Texture.X + 10*ScreenX;
+ {Static[StaticP1].Texture.X := Static[StaticP1].Texture.X + 10*ScreenX;
Static[StaticP1ScoreBG].Texture.X := Static[StaticP1ScoreBG].Texture.X + 10*ScreenX;
Text[TextP1].X := Text[TextP1].X + 10*ScreenX;
@@ -1224,7 +1708,7 @@ begin
Static[S].Texture.X := Static[S].Texture.X + 10*ScreenX;
for T := 0 to 1 do
- Text[T].X := Text[T].X + 10*ScreenX;
+ Text[T].X := Text[T].X + 10*ScreenX;}
// update static menu with time ...
if ScreenSong.Mode <> smMedley then
@@ -1270,13 +1754,15 @@ begin
medley_start_applause := false;
// .. and scores
- if PlayersPlay = 1 then begin
+ if PlayersPlay = 1 then
+ begin
Tekst := IntToStr(Player[0].ScoreTotalI);
while Length(Tekst) < 5 do Tekst := '0' + Tekst;
Text[TextP1Score].Text := Tekst;
end;
- if PlayersPlay = 2 then begin
+ if PlayersPlay = 2 then
+ begin
Tekst := IntToStr(Player[0].ScoreTotalI);
while Length(Tekst) < 5 do Tekst := '0' + Tekst;
Text[TextP1TwoPScore].Text := Tekst;
@@ -1286,7 +1772,8 @@ begin
Text[TextP2RScore].Text := Tekst;
end;
- if PlayersPlay = 3 then begin
+ if PlayersPlay = 3 then
+ begin
Tekst := IntToStr(Player[0].ScoreTotalI);
while Length(Tekst) < 5 do Tekst := '0' + Tekst;
Text[TextP1ThreePScore].Text := Tekst;
@@ -1300,8 +1787,10 @@ begin
Text[TextP3RScore].Text := Tekst;
end;
- if PlayersPlay = 4 then begin
- if ScreenAct = 1 then begin
+ if PlayersPlay = 4 then
+ begin
+ if ScreenAct = 1 then
+ begin
Tekst := IntToStr(Player[0].ScoreTotalI);
while Length(Tekst) < 5 do Tekst := '0' + Tekst;
Text[TextP1TwoPScore].Text := Tekst;
@@ -1310,7 +1799,9 @@ begin
while Length(Tekst) < 5 do Tekst := '0' + Tekst;
Text[TextP2RScore].Text := Tekst;
end;
- if ScreenAct = 2 then begin
+
+ if ScreenAct = 2 then
+ begin
Tekst := IntToStr(Player[2].ScoreTotalI);
while Length(Tekst) < 5 do Tekst := '0' + Tekst;
Text[TextP1TwoPScore].Text := Tekst;
@@ -1319,10 +1810,23 @@ begin
while Length(Tekst) < 5 do Tekst := '0' + Tekst;
Text[TextP2RScore].Text := Tekst;
end;
+
+ if P4Mode then
+ begin
+ Tekst := IntToStr(Player[2].ScoreTotalI);
+ while Length(Tekst) < 5 do Tekst := '0' + Tekst;
+ Text[TextP3FourPScore].Text := Tekst;
+
+ Tekst := IntToStr(Player[3].ScoreTotalI);
+ while Length(Tekst) < 5 do Tekst := '0' + Tekst;
+ Text[TextP4FourPScore].Text := Tekst;
+ end;
end;
- if PlayersPlay = 6 then begin
- if ScreenAct = 1 then begin
+ if PlayersPlay = 6 then
+ begin
+ if ScreenAct = 1 then
+ begin
Tekst := IntToStr(Player[0].ScoreTotalI);
while Length(Tekst) < 5 do Tekst := '0' + Tekst;
Text[TextP1ThreePScore].Text := Tekst;
@@ -1335,7 +1839,9 @@ begin
while Length(Tekst) < 5 do Tekst := '0' + Tekst;
Text[TextP3RScore].Text := Tekst;
end;
- if ScreenAct = 2 then begin
+
+ if ScreenAct = 2 then
+ begin
Tekst := IntToStr(Player[3].ScoreTotalI);
while Length(Tekst) < 5 do Tekst := '0' + Tekst;
Text[TextP1ThreePScore].Text := Tekst;
@@ -1348,6 +1854,21 @@ begin
while Length(Tekst) < 5 do Tekst := '0' + Tekst;
Text[TextP3RScore].Text := Tekst;
end;
+
+ if P4Mode then
+ begin
+ Tekst := IntToStr(Player[3].ScoreTotalI);
+ while Length(Tekst) < 5 do Tekst := '0' + Tekst;
+ Text[TextP4SixPScore].Text := Tekst;
+
+ Tekst := IntToStr(Player[4].ScoreTotalI);
+ while Length(Tekst) < 5 do Tekst := '0' + Tekst;
+ Text[TextP5Score].Text := Tekst;
+
+ Tekst := IntToStr(Player[5].ScoreTotalI);
+ while Length(Tekst) < 5 do Tekst := '0' + Tekst;
+ Text[TextP6Score].Text := Tekst;
+ end;
end;
@@ -1445,6 +1966,8 @@ begin
Alpha[I] := Alpha[I]-TimeSkip/dt;
if (Alpha[I]<0) then
Alpha[I] := 0;
+ end else if (ab>2*dt) then
+ begin
end else if (ab>dt) then
begin
Alpha[I] := Alpha[I]+TimeSkip/dt;
@@ -1458,7 +1981,7 @@ begin
begin
ab := GetTimeFromBeat(Czesci[I].Czesc[K+1].StartNote) - Czas.Teraz;
- if (ab>2*dt) then
+ if (ab>2.5*dt) then
Alpha[I+2] := 0
else if (ab>dt) then
Alpha[I+2] := (1-(ab-dt)/dt)
@@ -1488,7 +2011,7 @@ begin
// back stereo
// weird stuff, maybe this is for "dual screen?", but where is player three then?
- Static[StaticP1].Texture.X := Static[StaticP1].Texture.X - 10*ScreenX;
+ {Static[StaticP1].Texture.X := Static[StaticP1].Texture.X - 10*ScreenX;
Static[StaticP1ScoreBG].Texture.X := Static[StaticP1ScoreBG].Texture.X - 10*ScreenX;
Text[TextP1].X := Text[TextP1].X - 10*ScreenX;
@@ -1499,7 +2022,7 @@ begin
Static[StaticP2RScoreBG].Texture.X := Static[StaticP2RScoreBG].Texture.X - 10*ScreenX;
Text[TextP2R].X := Text[TextP2R].X - 10*ScreenX;
- Text[TextP2RScore].X := Text[TextP2RScore].X - 10*ScreenX;
+ Text[TextP2RScore].X := Text[TextP2RScore].X - 10*ScreenX;}
//weird end
for S := 1 to 1 do
diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas
index 226ae532..33018783 100644
--- a/Game/Code/Screens/UScreenSong.pas
+++ b/Game/Code/Screens/UScreenSong.pas
@@ -36,8 +36,9 @@ type
TScreenSong = class(TMenu)
private
- SkippedSongs: array of integer;
+ SkippedSongs: array of integer;
ChooseableSongs: integer;
+ isScrolling: boolean;
public
MP3Volume: integer;
@@ -54,7 +55,7 @@ type
TextTop: array[0..2] of integer;
StaticTop: integer;
- FoundCAT: boolean; //for M2-MOD: a cat is chosen, see whats next...
+ FoundCAT: boolean; //for M2-MOD: a cat is chosen, see whats next...
SongIndex: integer; //Index of Song that is playing since UScreenScore...
@@ -76,7 +77,7 @@ type
MakeMedley: boolean;
//InfoHandler
- InfoHandler: THandler;
+ InfoHandler: THandler;
//AspectHandler
AspectHandler: THandler;
@@ -104,7 +105,7 @@ type
is_jump_title:boolean; //Jump to SOng MOd-YTrue if search for Title
EqualizerBands: array of Byte;
- EqualizerTime: Cardinal;
+ EqualizerTime: Cardinal;
EqualizerTime2: Byte;
ID: string; //for help-system
@@ -174,6 +175,7 @@ type
procedure Refresh(GiveStats: boolean); //Refresh Song Sorting
procedure DrawEqualizer;
procedure ChangeMusic;
+ procedure StartPreview;
procedure LoadTop;
procedure StartVideoPreview;
//Party Mode
@@ -2081,6 +2083,7 @@ begin
Mode := smNormal;
MakeMedley := false;
+ isScrolling := false;
StartTry := false;
AspectHandler.changed := false;
@@ -2356,6 +2359,11 @@ var
begin
dx := SongTarget-SongCurrent;
+ if SameValue(SongTarget, SongCurrent, 0.002) then
+ isScrolling := false
+ else
+ isScrolling := true;
+
dt := TimeSkip*7;
if dt > 1 then dt := 1;
SongCurrent := SongCurrent + dx*dt;
@@ -2371,10 +2379,11 @@ begin
// Log.LogBenchmark('SetScroll4', 5);
//Fading Functions, Only if Covertime is under 10 Seconds
- If (CoverTime < 10) then
+ If (CoverTime < 10) and not isScrolling then
begin
// 0.5.0: cover fade
- if (CoverTime < 1) and (CoverTime + TimeSkip >= 1) then begin
+ if (CoverTime < 1) and (CoverTime + TimeSkip >= 1) then
+ begin
// load new texture
Texture.GetTexture(Button[Interaction].Texture.Name, 'Plain', false);
Button[Interaction].Texture.Alpha := 1;
@@ -2719,6 +2728,8 @@ begin
end;
DrawExtensions;
+
+ StartPreview;
end;
procedure TScreenSong.DrawInfo(text: string);
@@ -2758,7 +2769,8 @@ begin
if VS > 0 then
begin
- UnLoadDetailedCover;
+ if (not isScrolling) and (VS>1) then
+ UnLoadDetailedCover;
Skip := 1;
Skip2:= 0;
@@ -2834,7 +2846,8 @@ begin
if VS > 0 then
begin
- UnLoadDetailedCover;
+ if (not isScrolling) and (VS>1) then
+ UnLoadDetailedCover;
Skip := 1;
@@ -2863,6 +2876,7 @@ begin
begin
Music.Close;
acClose;
+ {
if Music.Open(CatSongs.Song[Interaction].Path + CatSongs.Song[Interaction].Mp3) then
begin
if (CatSongs.Song[Interaction].PreviewStart>0) then
@@ -2881,54 +2895,44 @@ begin
Music.Fade(0, MP3Volume, Ini.PreviewFading);
Music.Play;
end;
- end;
+ end; }
end else
+ begin
Music.Stop;
+ acClose;
+ end;
end;
LoadTop;
end;
-procedure TScreenSong.LoadTop;
-var
- I: integer;
+procedure TScreenSong.StartPreview;
begin
- //Load Top 3
- if (NOT CatSongs.Song[Interaction].Main) AND (CatSongs.VisibleSongs > 0) and
- not MakeMedley and not PartyMedley then
+ if (Ini.PreviewVolume >= 0) and not isScrolling and not Music.isOpen then
begin
- AktSong := CatSongs.Song[Interaction];
- DataBase.ReadScore(AktSong, 3, {Ini.SumPlayers}0);
-
- for I := 0 to 2 do
+ if Music.Open(CatSongs.Song[Interaction].Path + CatSongs.Song[Interaction].Mp3) then
begin
- Text[TextTop[I]].Text := IntToStr(I+1)+'. ';
- end;
-
- if Length(AktSong.Score[Ini.Difficulty])>0 then
- Static[StaticTop].Visible := true
- else
- Static[StaticTop].Visible := false;
-
- for I := 0 to Length(AktSong.Score[Ini.Difficulty])-1 do
- begin
- Text[TextTop[I]].Visible := true;
+ if (CatSongs.Song[Interaction].PreviewStart>0) then
+ Music.MoveTo(CatSongs.Song[Interaction].PreviewStart)
+ else
+ Music.MoveTo(Music.Length / 4);
- Text[TextTop[I]].Text := Text[TextTop[I]].Text + AktSong.Score[Ini.Difficulty, I].Name + '\n' +
- AktSong.Score[Ini.Difficulty, I].Date + ' (' + IntToStr(AktSong.Score[Ini.Difficulty, I].Score) + ')';
+ StartVideoPreview;
+ //If Song Fading is activated then don't Play directly, and Set Volume to Null, else Play normal
+ if (Ini.PreviewFading = 0) then
+ begin
+ Music.SetMusicVolume (MP3Volume);
+ Music.Play;
+ end else
+ begin
+ Music.Fade(0, MP3Volume, Ini.PreviewFading);
+ Music.Play;
+ end;
end;
-
- for I := Length(AktSong.Score[Ini.Difficulty]) to 2 do
- Text[TextTop[I]].Visible := false;
- end else
- begin
- for I := 0 to 2 do
- Text[TextTop[I]].Visible := false;
-
- Static[StaticTop].Visible := false;
end;
end;
+
procedure TScreenSong.StartVideoPreview;
begin
if (Ini.PreviewVolume >= 0) and (Ini.MovieSize < 3) then
@@ -2991,6 +2995,46 @@ begin
end;
end;
+procedure TScreenSong.LoadTop;
+var
+ I: integer;
+begin
+ //Load Top 3
+ if (NOT CatSongs.Song[Interaction].Main) AND (CatSongs.VisibleSongs > 0) and
+ not MakeMedley and not PartyMedley then
+ begin
+ AktSong := CatSongs.Song[Interaction];
+ DataBase.ReadScore(AktSong, 3, {Ini.SumPlayers}0);
+
+ for I := 0 to 2 do
+ begin
+ Text[TextTop[I]].Text := IntToStr(I+1)+'. ';
+ end;
+
+ if Length(AktSong.Score[Ini.Difficulty])>0 then
+ Static[StaticTop].Visible := true
+ else
+ Static[StaticTop].Visible := false;
+
+ for I := 0 to Length(AktSong.Score[Ini.Difficulty])-1 do
+ begin
+ Text[TextTop[I]].Visible := true;
+
+ Text[TextTop[I]].Text := Text[TextTop[I]].Text + AktSong.Score[Ini.Difficulty, I].Name + '\n' +
+ AktSong.Score[Ini.Difficulty, I].Date + ' (' + IntToStr(AktSong.Score[Ini.Difficulty, I].Score) + ')';
+ end;
+
+ for I := Length(AktSong.Score[Ini.Difficulty]) to 2 do
+ Text[TextTop[I]].Visible := false;
+ end else
+ begin
+ for I := 0 to 2 do
+ Text[TextTop[I]].Visible := false;
+
+ Static[StaticTop].Visible := false;
+ end;
+end;
+
procedure TScreenSong.SkipTo(Target: Cardinal); // 0.5.0
var
diff --git a/Game/Code/UltraStar.bdsproj b/Game/Code/UltraStar.bdsproj
index c08bee96..acdabdad 100644
--- a/Game/Code/UltraStar.bdsproj
+++ b/Game/Code/UltraStar.bdsproj
@@ -170,7 +170,8 @@
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
- </VersionInfoKeys> <Excluded_Packages>
+ </VersionInfoKeys>
+ <Excluded_Packages>
<Excluded_Packages Name="c:\program files (x86)\borland\bds\4.0\Bin\dclib100.bpl">Borland InterBase Express Components</Excluded_Packages>
<Excluded_Packages Name="c:\program files (x86)\borland\bds\4.0\Bin\dclIntraweb_80_100.bpl">Intraweb 8.0 Design Package for Borland Development Studio 2006</Excluded_Packages>
<Excluded_Packages Name="c:\program files (x86)\borland\bds\4.0\Bin\dclIndyCore100.bpl">Indy 10 Core Design Time</Excluded_Packages>
diff --git a/Game/Code/lib/acinerella/acinerella.c b/Game/Code/lib/acinerella/acinerella.c
index 5e7c4df2..509346a7 100644
--- a/Game/Code/lib/acinerella/acinerella.c
+++ b/Game/Code/lib/acinerella/acinerella.c
@@ -25,7 +25,7 @@
#include <libswscale/swscale.h>
#include <string.h>
-#define AUDIO_BUFFER_BASE_SIZE ((AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2)
+#define AUDIO_BUFFER_BASE_SIZE AVCODEC_MAX_AUDIO_FRAME_SIZE
//This struct represents one Acinerella video object.
@@ -78,6 +78,7 @@ struct _ac_audio_decoder {
ac_decoder decoder;
int sought;
double last_timecode;
+ char *tmp_buf;
int max_buffer_size;
AVCodec *pCodec;
AVCodecContext *pCodecCtx;
@@ -113,7 +114,20 @@ void init_info(lp_ac_file_info info)
info->bitrate = -1;
}
-lp_ac_instance CALL_CONVT ac_init(void) {
+int av_initialized = 0;
+void ac_init_ffmpeg()
+{
+ if(!av_initialized)
+ {
+ avcodec_register_all();
+ av_register_all();
+ av_initialized = 1;
+ }
+}
+
+lp_ac_instance CALL_CONVT ac_init(void) {
+ ac_init_ffmpeg();
+
//Allocate a new instance of the videoplayer data and return it
lp_ac_data ptmp;
ptmp = (lp_ac_data)av_malloc(sizeof(ac_data));
@@ -137,8 +151,6 @@ void CALL_CONVT ac_free(lp_ac_instance pacInstance) {
}
}
-lp_ac_data last_instance;
-
static int io_read(void *opaque, uint8_t *buf, int buf_size)
{
if (((lp_ac_data)(opaque))->read_proc != NULL) {
@@ -161,37 +173,6 @@ static int64_t io_seek(void *opaque, int64_t pos, int whence)
return -1;
}
-static AVInputFormat *_av_probe_input_format2(AVProbeData *pd, int *score_max)
-{
- AVInputFormat *fmt1, *fmt;
- int score;
-
- fmt = NULL;
- for(fmt1 = first_iformat; fmt1 != NULL; fmt1 = fmt1->next) {
- score = 0;
-
- //Only handle formats which require a file to be opened (test)
- if (fmt1->flags & AVFMT_NOFILE) {
- continue;
- }
-
- if (fmt1->read_probe) {
- score = fmt1->read_probe(pd);
- } else if (fmt1->extensions) {
- if (av_match_ext(pd->filename, fmt1->extensions)) {
- score = 50;
- }
- }
- if (score > *score_max) {
- *score_max = score;
- fmt = fmt1;
- } else if (score == *score_max) {
- fmt = NULL;
- }
- }
- return fmt;
-}
-
uint64_t global_video_pkt_pts = AV_NOPTS_VALUE;
int ac_get_buffer(struct AVCodecContext *c, AVFrame *pic) {
@@ -214,23 +195,33 @@ lp_ac_proberesult CALL_CONVT ac_probe_input_buffer(
int* score_max)
{
AVProbeData pd;
+ AVInputFormat *fmt = NULL;
//Initialize FFMpeg libraries
- avcodec_register_all();
- av_register_all();
+ ac_init_ffmpeg();
//Set the filename
pd.filename = "";
if (filename) {
pd.filename = filename;
}
-
+
+ //The given buffer has to be copied to a new one, which is aligned and padded
+ char *aligned_buf = av_malloc(bufsize + AVPROBE_PADDING_SIZE);
+ memset(aligned_buf, 0, bufsize + AVPROBE_PADDING_SIZE);
+ memcpy(aligned_buf, buf, bufsize);
+
//Set the probe data buffer
- pd.buf = buf;
+ pd.buf = aligned_buf;
pd.buf_size = bufsize;
//Test it
- return (lp_ac_proberesult) _av_probe_input_format2(&pd, score_max);
+ fmt = av_probe_input_format2(&pd, 1, score_max);
+
+ //Free the temporary buffer
+ av_free(aligned_buf);
+
+ return (lp_ac_proberesult)fmt;
}
#define PROBE_BUF_MIN 2048
@@ -256,7 +247,8 @@ AVInputFormat* ac_probe_input_stream(
int score = AVPROBE_SCORE_MAX / 4;
//Allocate some memory for the current probe buffer
- void* tmp_buf = av_malloc(probe_size);
+ void* tmp_buf = av_malloc(probe_size); //Unaligned memory would also be ok here
+ memset(tmp_buf, 0, probe_size);
//Copy the old data to the new buffer
if (*buf) {
@@ -296,10 +288,7 @@ int CALL_CONVT ac_open(
lp_ac_proberesult proberesult)
{
pacInstance->opened = 0;
-
- //Set last instance
- last_instance = (lp_ac_data)pacInstance;
-
+
//Store the given parameters in the ac Instance
((lp_ac_data)pacInstance)->sender = sender;
((lp_ac_data)pacInstance)->open_proc = open_proc;
@@ -493,6 +482,7 @@ lp_ac_package CALL_CONVT ac_read_package(lp_ac_instance pacInstance) {
if (av_read_frame(((lp_ac_data)(pacInstance))->pFormatCtx, &Package) >= 0) {
//Reserve memory
lp_ac_package_data pTmp = (lp_ac_package_data)(av_malloc(sizeof(ac_package_data)));
+ memset(pTmp, 0, sizeof(ac_package_data));
//Set package data
pTmp->package.stream_index = Package.stream_index;
@@ -539,6 +529,7 @@ void* ac_create_video_decoder(lp_ac_instance pacInstance, lp_ac_stream_info info
//Allocate memory for a new decoder instance
lp_ac_video_decoder pDecoder;
pDecoder = (lp_ac_video_decoder)(av_malloc(sizeof(ac_video_decoder)));
+ memset(pDecoder, 0, sizeof(ac_video_decoder));
//Set a few properties
pDecoder->decoder.pacInstance = pacInstance;
@@ -582,6 +573,7 @@ void* ac_create_audio_decoder(lp_ac_instance pacInstance, lp_ac_stream_info info
//Allocate memory for a new decoder instance
lp_ac_audio_decoder pDecoder;
pDecoder = (lp_ac_audio_decoder)(av_malloc(sizeof(ac_audio_decoder)));
+ memset(pDecoder, 0, sizeof(ac_audio_decoder));
//Set a few properties
pDecoder->decoder.pacInstance = pacInstance;
@@ -603,10 +595,13 @@ void* ac_create_audio_decoder(lp_ac_instance pacInstance, lp_ac_stream_info info
return NULL;
}
- //Reserve a buffer
- pDecoder->max_buffer_size = AUDIO_BUFFER_BASE_SIZE;
- pDecoder->decoder.pBuffer = av_malloc(AUDIO_BUFFER_BASE_SIZE);
+ //Initialize the buffers
+ pDecoder->decoder.pBuffer = NULL; //av_malloc(AUDIO_BUFFER_BASE_SIZE);
pDecoder->decoder.buffer_size = 0;
+ pDecoder->max_buffer_size = 0;
+
+ //Reserve the temporary buffer which contains AVCODEC_MAX_AUDIO_FRAME_SIZE bytes
+ pDecoder->tmp_buf = av_malloc(AVCODEC_MAX_AUDIO_FRAME_SIZE);
return (void*)pDecoder;
}
@@ -698,7 +693,6 @@ int ac_decode_video_package(lp_ac_package pPackage, lp_ac_video_decoder pDecoder
int ac_decode_audio_package(lp_ac_package pPackage, lp_ac_audio_decoder pDecoder) {
//Variables describing the destination buffer
- int dest_buffer_size = pDecoder->max_buffer_size;
int dest_buffer_pos = 0;
//Make a copy of the package read by avformat, so that we can move the data pointers around
@@ -709,31 +703,35 @@ int ac_decode_audio_package(lp_ac_package pPackage, lp_ac_audio_decoder pDecoder
while (pkt_tmp.size > 0) {
//Set the size of bytes that can be written to the current size of the destination buffer
- int size = dest_buffer_size;
+ int size = AVCODEC_MAX_AUDIO_FRAME_SIZE;
//Decode a piece of the audio buffer. len1 contains the count of bytes read from the soure buffer.
int len1 = avcodec_decode_audio3(
- pDecoder->pCodecCtx, (int16_t*)(pDecoder->decoder.pBuffer + dest_buffer_pos),
+ pDecoder->pCodecCtx, (int16_t*)(pDecoder->tmp_buf),
&size, &pkt_tmp
);
//If an error occured, skip the frame
- if (len1 <= 0)
+ if (len1 < 0){
return 0;
-
- if (size <= 0)
- continue;
-
+ }
+
//Increment the source buffer pointers
pkt_tmp.size -= len1;
pkt_tmp.data += len1;
- //Increment the destination buffer pointers
- dest_buffer_size -= size;
- dest_buffer_pos += size;
- pDecoder->decoder.buffer_size = dest_buffer_pos;
-
- return 1;
+ if (size > 0){
+ //Reserve enough memory for coping the result data
+ if (dest_buffer_pos + size > pDecoder->max_buffer_size) {
+ pDecoder->decoder.pBuffer = av_realloc(pDecoder->decoder.pBuffer, dest_buffer_pos + size);
+ pDecoder->max_buffer_size = dest_buffer_pos + size;
+ }
+ memcpy(pDecoder->decoder.pBuffer + dest_buffer_pos, pDecoder->tmp_buf, size);
+
+ //Increment the destination buffer pointers, copy the result to the output buffer
+ dest_buffer_pos += size;
+ pDecoder->decoder.buffer_size += size;
+ }
}
return 1;
@@ -800,8 +798,7 @@ int CALL_CONVT ac_seek(lp_ac_decoder pDecoder, int dir, int64_t target_pos) {
}
//Free video decoder
-void ac_free_video_decoder(lp_ac_video_decoder pDecoder) {
-// av_free(pDecoder->decoder.pBuffer);
+void ac_free_video_decoder(lp_ac_video_decoder pDecoder) {
av_free(pDecoder->pFrame);
av_free(pDecoder->pFrameRGB);
if (pDecoder->pSwsCtx != NULL) {
@@ -809,7 +806,6 @@ void ac_free_video_decoder(lp_ac_video_decoder pDecoder) {
}
avcodec_close(pDecoder->pCodecCtx);
-
//Free reserved memory for the buffer
av_free(pDecoder->decoder.pBuffer);
@@ -824,6 +820,9 @@ void ac_free_audio_decoder(lp_ac_audio_decoder pDecoder) {
//Free reserved memory for the buffer
av_free(pDecoder->decoder.pBuffer);
+
+ //Free the memory reserved for the temporary audio buffer
+ av_free(pDecoder->tmp_buf);
//Free reserved memory for decoder record
av_free(pDecoder);