aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens
diff options
context:
space:
mode:
authorbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-07-04 17:06:14 +0000
committerbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-07-04 17:06:14 +0000
commitac12e8ff541b2d30f0b5dd070f83fc43d9b2116d (patch)
tree7964d52f95b38c3efd915286cba797817518f366 /Game/Code/Screens
parent075cb824a31c5e6e1cc6ee6f0087ac5598ba003a (diff)
downloadusdx-ac12e8ff541b2d30f0b5dd070f83fc43d9b2116d.tar.gz
usdx-ac12e8ff541b2d30f0b5dd070f83fc43d9b2116d.tar.xz
usdx-ac12e8ff541b2d30f0b5dd070f83fc43d9b2116d.zip
- possible/remainings score bar in singscreen: red at start, decreasing with lost score, filling green from left with score
- added session log. log all played songs with player names and score - fixed calculation of possible scores - change tabs on/off: now with CTRL+T (songscreen) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2573 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Screens')
-rw-r--r--Game/Code/Screens/UScreenSing.pas61
-rw-r--r--Game/Code/Screens/UScreenSingModi.pas15
-rw-r--r--Game/Code/Screens/UScreenSong.pas6
3 files changed, 71 insertions, 11 deletions
diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas
index fbf128b0..94c5d162 100644
--- a/Game/Code/Screens/UScreenSing.pas
+++ b/Game/Code/Screens/UScreenSing.pas
@@ -216,7 +216,7 @@ begin
SDLK_S:
begin
- Ini.PossibleScore := (Ini.PossibleScore+1) mod 2;
+ Ini.PossibleScore := (Ini.PossibleScore+1) mod 3;
Ini.Save;
end;
@@ -1040,9 +1040,6 @@ begin
end;
procedure TScreenSing.onShowFinish;
-var
- I: integer;
-
begin
// play movie (II)
if AktSong.VideoLoaded then
@@ -1414,20 +1411,26 @@ begin
for I := 0 to Length(Czesci) - 1 do
begin
+ //init K ...
K := Czesci[I].Akt;
+
+ //find actual line
for J := 0 to Czesci[I].High do
begin
if Czas.AktBeat >= Czesci[I].Czesc[J].Start then
K := J;
end;
+ //time diff
ab := GetTimeFromBeat(Czesci[I].Czesc[K].StartNote) - Czas.Teraz;
+ //last line
if (K = Czesci[I].High) then
ab := Czas.Teraz - GetTimeFromBeat(Czesci[I].Czesc[K].Nuta[Czesci[I].Czesc[K].HighNut].Start+
Czesci[I].Czesc[K].Nuta[Czesci[I].Czesc[K].HighNut].Dlugosc);
- if (ab>2*dt) then
+ //lyric main and other nice things
+ if (ab>2.5*dt) or ((K = Czesci[I].High) and (ab>dt)) then
begin
Alpha[I] := Alpha[I]-TimeSkip/dt;
if (Alpha[I]<0) then
@@ -1440,6 +1443,7 @@ begin
end else
Alpha[I] := 1;
+ //lyric sub
if (K < Czesci[I].High) then
begin
ab := GetTimeFromBeat(Czesci[I].Czesc[K+1].StartNote) - Czas.Teraz;
@@ -1579,12 +1583,16 @@ var
I, J: integer;
len, num: integer;
points: string;
+ scores: array of string;
+ names: array of string;
+ singmode: string;
begin
Music.CaptureStop;
Music.Stop;
- if Ini.SavePlayback = 1 then begin
+ if (Ini.SavePlayback = 1) and not FadeOut then
+ begin
Log.BenchmarkStart(0);
for I := 0 to PlayersPlay - 1 do
@@ -1600,7 +1608,46 @@ begin
Log.LogBenchmark('Creating files', 0);
end;
- if AktSong.VideoLoaded then begin
+ if (Ini.LogSession=1) and not FadeOut then
+ begin
+ SetLength(scores, PlayersPlay);
+ SetLength(names, PlayersPlay);
+ for I := 0 to PlayersPlay - 1 do
+ begin
+ points := IntToStr(Player[I].ScoreTotalI);
+ while Length(points) < 5 do
+ points := '0'+points;
+
+ scores[I] := points;
+ names[I] := Ini.Name[I];
+ end;
+
+ if (ScreenSong.Mode = smParty) then
+ singmode := PartySession.Plugins[PartySession.Rounds[PartySession.CurRound].PluginNr].Name
+ else if (ScreenSong.Mode = smChallenge) then
+ singmode := PartySessionM2.Plugins[PartySessionM2.Rounds[PartySessionM2.CurRound].PluginNr].Name;
+
+ if (ScreenSong.Mode = smMedley) or ScreenSong.PartyMedley then
+ begin
+ if (ScreenSong.Mode = smMedley) then
+ singmode := 'Medley';
+
+ if (PlaylistMedley.CurrentMedleySong<=PlaylistMedley.NumMedleySongs) then
+ singmode := singmode + ' (' + IntToStr(PlaylistMedley.CurrentMedleySong) +
+ '/' + IntToStr(PlaylistMedley.NumMedleySongs) + ')'
+ else
+ singmode := singmode + ' (' + IntToStr(PlaylistMedley.NumMedleySongs) +
+ '/' + IntToStr(PlaylistMedley.NumMedleySongs) + ')';
+
+ end else if(ScreenSong.Mode = smNormal) then
+ begin
+ singmode := 'Normal';
+ end;
+ Log.LogSession(names, scores, AktSong.Artist, AktSong.Title, singmode);
+ end;
+
+ if AktSong.VideoLoaded then
+ begin
acClose;
AktSong.VideoLoaded := false; // to prevent drawing closed video
end;
diff --git a/Game/Code/Screens/UScreenSingModi.pas b/Game/Code/Screens/UScreenSingModi.pas
index 6144c27f..0370509e 100644
--- a/Game/Code/Screens/UScreenSingModi.pas
+++ b/Game/Code/Screens/UScreenSingModi.pas
@@ -83,6 +83,7 @@ begin
begin
PlaylistMedley.CurrentMedleySong:=PlaylistMedley.NumMedleySongs+1;
Finish;
+ FadeOut := true;
Music.PlayBack;
for I := 0 to PlayersPlay-1 do //TODO: leave all this?
@@ -106,6 +107,7 @@ begin
end else
begin
Finish;
+ FadeOut := true;
Music.PlayBack;
if (ScreenSong.Mode=smParty) then
@@ -624,21 +626,28 @@ end;
end;
end;
- for I := 0 to Length(Czesci) - 1 do
+ for I := 0 to Length(Czesci) - 1 do
begin
+ //init K ...
K := Czesci[I].Akt;
+
+ //find actual line
for J := 0 to Czesci[I].High do
begin
if Czas.AktBeat >= Czesci[I].Czesc[J].Start then
K := J;
end;
+
+ //time diff
ab := GetTimeFromBeat(Czesci[I].Czesc[K].StartNote) - Czas.Teraz;
+ //last line
if (K = Czesci[I].High) then
ab := Czas.Teraz - GetTimeFromBeat(Czesci[I].Czesc[K].Nuta[Czesci[I].Czesc[K].HighNut].Start+
Czesci[I].Czesc[K].Nuta[Czesci[I].Czesc[K].HighNut].Dlugosc);
- if (ab>2*dt) then
+ //lyric main and other nice things
+ if (ab>2.5*dt) or ((K = Czesci[I].High) and (ab>dt)) then
begin
Alpha[I] := Alpha[I]-TimeSkip/dt;
if (Alpha[I]<0) then
@@ -651,6 +660,7 @@ end;
end else
Alpha[I] := 1;
+ //lyric sub
if (K < Czesci[I].High) then
begin
ab := GetTimeFromBeat(Czesci[I].Czesc[K+1].StartNote) - Czas.Teraz;
@@ -664,6 +674,7 @@ end;
end;
end;
+
if not AktSong.isDuet then
begin
Alpha[1] := Alpha[0];
diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas
index 56590166..226ae532 100644
--- a/Game/Code/Screens/UScreenSong.pas
+++ b/Game/Code/Screens/UScreenSong.pas
@@ -1118,7 +1118,7 @@ begin
ChangeSorting(Ini.Tabs=1, Ini.Sorting+1)
else
ChangeSorting(Ini.Tabs=1, 0);
- end else
+ end else if (SDL_ModState = KMOD_LCTRL) then
begin
//Change Tabs (on/off)
if (Ini.Tabs=1) then
@@ -1413,7 +1413,6 @@ begin
else
Interaction := I - 1;
- //Show Cat in Top Left Mod
HideCatTL;
//Show Wrong Song when Tabs on Fix
@@ -1445,6 +1444,9 @@ begin
ChangeMusic;
end;
+ if (Ini.Tabs=0) then
+ HideCatTL;
+
Ini.Save;
InfoHandler.changed := true;