aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes
diff options
context:
space:
mode:
authorbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-08-15 10:17:04 +0000
committerbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-08-15 10:17:04 +0000
commit0d382c7708e1b087f35b6d4ea5fc795df52c2a22 (patch)
tree459a69c16a823033c936fd59fc4fe8660b2c1591 /Game/Code/Classes
parentdec577c0d954dfbbdcd03fc8b4159d8d5965e7c8 (diff)
downloadusdx-0d382c7708e1b087f35b6d4ea5fc795df52c2a22.tar.gz
usdx-0d382c7708e1b087f35b6d4ea5fc795df52c2a22.tar.xz
usdx-0d382c7708e1b087f35b6d4ea5fc795df52c2a22.zip
- added support for 4 (and even 6) players on one screen. its hard-coded and not finished yet. the score screen needs adjustment.
- update of acinerella, changed pixel format to BGR (seems to be better than RGB) - update of the language files. big thanks to thursday for the english translation! - added languages.xls for managing the language files - added support for vbr-files (prescan). - reduced the volume in applause.mp3 - added description of plugins in challenge mode git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2609 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Classes')
-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
6 files changed, 282 insertions, 117 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);