diff options
author | brunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-09-01 14:09:58 +0000 |
---|---|---|
committer | brunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-09-01 14:09:58 +0000 |
commit | dbe444f87b85da27a37f38e80bfd540178b8dde0 (patch) | |
tree | d81b4c09d5de05b6304b1952192d1feef34beeb8 /Game/Code | |
parent | 22581815288ed2462063a8ac36e3818f95adfda2 (diff) | |
download | usdx-dbe444f87b85da27a37f38e80bfd540178b8dde0.tar.gz usdx-dbe444f87b85da27a37f38e80bfd540178b8dde0.tar.xz usdx-dbe444f87b85da27a37f38e80bfd540178b8dde0.zip |
- fix: position of player 3 and 4 in 4-player-mode on one screen in singscreen
- fix: scorescreen for 4-player-mode on one screen
- add: tag #CALCMEDLEY:Off => disable calculation of medley for that song
- add: sorting RANDOM for party-modes
- add: ShuffleMode FULL (play whole file) in fullscreen if video available
- add: it possible to select the 2 songs left and right of the random selected song in party mode
- add: num song in in party options (in the selected folder/playlist)
- fix: dont change line in editor while playing only one line
- removed option solmization from lyric option screen
- add: play last sung song in party score screen
- added some plugins (thx to MasterPhW)
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2629 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code')
-rw-r--r-- | Game/Code/Classes/UDraw.pas | 20 | ||||
-rw-r--r-- | Game/Code/Classes/UFiles.pas | 50 | ||||
-rw-r--r-- | Game/Code/Classes/UIni.pas | 14 | ||||
-rw-r--r-- | Game/Code/Classes/UParty.pas | 9 | ||||
-rw-r--r-- | Game/Code/Classes/UPlaylist.pas | 38 | ||||
-rw-r--r-- | Game/Code/Classes/USongs.pas | 63 | ||||
-rw-r--r-- | Game/Code/Classes/UThemes.pas | 49 | ||||
-rw-r--r-- | Game/Code/Screens/UScreenEditSub.pas | 49 | ||||
-rw-r--r-- | Game/Code/Screens/UScreenMain.pas | 9 | ||||
-rw-r--r-- | Game/Code/Screens/UScreenOptionsLyrics.pas | 11 | ||||
-rw-r--r-- | Game/Code/Screens/UScreenPartyOptions.pas | 22 | ||||
-rw-r--r-- | Game/Code/Screens/UScreenPartyOptionsM2.pas | 10 | ||||
-rw-r--r-- | Game/Code/Screens/UScreenPartyScore.pas | 209 | ||||
-rw-r--r-- | Game/Code/Screens/UScreenScore.pas | 168 | ||||
-rw-r--r-- | Game/Code/Screens/UScreenSing.pas | 3 | ||||
-rw-r--r-- | Game/Code/Screens/UScreenSingModi.pas | 3 | ||||
-rw-r--r-- | Game/Code/Screens/UScreenSong.pas | 171 | ||||
-rw-r--r-- | Game/Code/Screens/UScreenSongMenu.pas | 18 | ||||
-rw-r--r-- | Game/Code/UltraStar.bdsproj | 3 | ||||
-rw-r--r-- | Game/Code/UltraStar.dpr | 2 |
20 files changed, 696 insertions, 225 deletions
diff --git a/Game/Code/Classes/UDraw.pas b/Game/Code/Classes/UDraw.pas index ad4ecae7..38e94482 100644 --- a/Game/Code/Classes/UDraw.pas +++ b/Game/Code/Classes/UDraw.pas @@ -1021,8 +1021,8 @@ begin 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]);
+ SingDrawPlayerCzesc(400+Nr.Left + 20, Skin_P1_NotesB, Nr.Width - 40, 0, 2, 15, Alpha[0]);
+ SingDrawPlayerCzesc(400+Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 0, 3, 15, Alpha[0]);
end;
end;
@@ -1071,9 +1071,9 @@ begin 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]);
+ SingDrawPlayerCzesc(400+Nr.Left + 20, 120+95, Nr.Width - 40, 0, 3, 12, Alpha[0]);
+ SingDrawPlayerCzesc(400+Nr.Left + 20, 245+95, Nr.Width - 40, 0, 4, 12, Alpha[0]);
+ SingDrawPlayerCzesc(400+Nr.Left + 20, 370+95, Nr.Width - 40, 0, 5, 12, Alpha[0]);
end;
end;
end;
@@ -1148,8 +1148,8 @@ begin 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]);
+ SingDrawPlayerCzesc(400+Nr.Left + 20, Skin_P1_NotesB, Nr.Width - 40, 0, 2, 15, Alpha[0]);
+ SingDrawPlayerCzesc(400+Nr.Left + 20, Skin_P2_NotesB, Nr.Width - 40, 1, 3, 15, Alpha[1]);
end;
end;
@@ -1193,9 +1193,9 @@ begin 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]);
+ SingDrawPlayerCzesc(400+Nr.Left + 20, 120+95, Nr.Width - 40, 0, 3, 12, Alpha[0]);
+ SingDrawPlayerCzesc(400+Nr.Left + 20, 245+95, Nr.Width - 40, 1, 4, 12, Alpha[1]);
+ SingDrawPlayerCzesc(400+Nr.Left + 20, 370+95, Nr.Width - 40, 0, 5, 12, Alpha[0]);
end;
end;
end;
diff --git a/Game/Code/Classes/UFiles.pas b/Game/Code/Classes/UFiles.pas index 16ff7c63..2b051353 100644 --- a/Game/Code/Classes/UFiles.pas +++ b/Game/Code/Classes/UFiles.pas @@ -133,6 +133,7 @@ begin SetLength(Song.Edition, 1);
Song.Edition[0] := 'Unknown';
Song.Language := 'Unknown'; //Language Patch
+ Song.Year := '';
//Required Information
Song.Mp3 := '';
@@ -152,8 +153,12 @@ begin Song.Resolution := 4;
Song.Creator := '';
Song.Medley.Source:=msNone;
+ Song.CalcMedley := true;
Song.PreviewStart := 0;
SetLength(Song.CustomTags, 0);
+ SetLength(Song.DuetNames, 2);
+ Song.DuetNames[0] := 'P1';
+ Song.DuetNames[1] := 'P2';
end;
//--------------------
@@ -350,6 +355,12 @@ begin Song.Language := Value;
end
+ //Year Sorting
+ else if (Identifier = 'YEAR') then
+ begin
+ Song.Year := Value;
+ end
+
// Song Start
else if (Identifier = 'START') then
begin
@@ -406,6 +417,25 @@ begin MedleyFlags := MedleyFlags or 4;
end
+ // Medley
+ else if (Identifier = 'CALCMEDLEY') then
+ begin
+ if (Uppercase(Value) = 'OFF') then
+ Song.CalcMedley := false;
+ end
+
+ // Duet Singer Name P1
+ else if (Identifier = 'DUETSINGERP1') then
+ begin
+ Song.DuetNames[0] := Value;
+ end
+
+ // Duet Singer Name P2
+ else if (Identifier = 'DUETSINGERP2') then
+ begin
+ Song.DuetNames[1] := Value;
+ end
+
// unsupported tag
else
begin
@@ -1128,13 +1158,17 @@ begin if Song.Creator <> '' then WriteLn(SongFile, '#CREATOR:' + Song.Creator);
+ if Song.Language <> 'Unknown' then WriteLn(SongFile, '#LANGUAGE:' + Song.Language);
+
for C := 0 to Length(Song.Edition)-1 do
if Song.Edition[C] <> 'Unknown' then WriteLn(SongFile, '#EDITION:' + Song.Edition[C]);
for C := 0 to Length(Song.Genre) - 1 do
if Song.Genre[C] <> 'Unknown' then WriteLn(SongFile, '#GENRE:' + Song.Genre[C]);
-
- if Song.Language <> 'Unknown' then WriteLn(SongFile, '#LANGUAGE:' + Song.Language);
+
+ if Song.Year <> '' then WriteLn(SongFile, '#YEAR:' + Song.Year);
+
+
WriteLn(SongFile, '#MP3:' + Song.Mp3);
@@ -1154,6 +1188,15 @@ begin WriteLn(SongFile, '#MedleyEndBeat:' + IntToStr(Song.Medley.EndBeat));
end;
+ if (not Song.CalcMedley) then
+ WriteLn(SongFile, '#CalcMedley:Off');
+
+ {if (Song.isDuet) then
+ begin
+ WriteLn(SongFile, '#DuetSingerP1:' + Song.DuetNames[0]);
+ WriteLn(SongFile, '#DuetSingerP2:' + Song.DuetNames[1]);
+ end;}
+
if Relative then WriteLn(SongFile, '#RELATIVE:yes');
WriteLn(SongFile, '#BPM:' + FloatToStr(Song.BPM[0].BPM / 4));
@@ -1222,6 +1265,9 @@ begin if AktSong.Medley.Source = msTag then
Exit;
+ if not AktSong.CalcMedley then
+ Exit;
+
//relative is not supported for medley by now!
if AktSong.Relative then
begin
diff --git a/Game/Code/Classes/UIni.pas b/Game/Code/Classes/UIni.pas index 0f1b26ce..97030d1d 100644 --- a/Game/Code/Classes/UIni.pas +++ b/Game/Code/Classes/UIni.pas @@ -19,7 +19,9 @@ type Difficulty: integer;
Language: integer;
Tabs: integer;
+ tabs_temp: integer;
Sorting: integer;
+ sorting_temp: integer;
ShuffleTime: integer;
Debug: integer;
LoadFaultySongs:integer;
@@ -108,7 +110,7 @@ const IDifficulty: array[0..2] of string = ('Easy', 'Medium', 'Hard');
ITabs: array[0..1] of string = ('Off', 'On');
- ISorting: array[0..7] of string = ('Edition', 'Genre', 'Language', 'Folder', 'Title', 'Artist', 'Title2', 'Artist2');
+ ISorting: array[0..8] of string = ('Edition', 'Genre', 'Language', 'Folder', 'Title', 'Artist', 'Title2', 'Artist2', 'Random');
sEdition = 0;
sGenre = 1;
sLanguage = 2;
@@ -117,8 +119,9 @@ const sArtist = 5;
sTitle2 = 6;
sArtist2 = 7;
+ sRandom = 8;
- IShuffleTime: array[0..9] of string = ('Off',
+ IShuffleTime: array[0..10] of string = ('Off',
'15 Sec',
'30 Sec',
'45 Sec',
@@ -127,7 +130,8 @@ const '90 Sec',
'105 Sec',
'120 Sec',
- 'MAX');
+ 'MAX',
+ 'FULL');
IDebug: array[0..1] of string = ('Off', 'On');
ILoadFaultySongs: array[0..1] of string = ('Off', 'On');
@@ -248,11 +252,13 @@ begin Tekst := IniFile.ReadString('Game', 'Tabs', ITabs[0]);
for Pet := 0 to High(ITabs) do
if Tekst = ITabs[Pet] then Ini.Tabs := Pet;
+ tabs_temp := Tabs;
// Sorting
Tekst := IniFile.ReadString('Game', 'Sorting', ISorting[0]);
for Pet := 0 to High(ISorting) do
if Tekst = ISorting[Pet] then Ini.Sorting := Pet;
+ sorting_temp := Sorting;
// ShuffleTime
Tekst := IniFile.ReadString('Game', 'ShuffleTime', 'Off');
@@ -653,10 +659,12 @@ begin // Tabs
Tekst := ITabs[Ini.Tabs];
IniFile.WriteString('Game', 'Tabs', Tekst);
+ tabs_temp := Tabs;
// Sorting
Tekst := ISorting[Ini.Sorting];
IniFile.WriteString('Game', 'Sorting', Tekst);
+ sorting_temp := Sorting;
//ShuffleTime
Tekst := IShuffleTime[Ini.ShuffleTime];
diff --git a/Game/Code/Classes/UParty.pas b/Game/Code/Classes/UParty.pas index 22a4847c..a416bb4c 100644 --- a/Game/Code/Classes/UParty.pas +++ b/Game/Code/Classes/UParty.pas @@ -37,10 +37,11 @@ type function IsWinner(Player, Winner: Byte): boolean;
procedure GenScores;
public
- Plugins: array of TPartyPlugin;
- Teams: TTeamInfo;
- Rounds: array of TRoundInfo;
+ Plugins: array of TPartyPlugin;
+ Teams: TTeamInfo;
+ Rounds: array of TRoundInfo;
CurRound: Byte;
+ Rand3: boolean;
constructor Create;
@@ -131,6 +132,8 @@ begin //Set cur Round to Round 1
CurRound := 255;
+ Rand3 := true;
+
//Set Rounds
NumMedleys := 0;
If (Length(Plugins) >= 1) then
diff --git a/Game/Code/Classes/UPlaylist.pas b/Game/Code/Classes/UPlaylist.pas index 66bd8189..36bbf051 100644 --- a/Game/Code/Classes/UPlaylist.pas +++ b/Game/Code/Classes/UPlaylist.pas @@ -47,7 +47,9 @@ type Procedure DelItem(const iItem: Cardinal; const iPlaylist: Integer = -1);
Procedure GetNames(var PLNames: array of String);
+ Procedure GetNamesAndNumSongs(var PLNames: array of String);
Function GetIndexbySongID(const SongID: Cardinal; const iPlaylist: Integer = -1): Integer;
+ Function GetNumSongs(Index: Cardinal): integer;
end;
{Modes:
@@ -414,13 +416,13 @@ end; //----------
//GetNames - Writes Playlist Names in a Array
//----------
-Procedure TPlayListManager.GetNames(var PLNames: array of String);
+Procedure TPlayListManager.GetNames(var PLNames: array of String);
var
I: Integer;
Len: Integer;
begin
Len := High(Playlists);
-
+
if (Length(PLNames) <> Len + 1) then
exit;
@@ -429,6 +431,23 @@ begin end;
//----------
+//GetNamesAndNumSongs - Writes Playlist Names + Num Songs in an Array
+//----------
+Procedure TPlayListManager.GetNamesAndNumSongs(var PLNames: array of String);
+var
+ I: Integer;
+ Len: Integer;
+begin
+ Len := High(Playlists);
+
+ if (Length(PLNames) <> Len + 1) then
+ exit;
+
+ For I := 0 to Len do
+ PLNames[I] := Playlists[I].Name + ' ( ' + IntToStr(GetNumSongs(I)) + ' Songs)';
+end;
+
+//----------
//GetIndexbySongID - Returns Index in the specified Playlist of the given Song
//----------
Function TPlayListManager.GetIndexbySongID(const SongID: Cardinal; const iPlaylist: Integer): Integer;
@@ -455,4 +474,19 @@ begin end;
end;
+function TPlayListManager.GetNumSongs(Index: Cardinal): integer;
+var
+ I: integer;
+
+begin
+ Result := 0;
+
+ //Count Songs in Playlist
+ For I := 0 to high(PlayLists[Index].Items) do
+ begin
+ if (ScreenSong.Mode=smNormal) or not CatSongs.Song[PlayLists[Index].Items[I].SongID].isDuet then
+ Inc(Result);
+ end;
+end;
+
end.
diff --git a/Game/Code/Classes/USongs.pas b/Game/Code/Classes/USongs.pas index 5a579474..e669edf6 100644 --- a/Game/Code/Classes/USongs.pas +++ b/Game/Code/Classes/USongs.pas @@ -44,7 +44,9 @@ type FileName: string;
isDuet: boolean;
+ DuetNames: array of string;
Medley: TMedley;
+ CalcMedley: boolean;
PreviewStart: real; //in seconds
CustomTags: array of TCustomHeaderTag; // from 1.1
@@ -53,6 +55,7 @@ type Genre: array of string;
Edition: array of string;
Language: string; // 0.5.0: new
+ Year: string;
Title: string;
Artist: string;
@@ -118,6 +121,7 @@ type function SetFilter(FilterStr: String; const fType: Byte): Cardinal;
function NumCatSongs(Cat: integer): integer;
+ function NumSongs(): integer;
function NumVisibleCats(): integer;
end;
@@ -319,6 +323,21 @@ begin SongSort[S] := TempSong;
end;
end;
+ sRandom:
+ begin
+ for S2 := 0 to Length(SongSort)-1 do
+ begin
+ for S := 1 to Length(SongSort)-1 do
+ begin
+ if (Random(2) = 0) then
+ begin
+ TempSong := SongSort[S-1];
+ SongSort[S-1] := SongSort[S];
+ SongSort[S] := TempSong;
+ end;
+ end;
+ end;
+ end;
end; // case
end;
@@ -441,6 +460,7 @@ begin sArtist: Songs.Sort(sArtist);
sTitle2: Songs.Sort(sTitle2); // by title2 ???
sArtist2: Songs.Sort(sArtist2); // by artist2 ???
+ sRandom: Songs.Sort(sRandom);
end; // case
@@ -670,7 +690,32 @@ begin CatSongs.Song[CatLen].Visible := true;
end;
- end;
+ end else if (Ini.Sorting = sRandom) and
+ (Length(Songs.SongSort[S].Artist)>=1) and
+ (Letter <> 'R') then
+ begin
+ // add a letter Category Button
+ Inc(Order);
+ Letter := 'R';
+ CatLen := Length(CatSongs.Song);
+ SetLength(CatSongs.Song, CatLen+1);
+ CatSongs.Song[CatLen].Artist := '[RANDOM]';
+ CatSongs.Song[CatLen].Main := true;
+ CatSongs.Song[CatLen].OrderTyp := 0;
+ CatSongs.Song[CatLen].OrderNum := Order;
+
+ CatSongs.Song[CatLen].Cover := CatCovers.GetCover(Ini.Sorting, Letter);
+
+ //CatNumber Patch
+ if (Letter <> ' ') then
+ begin
+ if (CatLen - CatNumber - 1>=0) then
+ Song[CatLen - CatNumber - 1].CatNumber := CatNumber;//Set CatNumber of Categroy
+ CatNumber := 0;
+ end;
+
+ CatSongs.Song[CatLen].Visible := true;
+ end
end;
CatLen := Length(CatSongs.Song);
@@ -757,6 +802,22 @@ begin end;
end;
+function TCatSongs.NumSongs(): integer;
+var
+ I: integer;
+begin
+ Result := 0;
+ for I := 0 to Length(CatSongs.Song)-1 do
+ begin
+ if (Not CatSongs.Song[I].Main) then
+ begin
+ if ((ScreenSong.Mode<>smNormal) and (not CatSongs.Song[I].isDuet)) or
+ (ScreenSong.Mode=smNormal) then
+ inc(Result);
+ end;
+ end;
+end;
+
function TCatSongs.NumVisibleCats(): integer;
var
I: integer;
diff --git a/Game/Code/Classes/UThemes.pas b/Game/Code/Classes/UThemes.pas index 38d11db4..52893dc6 100644 --- a/Game/Code/Classes/UThemes.pas +++ b/Game/Code/Classes/UThemes.pas @@ -443,29 +443,29 @@ type StaticMedleyNav: TThemeStatic;
TextMedleyNav: TThemeText;
- PlayerStatic: array[1..6] of AThemeStatic;
- PlayerTexts: array[1..6] of AThemeText;
-
- TextName: array[1..6] of TThemeText;
- TextScore: array[1..6] of TThemeText;
-
- TextNotes: array[1..6] of TThemeText;
- TextNotesScore: array[1..6] of TThemeText;
- TextLineBonus: array[1..6] of TThemeText;
- TextLineBonusScore: array[1..6] of TThemeText;
- TextGoldenNotes: array[1..6] of TThemeText;
- TextGoldenNotesScore: array[1..6] of TThemeText;
- TextTotal: array[1..6] of TThemeText;
- TextTotalScore: array[1..6] of TThemeText;
-
- StaticBoxLightest: array[1..6] of TThemeStatic;
- StaticBoxLight: array[1..6] of TThemeStatic;
- StaticBoxDark: array[1..6] of TThemeStatic;
-
- StaticBackLevel: array[1..6] of TThemeStatic;
- StaticBackLevelRound: array[1..6] of TThemeStatic;
- StaticLevel: array[1..6] of TThemeStatic;
- StaticLevelRound: array[1..6] of TThemeStatic;
+ PlayerStatic: array[1..10] of AThemeStatic;
+ PlayerTexts: array[1..10] of AThemeText;
+
+ TextName: array[1..10] of TThemeText;
+ TextScore: array[1..10] of TThemeText;
+
+ TextNotes: array[1..10] of TThemeText;
+ TextNotesScore: array[1..10] of TThemeText;
+ TextLineBonus: array[1..10] of TThemeText;
+ TextLineBonusScore: array[1..10] of TThemeText;
+ TextGoldenNotes: array[1..10] of TThemeText;
+ TextGoldenNotesScore: array[1..10] of TThemeText;
+ TextTotal: array[1..10] of TThemeText;
+ TextTotalScore: array[1..10] of TThemeText;
+
+ StaticBoxLightest: array[1..10] of TThemeStatic;
+ StaticBoxLight: array[1..10] of TThemeStatic;
+ StaticBoxDark: array[1..10] of TThemeStatic;
+
+ StaticBackLevel: array[1..10] of TThemeStatic;
+ StaticBackLevelRound: array[1..10] of TThemeStatic;
+ StaticLevel: array[1..10] of TThemeStatic;
+ StaticLevelRound: array[1..10] of TThemeStatic;
// Description: array[0..5] of string;}
end;
@@ -1396,7 +1396,8 @@ begin ThemeLoadStatic(Score.StaticMedleyNav, 'ScoreMedleyNavStatic');
ThemeLoadText(Score.TextMedleyNav, 'ScoreMedleyNavText');
- for I := 1 to 6 do begin
+ for I := 1 to 10 do
+ begin
ThemeLoadStatics(Score.PlayerStatic[I], 'ScorePlayer' + IntToStr(I) + 'Static');
ThemeLoadTexts(Score.PlayerTexts[I], 'ScorePlayer' + IntToStr(I) + 'Text');
diff --git a/Game/Code/Screens/UScreenEditSub.pas b/Game/Code/Screens/UScreenEditSub.pas index 38199ad9..a8c0a20d 100644 --- a/Game/Code/Screens/UScreenEditSub.pas +++ b/Game/Code/Screens/UScreenEditSub.pas @@ -50,6 +50,7 @@ type PlaySentenceMidi: boolean;
PlayOneNote: boolean;
PlayOneNoteMidi: boolean;
+ PlayOneSentence: boolean; //for mp3 and midi
PlayStopTime: real;
LastClick: integer;
@@ -148,7 +149,7 @@ var begin
Result := true;
-
+ PlayOneSentence := false;
Text[TextDebug].Text := '';
if TextEditMode then
@@ -726,12 +727,13 @@ begin SDLK_P:
begin
+ // one line, mp3 + clicks
if SDL_ModState = 0 then
begin
- // Play Sentence
MidiOut.PutShort($81, Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[MidiLastNote].Ton + 60, 127);
PlaySentenceMidi := false;
PlayOneNoteMidi := false;
+ PlayOneSentence := true;
Click := true;
Music.Stop;
R := GetTimeFromBeat(Czesci[CP].Czesc[Czesci[CP].Akt].StartNote);
@@ -746,10 +748,12 @@ begin end;
end;
+ // one line, midi
if SDL_ModState = KMOD_LSHIFT then
begin
PlaySentenceMidi := true;
PlayOneNoteMidi := false;
+ PlayOneSentence := true;
MidiTime := USTime.GetTime;
Music.Stop;
PlaySentence := false;
@@ -760,10 +764,12 @@ begin LastClick := -100;
end;
+ // one line midi + mp3
if SDL_ModState = KMOD_LSHIFT or KMOD_LCTRL then
begin
PlaySentenceMidi := true;
PlayOneNoteMidi := false;
+ PlayOneSentence := true;
MidiTime := USTime.GetTime;
MidiStart := GetTimeFromBeat(Czesci[CP].Czesc[Czesci[CP].Akt].StartNote);
MidiStop := GetTimeFromBeat(Czesci[CP].Czesc[Czesci[CP].Akt].Koniec);
@@ -771,7 +777,7 @@ begin PlaySentence := true;
PlayOneNote := false;
- Click := true;
+ //Click := true;
Music.Stop;
Music.MoveTo(GetTimeFromBeat(Czesci[CP].Czesc[Czesci[CP].Akt].StartNote)+0{-0.10});
PlayStopTime := GetTimeFromBeat(Czesci[CP].Czesc[Czesci[CP].Akt].Koniec)+0;
@@ -825,7 +831,7 @@ begin PlaySentence := true;
PlayOneNote := false;
- Click := true;
+ //Click := true;
Music.Stop;
Music.MoveTo(GetTimeFromBeat(Czesci[CP].Czesc[Czesci[CP].Akt].StartNote)+0{-0.10});
PlayStopTime := Music.Length;
@@ -1252,15 +1258,16 @@ begin if Ini.Debug=1 then
Text[TextDebug].Text := 'PressedKey: ' + IntToStr(PressedKey) + ' ScanCode: ' + IntToStr(ScanCode);
-
+
// check normal keys
if not (ScanCode in [0..31, 127..159]) then //=isPrintable
begin
Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Tekst :=
Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Tekst + chr(ScanCode);
- EditorLyric[CP].ChangeCurText(Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Tekst);
+ //EditorLyric[CP].ChangeCurText(Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Tekst);
EditorLyric[CP].AddCzesc(CP, Czesci[CP].Akt);
+ EditorLyric[CP].Selected := AktNuta[CP];
Exit;
end;
@@ -1284,8 +1291,9 @@ begin Delete(Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Tekst,
Length(Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Tekst), 1);
- EditorLyric[CP].ChangeCurText(Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Tekst);
+ //EditorLyric[CP].ChangeCurText(Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Tekst);
EditorLyric[CP].AddCzesc(CP, Czesci[CP].Akt);
+ EditorLyric[CP].Selected := AktNuta[CP];
end;
SDLK_RIGHT:
begin
@@ -1868,15 +1876,21 @@ begin Czesci[CP].Czesc[C].Nuta[AktNuta[CP]].Dlugosc;
if (Czesci[CP].Czesc[C].Nuta[AktNuta[CP]+1].Dlugosc>0) then
- Czesci[CP].Czesc[C].Nuta[AktNuta[CP]+1].Tekst := '~'
- else
+ begin
+ Czesci[CP].Czesc[C].Nuta[AktNuta[CP]+1].Tekst := '~';
+ Czesci[CP].Czesc[C].Nuta[AktNuta[CP]].Color := 2;
+ Czesci[CP].Czesc[C].Nuta[AktNuta[CP]+1].Color := 0;
+ end else
+ begin
Czesci[CP].Czesc[C].Nuta[AktNuta[CP]+1].Tekst := ' ';
+ Czesci[CP].Czesc[C].Nuta[AktNuta[CP]].Color := 0;
+ Czesci[CP].Czesc[C].Nuta[AktNuta[CP]+1].Color := 2;
- Czesci[CP].Czesc[C].Nuta[AktNuta[CP]].Color := 0;
- Czesci[CP].Czesc[C].Nuta[AktNuta[CP]+1].Color := 2;
+ Inc(AktNuta[CP]);
+ end;
- Inc(AktNuta[CP]);
EditorLyric[CP].AddCzesc(CP, Czesci[CP].Akt);
+ EditorLyric[CP].Selected := AktNuta[CP];
end;
procedure TScreenEditSub.DeleteNote;
@@ -2599,7 +2613,8 @@ begin for note := 0 to Length(Czesci[CP].Czesc[line].Nuta) - 1 do
begin
//line change
- if (Czesci[CP].Czesc[line].Start = AktBeat) and (line <> Czesci[CP].Akt) and not end_ then
+ if (Czesci[CP].Czesc[line].Start = AktBeat) and (line <> Czesci[CP].Akt) and
+ not end_ and not PlayOneSentence then
begin
Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Color := 0;
AktNuta[CP] := 0;
@@ -2618,7 +2633,7 @@ begin end;
end;
- if AktSong.isDuet then
+ if AktSong.isDuet and not PlayOneSentence then
begin
for line := 0 to Length(Czesci[(CP+1) mod 2].Czesc) - 1 do
begin
@@ -2645,6 +2660,7 @@ begin LineChanged[0]:=false;
LineChanged[1]:=false;
PlayVideo := false;
+ PlayOneSentence := false;
end;
// midi music
@@ -2712,7 +2728,8 @@ begin begin
//note change
if (Czesci[CP].Czesc[line].Nuta[note].Start = AktBeat) and
- ((note <> AktNuta[CP]) or LineChanged[CP]) then
+ (((note <> AktNuta[CP]) or LineChanged[CP]) and
+ (not PlayOneSentence or (line = Czesci[CP].Akt))) then
begin
Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Color := 0;
if not LineChanged[CP] then
@@ -2729,7 +2746,7 @@ begin end;
end;
- if AktSong.isDuet then
+ if AktSong.isDuet and not PlayOneSentence then
begin
for line := 0 to Length(Czesci[(CP+1) mod 2].Czesc) - 1 do
begin
diff --git a/Game/Code/Screens/UScreenMain.pas b/Game/Code/Screens/UScreenMain.pas index b92e59a2..fbaa2e37 100644 --- a/Game/Code/Screens/UScreenMain.pas +++ b/Game/Code/Screens/UScreenMain.pas @@ -277,6 +277,15 @@ begin if (Ini.LoadFaultySongs=0) and ShowNumErrors and (Songs.NumFaultySongs>0) then
begin
ScreenPopupCheck.ShowPopup(Format(Language.Translate('MSG_ERROR_SONGLOADING'), [Songs.NumFaultySongs]));
+ end else
+ ShowNumErrors := false;
+
+ if (Ini.tabs_temp <> Ini.tabs) or (Ini.sorting_temp <> Ini.Sorting)then
+ begin
+ Ini.Tabs := Ini.tabs_temp;
+ Ini.Sorting := Ini.sorting_temp;
+ ScreenSong.Refresh(true);
+ PlaylistMan.LoadPlayLists;
end;
end;
diff --git a/Game/Code/Screens/UScreenOptionsLyrics.pas b/Game/Code/Screens/UScreenOptionsLyrics.pas index a6ee2464..bfb69c92 100644 --- a/Game/Code/Screens/UScreenOptionsLyrics.pas +++ b/Game/Code/Screens/UScreenOptionsLyrics.pas @@ -44,7 +44,8 @@ begin end;
SDLK_RETURN:
begin
- if SelInteraction = 3 then begin
+ if SelInteraction = 2 then
+ begin
Ini.Save;
Music.PlayBack;
FadeTo(@ScreenOptions);
@@ -56,14 +57,16 @@ begin InteractPrev;
SDLK_RIGHT:
begin
- if (SelInteraction >= 0) and (SelInteraction <= 2) then begin
+ if (SelInteraction >= 0) and (SelInteraction <= 1) then
+ begin
Music.PlayOption;
InteractInc;
end;
end;
SDLK_LEFT:
begin
- if (SelInteraction >= 0) and (SelInteraction <= 2) then begin
+ if (SelInteraction >= 0) and (SelInteraction <= 1) then
+ begin
Music.PlayOption;
InteractDec;
end;
@@ -80,7 +83,7 @@ begin AddSelect(Theme.OptionsLyrics.SelectLyricsFont, Ini.LyricsFont, ILyricsFont);
AddSelect(Theme.OptionsLyrics.SelectLyricsEffect, Ini.LyricsEffect, ILyricsEffect);
- AddSelect(Theme.OptionsLyrics.SelectSolmization, Ini.Solmization, ISolmization);
+ //AddSelect(Theme.OptionsLyrics.SelectSolmization, Ini.Solmization, ISolmization);
AddButton(Theme.OptionsLyrics.ButtonExit);
diff --git a/Game/Code/Screens/UScreenPartyOptions.pas b/Game/Code/Screens/UScreenPartyOptions.pas index deeb8c96..0a58cd79 100644 --- a/Game/Code/Screens/UScreenPartyOptions.pas +++ b/Game/Code/Screens/UScreenPartyOptions.pas @@ -156,6 +156,14 @@ begin SDLK_RETURN:
begin
+ if (Playlist = 0) and ((Ini.Tabs = 1) or (Ini.Sorting <> sRandom)) then
+ begin
+ Ini.Tabs := 0;
+ Ini.Sorting := sRandom;
+ ScreenSong.Refresh(true);
+ PlaylistMan.LoadPlayLists;
+ end;
+
MenuPluginOpen := false;
if not Help.SetHelpID(ID) then
Log.LogError('No Entry for Help-ID ' + ID + ' (ScreenPartyOptions)');
@@ -214,7 +222,7 @@ begin J := -1;
For I := 0 to high(CatSongs.Song) do
begin
- if CatSongs.Song[I].Main then
+ if CatSongs.Song[I].Main and (CatSongs.NumCatSongs(CatSongs.Song[I].OrderNum)>0) then
Inc(J);
if J = Playlist2 then
@@ -479,13 +487,15 @@ begin end;
procedure TScreenPartyOptions.SetPlaylist2;
-var I: Integer;
+var
+ I: Integer;
+
begin
Case Playlist of
0:
begin
SetLength(IPlaylist2, 1);
- IPlaylist2[0] := '---';
+ IPlaylist2[0] := '(' + IntToStr(CatSongs.NumSongs()) + ' Songs)';
end;
1:
begin
@@ -495,7 +505,8 @@ begin If CatSongs.Song[I].Main and (CatSongs.NumCatSongs(CatSongs.Song[I].OrderNum)>0) then
begin
SetLength(IPlaylist2, Length(IPlaylist2) + 1);
- IPlaylist2[high(IPlaylist2)] := CatSongs.Song[I].Artist;
+ IPlaylist2[high(IPlaylist2)] := CatSongs.Song[I].Artist +
+ ' (' + IntToStr(CatSongs.NumCatSongs(CatSongs.Song[I].OrderNum)) + ' Songs)';
end;
end;
@@ -510,7 +521,7 @@ begin if (Length(PlaylistMan.Playlists) > 0) then
begin
SetLength(IPlaylist2, Length(PlaylistMan.Playlists));
- PlaylistMan.GetNames(IPlaylist2);
+ PlaylistMan.GetNamesAndNumSongs(IPlaylist2);
end
else
begin
@@ -638,6 +649,7 @@ begin SelectedPlugin := 0;
ScreenSong.Mode := smParty;
+ SetPlaylist2;
end;
procedure TScreenPartyOptions.SetAnimationProgress(Progress: real);
diff --git a/Game/Code/Screens/UScreenPartyOptionsM2.pas b/Game/Code/Screens/UScreenPartyOptionsM2.pas index 057881f9..f27acc01 100644 --- a/Game/Code/Screens/UScreenPartyOptionsM2.pas +++ b/Game/Code/Screens/UScreenPartyOptionsM2.pas @@ -179,7 +179,7 @@ begin J := -1;
For I := 0 to high(CatSongs.Song) do
begin
- if CatSongs.Song[I].Main then
+ if CatSongs.Song[I].Main and (CatSongs.NumCatSongs(CatSongs.Song[I].OrderNum)>0) then
Inc(J);
if J = Playlist2 then
@@ -642,7 +642,7 @@ begin 0:
begin
SetLength(IPlaylist2, 1);
- IPlaylist2[0] := '---';
+ IPlaylist2[0] := '(' + IntToStr(CatSongs.NumSongs()) + ' Songs)';
end;
1:
begin
@@ -652,7 +652,8 @@ begin if CatSongs.Song[I].Main and (CatSongs.NumCatSongs(CatSongs.Song[I].OrderNum)>0) then
begin
SetLength(IPlaylist2, Length(IPlaylist2) + 1);
- IPlaylist2[high(IPlaylist2)] := CatSongs.Song[I].Artist;
+ IPlaylist2[high(IPlaylist2)] := CatSongs.Song[I].Artist +
+ ' (' + IntToStr(CatSongs.NumCatSongs(CatSongs.Song[I].OrderNum)) + ' Songs)';
end;
end;
@@ -667,7 +668,7 @@ begin if (Length(PlaylistMan.Playlists) > 0) then
begin
SetLength(IPlaylist2, Length(PlaylistMan.Playlists));
- PlaylistMan.GetNames(IPlaylist2);
+ PlaylistMan.GetNamesAndNumSongs(IPlaylist2);
end
else
begin
@@ -798,6 +799,7 @@ begin SelectedPlugin := 0;
ScreenSong.Mode := smChallenge;
+ SetPlaylist2;
end;
function TScreenPartyOptionsM2.Draw: boolean;
diff --git a/Game/Code/Screens/UScreenPartyScore.pas b/Game/Code/Screens/UScreenPartyScore.pas index cf08018d..01a4349e 100644 --- a/Game/Code/Screens/UScreenPartyScore.pas +++ b/Game/Code/Screens/UScreenPartyScore.pas @@ -6,6 +6,11 @@ uses UMenu, SDL, UDisplay, UMusic, SysUtils, UThemes;
type
+ THandler = record
+ changed: boolean;
+ change_time: real;
+ end;
+
TScreenPartyScore = class(TMenu)
public
TextScoreTeam1: Cardinal;
@@ -30,12 +35,21 @@ type R, G, B: Real;
end;
- MaxScore: Word;
+ MaxScore: Word;
+
+ ActualRound: integer;
+ Voice: integer;
+ Fadeout: boolean;
+
+ MP3VolumeHandler: THandler;
constructor Create; override;
function ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
+ function Draw: boolean; override;
procedure SetAnimationProgress(Progress: real); override;
+ procedure StartPreview;
+ procedure StartVoice;
end;
const
@@ -43,7 +57,7 @@ const implementation
-uses UGraphic, UMain, UParty, UScreenSingModi, ULanguage, UTexture, USkins, UHelp, ULog;
+uses UGraphic, UDraw, UTime, UMain, UParty, USongs, UScreenSingModi, ULanguage, UTexture, UIni, USkins, UHelp, ULog;
function TScreenPartyScore.ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean;
begin
@@ -61,26 +75,81 @@ begin Result := false;
end;
+ //MP3-Volume Up
+ SDLK_PAGEUP:
+ begin
+ if (ScreenSong.MP3Volume<100) then
+ begin
+ ScreenSong.MP3Volume := ScreenSong.MP3Volume+5;
+ Music.SetMusicVolume(ScreenSong.MP3Volume);
+ end;
+ MP3VolumeHandler.changed := true;
+ MP3VolumeHandler.change_time := 0;
+ end;
+
+ //MP3-Volume Down
+ SDLK_PAGEDOWN:
+ begin
+ if (ScreenSong.MP3Volume>0) then
+ begin
+ ScreenSong.MP3Volume := ScreenSong.MP3Volume-5;
+ Music.SetMusicVolume(ScreenSong.MP3Volume);
+ end;
+ MP3VolumeHandler.changed := true;
+ MP3VolumeHandler.change_time := 0;
+ end;
+
SDLK_ESCAPE,
- SDLK_BACKSPACE :
+ SDLK_BACKSPACE,
+ SDLK_RETURN :
begin
- Music.PlayStart;
- if (PartySession.CurRound < High(PartySession.Rounds)) then
- FadeTo(@ScreenPartyNewRound)
- else
+ if (not Fadeout) then
begin
- PartySession.EndRound;
- FadeTo(@ScreenPartyWin);
+ Music.PlayStart;
+
+ if (Ini.SavePlayback=1) then
+ Music.VoicesClose;
+
+ ScreenSong.SongIndex := -1;
+ Music.FadeStop(Ini.PreviewFading);
+
+ if (PartySession.CurRound < High(PartySession.Rounds)) then
+ FadeTo(@ScreenPartyNewRound)
+ else
+ begin
+ PartySession.EndRound;
+ FadeTo(@ScreenPartyWin);
+ end;
+ Fadeout := true;
end;
end;
- SDLK_RETURN:
+ SDLK_RIGHT:
begin
- Music.PlayStart;
- if (PartySession.CurRound < High(PartySession.Rounds)) then
- FadeTo(@ScreenPartyNewRound)
- else
- FadeTo(@ScreenPartyWin);
+ if ActualRound<Length(PlaylistMedley.Stats)-1 then
+ begin
+ Music.PlayChange;
+ inc(ActualRound);
+ //RefreshTexts;
+ if not (Ini.SavePlayback=1) then
+ StartPreview
+ else
+ StartVoice;
+ end;
+ end;
+
+ SDLK_LEFT:
+ begin
+ if ActualRound>0 then
+ begin
+ Music.PlayChange;
+ dec(ActualRound);
+ //RefreshTexts;
+ if not (Ini.SavePlayback=1) then
+ StartPreview
+ else
+ StartVoice;
+ end;
end;
end;
end;
@@ -164,6 +233,9 @@ begin if Music.VocalRemoverActivated() then
Music.DisableVocalRemover;
+
+ ActualRound := 0;
+ Fadeout := false;
//Get Maxscore
MaxScore := 0;
@@ -285,6 +357,113 @@ begin Static[StaticTeam3BG].Visible := False;
Static[StaticTeam3Deco].Visible := False;
end;
+
+ MP3VolumeHandler.changed := false;
+ if not (Ini.SavePlayback=1) then
+ StartPreview
+ else
+ begin
+ Voice := -1;
+ StartVoice;
+ end;
+end;
+
+function TScreenPartyScore.Draw: boolean;
+begin
+ inherited Draw;
+
+ if MP3VolumeHandler.changed and (MP3VolumeHandler.change_time+TimeSkip<3) then
+ begin
+ MP3VolumeHandler.change_time := MP3VolumeHandler.change_time + TimeSkip;
+ DrawVolumeBar(10, 530, 780, 12, ScreenSong.MP3Volume);
+ end else
+ MP3VolumeHandler.changed := false;
+end;
+
+procedure TScreenPartyScore.StartPreview;
+var
+ select: integer;
+ changed: boolean;
+begin
+ //When Music Preview is avtivated -> then Change Music
+ if (Ini.PreviewVolume <> 0) then
+ begin
+ changed := false;
+ if (ScreenSong.Mode = smMedley) or ScreenSong.PartyMedley then
+ begin
+ if (ActualRound<Length(PlaylistMedley.Stats)-1) and (ScreenSong.SongIndex <> PlaylistMedley.Song[ActualRound]) then
+ begin
+ select := PlaylistMedley.Song[ActualRound];
+ changed := true;
+ ScreenSong.SongIndex := select;
+ end;
+ end else
+ begin
+ select := ScreenSong.Interaction;
+ ScreenSong.SongIndex := select;
+ changed := true;
+ end;
+
+ if changed then
+ begin
+ Music.Close;
+ if Music.Open(CatSongs.Song[select].Path + CatSongs.Song[select].Mp3) then
+ begin
+ if (CatSongs.Song[select].PreviewStart>0) then
+ Music.MoveTo(CatSongs.Song[select].PreviewStart)
+ else
+ Music.MoveTo(Music.Length / 4);
+
+ //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 (ScreenSong.MP3Volume);
+ Music.Play;
+ end else
+ begin
+ Music.Fade(0, ScreenSong.MP3Volume, Ini.PreviewFading);
+ Music.Play;
+ end;
+ end;
+ end;
+ end;
+end;
+
+procedure TScreenPartyScore.StartVoice;
+var
+ changed: boolean;
+ files: array of string;
+ I: integer;
+
+begin
+ //Music.Close;
+ //ScreenSong.SongIndex := -1;
+ changed := false;
+ if (ScreenSong.Mode = smMedley) or ScreenSong.PartyMedley then
+ begin
+ if (ActualRound<Length(PlaylistMedley.Stats)-1) and (Voice <> ActualRound) then
+ begin
+ Voice := ActualRound;
+ changed := true;
+ SetLength(files, PlaylistMedley.NumPlayer);
+ for I := 0 to Length(files) - 1 do
+ files[I] := PlaylistMedley.Stats[Voice].Player[I].VoiceFile;
+ end;
+ end else
+ begin
+ Voice := 0;
+ changed := true;
+ SetLength(files, PlayersPlay);
+ for I := 0 to Length(files) - 1 do
+ files[I] := Player[I].VoiceFile;
+ end;
+
+ if changed then
+ begin
+ Music.VoicesClose;
+ if (Music.VoicesOpen(files)>0) then
+ Music.VoicesPlay;
+ end;
end;
procedure TScreenPartyScore.SetAnimationProgress(Progress: real);
diff --git a/Game/Code/Screens/UScreenScore.pas b/Game/Code/Screens/UScreenScore.pas index b8a7b61c..7c5c8253 100644 --- a/Game/Code/Screens/UScreenScore.pas +++ b/Game/Code/Screens/UScreenScore.pas @@ -23,30 +23,30 @@ type StaticMedleyNav: integer;
TextMedleyNav: integer;
- TextName: array[1..6] of integer;
- TextScore: array[1..6] of integer;
+ TextName: array[1..10] of integer;
+ TextScore: array[1..10] of integer;
- TextNotes: array[1..6] of integer;
- TextNotesScore: array[1..6] of integer;
- TextLineBonus: array[1..6] of integer;
- TextLineBonusScore: array[1..6] of integer;
- TextGoldenNotes: array[1..6] of integer;
- TextGoldenNotesScore: array[1..6] of integer;
- TextTotal: array[1..6] of integer;
- TextTotalScore: array[1..6] of integer;
+ TextNotes: array[1..10] of integer;
+ TextNotesScore: array[1..10] of integer;
+ TextLineBonus: array[1..10] of integer;
+ TextLineBonusScore: array[1..10] of integer;
+ TextGoldenNotes: array[1..10] of integer;
+ TextGoldenNotesScore: array[1..10] of integer;
+ TextTotal: array[1..10] of integer;
+ TextTotalScore: array[1..10] of integer;
- PlayerStatic: array[1..6] of array of integer;
- PlayerTexts : array[1..6] of array of integer;
+ PlayerStatic: array[1..10] of array of integer;
+ PlayerTexts : array[1..10] of array of integer;
- StaticBoxLightest: array[1..6] of integer;
- StaticBoxLight: array[1..6] of integer;
- StaticBoxDark: array[1..6] of integer;
+ StaticBoxLightest: array[1..10] of integer;
+ StaticBoxLight: array[1..10] of integer;
+ StaticBoxDark: array[1..10] of integer;
- StaticBackLevel: array[1..6] of integer;
- StaticBackLevelRound: array[1..6] of integer;
- StaticLevel: array[1..6] of integer;
- StaticLevelRound: array[1..6] of integer;
+ StaticBackLevel: array[1..10] of integer;
+ StaticBackLevelRound: array[1..10] of integer;
+ StaticLevel: array[1..10] of integer;
+ StaticLevelRound: array[1..10] of integer;
Animation: real;
Fadeout: boolean;
@@ -227,7 +227,8 @@ begin StaticMedleyNav := AddStatic(Theme.Score.StaticMedleyNav);
TextMedleyNav := AddText(Theme.Score.TextMedleyNav);
- for P := 1 to 6 do begin
+ for P := 1 to 10 do
+ begin
TextName[P] := AddText(Theme.Score.TextName[P]);
TextScore[P] := AddText(Theme.Score.TextScore[P]);
@@ -268,7 +269,7 @@ procedure TScreenScore.onShow; var
P: integer; // player
I: integer;
- V: array[1..6] of boolean; // visibility array
+ V: array[1..10] of boolean; // visibility array
begin
if not Help.SetHelpID(ID) then
Log.LogError('No Entry for Help-ID ' + ID + ' (ScreenScore)');
@@ -284,34 +285,78 @@ begin Text[TextArtistTitle].Text := AktSong.Artist + ' - ' + AktSong.Title;
// set visibility
- case PlayersPlay of
- 1: begin
+ if (not ScreenSing.P4Mode) then
+ begin
+ case PlayersPlay of
+ 1: begin
V[1] := true;
V[2] := false;
V[3] := false;
V[4] := false;
V[5] := false;
V[6] := false;
- end;
- 2, 4: begin
+ V[7] := false;
+ V[8] := false;
+ V[9] := false;
+ V[10] := false;
+ end;
+ 2, 4: begin
V[1] := false;
V[2] := true;
V[3] := true;
V[4] := false;
V[5] := false;
V[6] := false;
- end;
- 3, 6: begin
+ V[7] := false;
+ V[8] := false;
+ V[9] := false;
+ V[10] := false;
+ end;
+ 3, 6: begin
V[1] := false;
V[2] := false;
V[3] := false;
V[4] := true;
V[5] := true;
V[6] := true;
- end;
+ V[7] := false;
+ V[8] := false;
+ V[9] := false;
+ V[10] := false;
+ end;
+ end;
+ end else
+ begin
+ case PlayersPlay of
+ 4: begin
+ V[1] := false;
+ V[2] := false;
+ V[3] := false;
+ V[4] := false;
+ V[5] := false;
+ V[6] := false;
+ V[7] := true;
+ V[8] := true;
+ V[9] := true;
+ V[10] := true;
+ end;
+ 6: begin //not finished yet!
+ V[1] := false;
+ V[2] := false;
+ V[3] := false;
+ V[4] := true;
+ V[5] := true;
+ V[6] := true;
+ V[7] := false;
+ V[8] := false;
+ V[9] := false;
+ V[10] := false;
+ end;
+ end;
+
end;
- for P := 1 to 6 do
+ for P := 1 to 10 do
begin
Text[TextName[P]].Visible := V[P];
Text[TextScore[P]].Visible := V[P];
@@ -325,6 +370,15 @@ begin Text[TextTotal[P]].Visible := V[P];
Text[TextTotalScore[P]].Visible := V[P];
+ //4P-hack:
+ if (P>7) then
+ begin
+ Text[TextNotes[P]].Visible := false;
+ Text[TextLineBonus[P]].Visible := false;
+ Text[TextGoldenNotes[P]].Visible := false;
+ Text[TextTotal[P]].Visible := false;
+ end;
+
for I := 0 to high(PlayerStatic[P]) do
Static[PlayerStatic[P, I]].Visible := V[P];
@@ -341,21 +395,6 @@ begin Static[StaticLevelRound[P]].Visible := V[P];
end;
- {
- if PlayersPlay <= 3 then begin // only for 1 screen mode
- for P := 0 to PlayersPlay-1 do begin
- case PlayersPlay of
- 1: PP := 1;
- 2: PP := P + 2;
- 3: PP := P + 4;
- end;
-
- //Replaced this whole thing with one Procedure call
- FillPlayer(PP, P);
-
- end; // for
- end; // if }
-
if (ScreenSong.Mode = smMedley) or ScreenSong.PartyMedley then
begin
Static[StaticMedleyNav].Visible := true;
@@ -380,19 +419,15 @@ end; function TScreenScore.Draw: boolean;
var
-{ Min: real;
- Max: real;
- Wsp: real;
- Wsp2: real;
- Pet: integer;}
-
Item: integer;
P: integer;
begin
Item := 0;
P := 0;
- if PlayersPlay <= 3 then begin // only for 1 screen mode
- for P := 0 to PlayersPlay-1 do begin
+ if PlayersPlay <= 3 then
+ begin // only for 1 screen mode
+ for P := 0 to PlayersPlay-1 do
+ begin
case PlayersPlay of
1: Item := 1;
2: Item := P + 2;
@@ -406,8 +441,10 @@ begin end; // if
// 0.5.0: try also use 4 players screen with nicks
- if PlayersPlay = 4 then begin
- for Item := 2 to 3 do begin
+ if (not ScreenSing.P4Mode) and (PlayersPlay = 4) then
+ begin
+ for Item := 2 to 3 do
+ begin
if ScreenAct = 1 then P := Item-2;
if ScreenAct = 2 then P := Item;
@@ -415,10 +452,21 @@ begin end;
end;
+ if (ScreenSing.P4Mode) and (PlayersPlay = 4) then
+ begin
+ for Item := 7 to 10 do
+ begin
+ P := Item-7;
+ FillPlayer(Item, P);
+ end;
+ end;
+
// Singstar - let it be...... with 6 statics
- if PlayersPlay = 6 then begin
- for Item := 4 to 6 do begin
+ if PlayersPlay = 6 then
+ begin
+ for Item := 4 to 6 do
+ begin
if ScreenAct = 1 then P := Item-4;
if ScreenAct = 2 then P := Item-1;
@@ -501,7 +549,8 @@ begin Static[StaticLevel[Item]].Texture.Y := Static[StaticBackLevel[Item]].Texture.Y + Static[StaticBackLevel[Item]].Texture.H - Static[StaticLevel[Item]].Texture.H;
// we modify LevelRound texture by changing it's Y. TexY1 and TexY2 change when the height to draw is lower than 20
- if Lev * MaxH < Static[StaticBackLevelRound[Item]].Texture.H / 2 then begin
+ if Lev * MaxH < Static[StaticBackLevelRound[Item]].Texture.H / 2 then
+ begin
// when it's lower than 20 => we move TexY1 and TexY2 higher to show only part of this texture
Static[StaticLevelRound[Item]].Texture.Y := Static[StaticBackLevel[Item]].Texture.Y + Static[StaticBackLevel[Item]].Texture.H - Static[StaticBackLevelRound[Item]].Texture.H;
// - 0.25 when points = 0
@@ -512,7 +561,8 @@ begin Wsp := Lev * MaxH / (Static[StaticBackLevelRound[Item]].Texture.H / 2);
Static[StaticLevelRound[Item]].Texture.TexY1 := Static[StaticBackLevelRound[Item]].Texture.TexY1 - 0.25 + 0.25 * Wsp;
Static[StaticLevelRound[Item]].Texture.TexY2 := Static[StaticBackLevelRound[Item]].Texture.TexY2 - 0.25 + 0.25 * Wsp;
- end else begin
+ end else
+ begin
// when it's higher or equal 20 => full texture is being shown
Static[StaticLevelRound[Item]].Texture.TexY1 := Static[StaticBackLevelRound[Item]].Texture.TexY1;
Static[StaticLevelRound[Item]].Texture.TexY2 := Static[StaticBackLevelRound[Item]].Texture.TexY2;
@@ -600,7 +650,7 @@ begin end;
end;
-procedure TScreenSCore.StartVoice;
+procedure TScreenScore.StartVoice;
var
changed: boolean;
files: array of string;
diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas index e8884329..472d11dc 100644 --- a/Game/Code/Screens/UScreenSing.pas +++ b/Game/Code/Screens/UScreenSing.pas @@ -240,8 +240,7 @@ begin Result := false;
end;
- SDLK_ESCAPE,
- SDLK_BACKSPACE :
+ SDLK_ESCAPE:
begin
//Record Sound Hack:
//Sound[0].BufferLong
diff --git a/Game/Code/Screens/UScreenSingModi.pas b/Game/Code/Screens/UScreenSingModi.pas index 0370509e..56ea438a 100644 --- a/Game/Code/Screens/UScreenSingModi.pas +++ b/Game/Code/Screens/UScreenSingModi.pas @@ -76,8 +76,7 @@ begin If (PressedDown) Then
begin // Key Down
case PressedKey of
- SDLK_ESCAPE,
- SDLK_BACKSPACE :
+ SDLK_ESCAPE:
begin
if ScreenSong.PartyMedley then
begin
diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas index 6b5792d2..7c7d04ba 100644 --- a/Game/Code/Screens/UScreenSong.pas +++ b/Game/Code/Screens/UScreenSong.pas @@ -41,6 +41,7 @@ type isScrolling: boolean;
public
+ Sel3: integer; //Selection in party mode (0=current, -1=left, 1=right)
MP3Volume: integer;
MP3VolumeHandler: THandler;
TextArtist: integer;
@@ -618,87 +619,100 @@ begin SDLK_ESCAPE,
SDLK_BACKSPACE :
begin
- WaitHandler.change_time := 0;
- if (Mode = smNormal) or ((Mode = smChallenge) and not PartyMedley and not FoundCAT) then
- begin
- //On Escape goto Cat-List Hack
- if (Ini.Tabs = 1) AND (CatSongs.CatNumShow <> -1) then
+ if UVideo.VideoOpened then
+ begin
+ if TargetVidVis=full then
begin
- //Find Category
- I := Interaction;
- while not catsongs.Song[I].Main do
+ TargetVidVis:=windowed;
+ TargetAspect := acoCrop;
+ if not VidVisHandler.changed then
begin
- Dec (I);
- if (I < low(catsongs.Song)) then
- break;
+ VidVisHandler.changed := true;
+ VidVisHandler.change_time := 0;
end;
- if (I<= 1) then
- Interaction := high(catsongs.Song)
- else
- Interaction := I - 1;
-
- //Stop Music
- Music.Stop;
+ Exit;
+ end;
+ end;
- //Stop Video
- acClose;
+ WaitHandler.change_time := 0;
+ if (Mode = smNormal) or ((Mode = smChallenge) and not PartyMedley and not FoundCAT) then
+ begin
+ //On Escape goto Cat-List Hack
+ if (Ini.Tabs = 1) AND (CatSongs.CatNumShow <> -1) then
+ begin
+ //Find Category
+ I := Interaction;
+ while not catsongs.Song[I].Main do
+ begin
+ Dec (I);
+ if (I < low(catsongs.Song)) then
+ break;
+ end;
- CatSongs.ShowCategoryList;
+ if (I<= 1) then
+ Interaction := high(catsongs.Song)
+ else
+ Interaction := I - 1;
- //Show Cat in Top Left Mod
- HideCatTL;
+ //Stop Music
+ Music.Stop;
+ //Stop Video
+ acClose;
- //Show Wrong Song when Tabs on Fix
- SelectNext;
- FixSelected;
- //SelectPrev;
- //CatSongs.Song[0].Visible := False;
- end
- else
- begin
- //On Escape goto Cat-List Hack End
- //Tabs off and in Search or Playlist -> Go back to Song view
- if (CatSongs.CatNumShow < -1) then
- begin
- //Atm: Set Empty Filter
- CatSongs.SetFilter('', 0);
+ CatSongs.ShowCategoryList;
//Show Cat in Top Left Mod
HideCatTL;
- Interaction := 0;
+
//Show Wrong Song when Tabs on Fix
SelectNext;
FixSelected;
-
- ChangeMusic;
- end
- else if (Mode = smNormal) then
+ //SelectPrev;
+ //CatSongs.Song[0].Visible := False;
+ end else
begin
- Music.Stop;
- Music.PlayBack;
- acClose;
+ //On Escape goto Cat-List Hack End
+ //Tabs off and in Search or Playlist -> Go back to Song view
+ if (CatSongs.CatNumShow < -1) then
+ begin
+ //Atm: Set Empty Filter
+ CatSongs.SetFilter('', 0);
- FadeTo(@ScreenMain);
- end else if (Mode = smChallenge) then
- begin
- Music.PlayBack;
- CheckFadeTo(@ScreenMain,'MSG_END_PARTY');
+ //Show Cat in Top Left Mod
+ HideCatTL;
+ Interaction := 0;
+
+ //Show Wrong Song when Tabs on Fix
+ SelectNext;
+ FixSelected;
+
+ ChangeMusic;
+ end else if (Mode = smNormal) then
+ begin
+ Music.Stop;
+ Music.PlayBack;
+ acClose;
+
+ FadeTo(@ScreenMain);
+ end else if (Mode = smChallenge) then
+ begin
+ Music.PlayBack;
+ CheckFadeTo(@ScreenMain,'MSG_END_PARTY');
+ end;
end;
+ end else if (Mode = smChallenge) then
+ begin
+ Music.PlayBack;
+ CheckFadeTo(@ScreenMain,'MSG_END_PARTY');
+ end
+ //When in party Mode then Ask before Close
+ else if (Mode = smParty) then
+ begin
+ Music.PlayBack;
+ CheckFadeTo(@ScreenMain,'MSG_END_PARTY');
end;
- end
- else if (Mode = smChallenge) then
- begin
- Music.PlayBack;
- CheckFadeTo(@ScreenMain,'MSG_END_PARTY');
- end
- //When in party Mode then Ask before Close
- else if (Mode = smParty) then
- begin
- Music.PlayBack;
- CheckFadeTo(@ScreenMain,'MSG_END_PARTY');
- end;
end;
SDLK_RETURN:
begin
@@ -955,8 +969,12 @@ begin SDLK_RIGHT:
begin
if (Length(Songs.Song) > 0) AND
- ((Mode = smNormal) or ((Mode = smChallenge) and CatSongs.Song[Interaction].Main)) then
+ (((Mode = smNormal) or ((Mode = smChallenge) and CatSongs.Song[Interaction].Main)) or
+ ((Mode = smParty) and (PartySession.Rand3) and (Sel3<=0))) then
begin
+ if (Mode = smParty) then
+ Inc(Sel3);
+
Music.PlayChange;
SelectNext;
ChangeMusic;
@@ -967,8 +985,12 @@ begin SDLK_LEFT:
begin
if (Length(Songs.Song) > 0) AND
- ((Mode = smNormal) or ((Mode = smChallenge) and CatSongs.Song[Interaction].Main)) then
+ (((Mode = smNormal) or ((Mode = smChallenge) and CatSongs.Song[Interaction].Main)) or
+ ((Mode = smParty) and (PartySession.Rand3) and (Sel3>=0))) then
begin
+ if (Mode = smParty) then
+ Dec(Sel3);
+
Music.PlayChange;
SelectPrev;
ChangeMusic;
@@ -2085,6 +2107,8 @@ begin MakeMedley := false;
isScrolling := false;
+ Sel3 := 0;
+
StartTry := false;
AspectHandler.changed := false;
InfoHandler.changed := false;
@@ -2104,7 +2128,7 @@ begin Text[TextTop[I]].Visible := false;
Static[StaticTop].Visible := false;
-
+ HideCatTL;
//Cat Mod etc
if (Ini.Tabs = 1) AND (CatSongs.CatNumShow = -1) AND
(PlaylistMan.Mode=0) then
@@ -2659,6 +2683,9 @@ begin WaitHandler.active := true;
WaitHandler.lastIndex := Interaction;
WaitHandler.lastCat := CatSongs.CatNumShow;
+
+ if (Ini.ShuffleTime=10) and (VidVis<>full) then
+ VidVis := full;
end;
if(Ini.Tabs<>1) or (CatSongs.CatNumShow < -1) then
@@ -2720,7 +2747,7 @@ begin end;
end;
- Music.PlayChange;
+ //Music.PlayChange;
ChangeMusic;
SetScroll4;
end else if (Ini.ShuffleTime>0) then
@@ -2912,10 +2939,13 @@ begin begin
if Music.Open(CatSongs.Song[Interaction].Path + CatSongs.Song[Interaction].Mp3) then
begin
- if (CatSongs.Song[Interaction].PreviewStart>0) then
- Music.MoveTo(CatSongs.Song[Interaction].PreviewStart)
- else
- Music.MoveTo(Music.Length / 4);
+ if not (Ini.ShuffleTime>9) or not WaitHandler.active then
+ begin
+ if (CatSongs.Song[Interaction].PreviewStart>0) then
+ Music.MoveTo(CatSongs.Song[Interaction].PreviewStart)
+ else
+ Music.MoveTo(Music.Length / 4);
+ end;
StartVideoPreview;
//If Song Fading is activated then don't Play directly, and Set Volume to Null, else Play normal
@@ -3679,6 +3709,7 @@ end; //Team No of Team (0-5)
procedure TScreenSong.DoJoker (Team: Byte; SDL_ModState: Word);
begin
+ Sel3 := 0;
if not PartyMedley and (ChooseableSongs>1) and
(Mode = smParty) AND (PartySession.Teams.NumTeams >= Team + 1) AND (PartySession.Teams.Teaminfo[Team].Joker > 0) then
begin
diff --git a/Game/Code/Screens/UScreenSongMenu.pas b/Game/Code/Screens/UScreenSongMenu.pas index 1a3ee675..72ec1337 100644 --- a/Game/Code/Screens/UScreenSongMenu.pas +++ b/Game/Code/Screens/UScreenSongMenu.pas @@ -179,6 +179,15 @@ begin if (CurMenu = SM_Sort) then
Button[3].Visible := (Ini.Sorting <> SelectValue);
+
+ if (ScreenSong.Mode = smParty) and (ScreenSong.Sel3<=0) then
+ begin
+ Inc(ScreenSong.Sel3);
+ Music.PlayChange;
+ ScreenSong.SelectNext;
+ ScreenSong.ChangeMusic;
+ ScreenSong.SetScroll4;
+ end;
end;
SDLK_LEFT:
begin
@@ -187,6 +196,15 @@ begin if (CurMenu = SM_Sort) then
Button[3].Visible := (Ini.Sorting <> SelectValue);
+
+ if (ScreenSong.Mode = smParty) and (ScreenSong.Sel3>=0) then
+ begin
+ Dec(ScreenSong.Sel3);
+ Music.PlayChange;
+ ScreenSong.SelectPrev;
+ ScreenSong.ChangeMusic;
+ ScreenSong.SetScroll4;
+ end;
end;
SDLK_1:
diff --git a/Game/Code/UltraStar.bdsproj b/Game/Code/UltraStar.bdsproj index acdabdad..c08bee96 100644 --- a/Game/Code/UltraStar.bdsproj +++ b/Game/Code/UltraStar.bdsproj @@ -170,8 +170,7 @@ <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/UltraStar.dpr b/Game/Code/UltraStar.dpr index f9dae482..0ebd5c78 100644 --- a/Game/Code/UltraStar.dpr +++ b/Game/Code/UltraStar.dpr @@ -119,7 +119,7 @@ uses UVideo in 'Classes\UVideo.pas';
const
- Version = 'UltraStar Deluxe Challenge, Medley & Duet Edition r9 RC';
+ Version = 'UltraStar Deluxe Challenge, Medley & Duet Edition r9 RC2.1';
var
WndTitle: string;
|