aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code
diff options
context:
space:
mode:
authorbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-11-05 14:23:57 +0000
committerbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-11-05 14:23:57 +0000
commite48e5d9ecd902ecf6a774680959df5ae243737f7 (patch)
treee485fd1514d2238f71f73ed49ca2e25743cc0503 /Game/Code
parenta7d0970a2e7dec907fccbc2d63ffb5cb799a7505 (diff)
downloadusdx-e48e5d9ecd902ecf6a774680959df5ae243737f7.tar.gz
usdx-e48e5d9ecd902ecf6a774680959df5ae243737f7.tar.xz
usdx-e48e5d9ecd902ecf6a774680959df5ae243737f7.zip
- fix: appearence of short notes in 4/6 player mode on one screen
- fix: playing notes in editor (esp. on high bpm) - add: disable showning notes and scores in singscreen with N - some other small corrections git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2711 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code')
-rw-r--r--Game/Code/Classes/UDraw.pas89
-rw-r--r--Game/Code/Classes/ULog.pas42
-rw-r--r--Game/Code/Screens/UScreenEditSub.pas123
-rw-r--r--Game/Code/Screens/UScreenSing.pas517
-rw-r--r--Game/Code/Screens/UScreenSong.pas2
-rw-r--r--Game/Code/UltraStar.bdsproj3
-rw-r--r--Game/Code/UltraStar.dpr2
7 files changed, 442 insertions, 336 deletions
diff --git a/Game/Code/Classes/UDraw.pas b/Game/Code/Classes/UDraw.pas
index 9fa0a4f7..bfc51916 100644
--- a/Game/Code/Classes/UDraw.pas
+++ b/Game/Code/Classes/UDraw.pas
@@ -64,7 +64,7 @@ var
TickOld: cardinal;
TickOld2:cardinal;
//end Singbar Mod
-
+ ShowNotes: integer; //0=show all; 1=don't show notes+rating; 2=don't show notes, rating, score+score bar
@@ -100,7 +100,6 @@ var
begin
if ScreenSing.Tex_Background.TexNum >= 1 then
begin
- exit;
glClearColor (1, 1, 1, 1);
glColor4f (1, 1, 1, 1);
@@ -194,6 +193,9 @@ procedure SingDrawNoteLines(Left, Top, Right: real; Space: integer; Alpha: real)
var
Pet: integer;
begin
+ if (ShowNotes>0) then
+ Exit;
+
glEnable(GL_BLEND);
glColor4f(Skin_P1_LinesR, Skin_P1_LinesG, Skin_P1_LinesB, 0.4*Alpha);
glBegin(GL_LINES);
@@ -213,6 +215,9 @@ var
end_: integer;
st: integer;
begin
+ if (ShowNotes>0) then
+ Exit;
+
CP := NrCzesci;
{if (Length(Czesci[CP].Czesc[Czesci[CP].Akt].Nuta)=0) then
begin
@@ -263,6 +268,9 @@ var
st: integer;
nW: real;
begin
+ if (ShowNotes>0) then
+ Exit;
+
CP := NrCzesci;
if (Length(Czesci[CP].Czesc[Czesci[CP].Akt].Nuta)=0) then
Exit
@@ -286,8 +294,8 @@ begin
with Nuta[Pet] do
begin
nW := NotesW;
- if ( 1 + 2*NotesW >Dlugosc * TempR ) then
- nW := TempR/2;
+ if (1+2*NotesW >Dlugosc * TempR ) then
+ nW := (Dlugosc*TempR-1)/2;
if not FreeStyle then
begin
@@ -310,9 +318,9 @@ begin
glBindTexture(GL_TEXTURE_2D, Tex_Left[Color].TexNum);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex2f(Rec.Left, Rec.Top);
- glTexCoord2f(0, 1); glVertex2f(Rec.Left, Rec.Bottom);
- glTexCoord2f(1, 1); glVertex2f(Rec.Right, Rec.Bottom);
- glTexCoord2f(1, 0); glVertex2f(Rec.Right, Rec.Top);
+ glTexCoord2f(0, Tex_Left[Color].TexH); glVertex2f(Rec.Left, Rec.Bottom);
+ glTexCoord2f(Tex_Left[Color].TexW, Tex_Left[Color].TexH); glVertex2f(Rec.Right, Rec.Bottom);
+ glTexCoord2f(Tex_Left[Color].TexW, 0); glVertex2f(Rec.Right, Rec.Top);
glEnd;
//We keep the postion of the top left corner b4 it's overwritten
@@ -328,9 +336,9 @@ begin
glBindTexture(GL_TEXTURE_2D, Tex_Mid[Color].TexNum);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex2f(Rec.Left, Rec.Top);
- glTexCoord2f(0, 1); glVertex2f(Rec.Left, Rec.Bottom);
- glTexCoord2f(1, 1); glVertex2f(Rec.Right, Rec.Bottom);
- glTexCoord2f(1, 0); glVertex2f(Rec.Right, Rec.Top);
+ glTexCoord2f(0, Tex_Mid[Color].TexH); glVertex2f(Rec.Left, Rec.Bottom);
+ glTexCoord2f(Tex_Mid[Color].TexW, Tex_Mid[Color].TexH); glVertex2f(Rec.Right, Rec.Bottom);
+ glTexCoord2f(Tex_Mid[Color].TexW, 0); glVertex2f(Rec.Right, Rec.Top);
glEnd;
end;
@@ -341,9 +349,9 @@ begin
glBindTexture(GL_TEXTURE_2D, Tex_Right[Color].TexNum);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex2f(Rec.Left, Rec.Top);
- glTexCoord2f(0, 1); glVertex2f(Rec.Left, Rec.Bottom);
- glTexCoord2f(1, 1); glVertex2f(Rec.Right, Rec.Bottom);
- glTexCoord2f(1, 0); glVertex2f(Rec.Right, Rec.Top);
+ glTexCoord2f(0, Tex_Right[Color].TexH); glVertex2f(Rec.Left, Rec.Bottom);
+ glTexCoord2f(Tex_Right[Color].TexW, Tex_Right[Color].TexH); glVertex2f(Rec.Right, Rec.Bottom);
+ glTexCoord2f(Tex_Right[Color].TexW, 0); glVertex2f(Rec.Right, Rec.Top);
glEnd;
// Golden Star Patch
@@ -373,6 +381,9 @@ var
st: integer;
nW: real;
begin
+ if (ShowNotes>0) then
+ Exit;
+
if (Length(Czesci[CP].Czesc[Czesci[CP].Akt].Nuta)=0) then
Exit
else
@@ -393,7 +404,7 @@ begin
begin
nW := NotesW;
if ( 1 + 2*NotesW >Dlugosc * TempR ) then
- nW := TempR/2;
+ nW := (Dlugosc*TempR-1)/2;
// lewa czesc
Rec.Left := X + (Start-st) * TempR + 0.5 {+ 10*ScreenX};
@@ -415,9 +426,9 @@ begin
glBindTexture(GL_TEXTURE_2D, Tex_Left[NrGracza+1].TexNum);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex2f(Rec.Left, Rec.Top);
- glTexCoord2f(0, 1); glVertex2f(Rec.Left, Rec.Bottom);
- glTexCoord2f(1, 1); glVertex2f(Rec.Right, Rec.Bottom);
- glTexCoord2f(1, 0); glVertex2f(Rec.Right, Rec.Top);
+ glTexCoord2f(0, Tex_Left[NrGracza+1].TexH); glVertex2f(Rec.Left, Rec.Bottom);
+ glTexCoord2f(Tex_Left[NrGracza+1].TexW, Tex_Left[NrGracza+1].TexH); glVertex2f(Rec.Right, Rec.Bottom);
+ glTexCoord2f(Tex_Left[NrGracza+1].TexW, 0); glVertex2f(Rec.Right, Rec.Top);
glEnd;
// srodkowa czesc
@@ -434,9 +445,9 @@ begin
glBindTexture(GL_TEXTURE_2D, Tex_Mid[NrGracza+1].TexNum);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex2f(Rec.Left, Rec.Top);
- glTexCoord2f(0, 1); glVertex2f(Rec.Left, Rec.Bottom);
- glTexCoord2f(1, 1); glVertex2f(Rec.Right, Rec.Bottom);
- glTexCoord2f(1, 0); glVertex2f(Rec.Right, Rec.Top);
+ glTexCoord2f(0, Tex_Mid[NrGracza+1].TexH); glVertex2f(Rec.Left, Rec.Bottom);
+ glTexCoord2f(Tex_Mid[NrGracza+1].TexW, Tex_Mid[NrGracza+1].TexH); glVertex2f(Rec.Right, Rec.Bottom);
+ glTexCoord2f(Tex_Mid[NrGracza+1].TexW, 0); glVertex2f(Rec.Right, Rec.Top);
glEnd;
end;
@@ -447,9 +458,9 @@ begin
glBindTexture(GL_TEXTURE_2D, Tex_Right[NrGracza+1].TexNum);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex2f(Rec.Left, Rec.Top);
- glTexCoord2f(0, 1); glVertex2f(Rec.Left, Rec.Bottom);
- glTexCoord2f(1, 1); glVertex2f(Rec.Right, Rec.Bottom);
- glTexCoord2f(1, 0); glVertex2f(Rec.Right, Rec.Top);
+ glTexCoord2f(0, Tex_Right[NrGracza+1].TexH); glVertex2f(Rec.Left, Rec.Bottom);
+ glTexCoord2f(Tex_Right[NrGracza+1].TexW, Tex_Right[NrGracza+1].TexH); glVertex2f(Rec.Right, Rec.Bottom);
+ glTexCoord2f(Tex_Right[NrGracza+1].TexW, 0); glVertex2f(Rec.Right, Rec.Top);
glEnd;
if Perfect and (Ini.EffectSing=1) then begin
@@ -476,12 +487,16 @@ var
Pet: integer;
TempR: real;
X1, X2, X3, X4: real;
- W, H: real;
+ H: real;
CP: integer;
end_: integer;
st: integer;
nW: real;
+
begin
+ if (ShowNotes>0) then
+ Exit;
+
if (Player[NrGracza].ScoreTotalI >= 0) then
begin
CP := NrCzesci;
@@ -515,22 +530,21 @@ begin
begin
with Nuta[Pet] do
begin
- if not FreeStyle then
+ if not FreeStyle and (Dlugosc>0) then
begin
nW := NotesW;
if ( 1 + 2*NotesW >Dlugosc * TempR ) then
- nW := TempR/2;
+ nW := (Dlugosc*TempR-1)/2;
// begin: 14, 20
// easy: 6, 11
- W := nW * 2 + 2;
H := NotesH * 1.5 + 3.5;
-
- X2 := (Start-st) * TempR + Left + 0.5 {+ 10*ScreenX} + 4; // wciecie
- X1 := X2-W;
- X3 := (Start+Dlugosc-st) * TempR + Left - 0.5 {+ 10*ScreenX} - 4; // wciecie
- X4 := X3+W;
+ X1 := Left + (Start-st) * TempR + 0.5 - 6 - nW;
+ X2 := X1 + 6 + 2*nW;
+
+ X3 := (Start+Dlugosc-st) * TempR + Left - 0.5 {+ 10*ScreenX} - nW;
+ X4 := X3 + 2*nW + 6;
// left
Rec.Left := X1;
@@ -550,8 +564,8 @@ begin
// srodkowa czesc
Rec.Left := X2;
Rec.Right := X3;
- if (nW=NotesW) then
- begin
+ //if (nW=NotesW) then
+ //begin
glBindTexture(GL_TEXTURE_2D, Tex_BG_Mid[NrGracza+1].TexNum);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex2f(Rec.Left, Rec.Top);
@@ -559,7 +573,7 @@ begin
glTexCoord2f(1, 1); glVertex2f(Rec.Right, Rec.Bottom);
glTexCoord2f(1, 0); glVertex2f(Rec.Right, Rec.Top);
glEnd;
- end;
+ //end;
// prawa czesc
Rec.Left := X3;
@@ -1676,6 +1690,9 @@ var
wd: real;
Percent, ScoreMax, ScoreCurrent: integer;
begin;
+ if (ShowNotes>1) then
+ Exit;
+
Percent := Player[P].ScorePercent;
ScoreMax := Player[P].ScoreMax;
ScoreCurrent := Player[P].ScoreTotalI;
@@ -1831,7 +1848,7 @@ var
Size: Integer; //Size of Popup
begin
- if Alpha <> 0 then
+ if (Alpha <> 0) and (ShowNotes=0) then
begin
//Set Font Propertys
diff --git a/Game/Code/Classes/ULog.pas b/Game/Code/Classes/ULog.pas
index 737364e8..a3e7f156 100644
--- a/Game/Code/Classes/ULog.pas
+++ b/Game/Code/Classes/ULog.pas
@@ -439,6 +439,8 @@ type
{ data follows here }
end;
+ TCharSet = Set of Char;
+
procedure HeadInit(var Header: TWAVHeader);
begin
with Header do
@@ -469,6 +471,25 @@ begin
end;
end;
+function Filter(const sTemp: String; const inValidChars: TCharSet): String;
+var
+ iDest: Integer;
+ iSource: Integer;
+begin
+ SetLength(Result, Length(sTemp));
+ iDest := 0;
+ for iSource := 1 to Length(sTemp) do
+ if not (sTemp[iSource] in inValidChars) then
+ begin
+ Inc(iDest);
+ Result[iDest] := sTemp[iSource];
+ end;
+ SetLength(Result, iDest);
+end;
+
+const
+ invChars = ['\', '/', ':', '*', '?', '"', '<', '>', '|'];
+
var
FS: TFileStream;
@@ -479,13 +500,20 @@ var
s: LongInt;
begin
- for Num := 1 to 9999 do begin
- FileName := IntToStr(Num);
- while Length(FileName) < 4 do FileName := '0' + FileName;
- //FileName := RecordingsPath + Artist + '_' +
- // Title + '_P' + Points + '_' + FileName + '_' + Player + '.wav'; //some characters are not allowed; TODO
- FileName := RecordingsPath + 'V_' + FileName + '.wav';
- if not FileExists(FileName) then break
+ FileName := RecordingsPath + Filter(Artist, invChars) + '-' +
+ Filter(Title, invChars) + '_' + Filter(Player, invChars) + '_N0000.wav';
+
+ if FileExists(FileName) then
+ begin
+ for Num := 1 to 9999 do
+ begin
+ FileName := IntToStr(Num);
+ while Length(FileName) < 4 do FileName := '0' + FileName;
+ FileName := RecordingsPath + Filter(Artist, invChars) + '-' +
+ Filter(Title, invChars) + '_' + Filter(Player, invChars) + '_N' + FileName +'.wav';
+ //FileName := RecordingsPath + 'V_' + FileName + '.wav';
+ if not FileExists(FileName) then break
+ end;
end;
HeadInit(Header);
diff --git a/Game/Code/Screens/UScreenEditSub.pas b/Game/Code/Screens/UScreenEditSub.pas
index ff1340de..fea240a3 100644
--- a/Game/Code/Screens/UScreenEditSub.pas
+++ b/Game/Code/Screens/UScreenEditSub.pas
@@ -2592,13 +2592,18 @@ var
end_: boolean;
Window: TRectCoords;
- Blend: real;
+ Blend: real;
+
+ beat: integer;
+ last: integer;
begin
DrawStatics;
end_ := false;
glClearColor(1,1,1,1);
+ last := LastClick;
+
PlayClick := false;
if PlaySentenceMidi or PlaySentence then
begin
@@ -2621,14 +2626,18 @@ begin
end_ := false;
end;
- if AktBeat <> LastClick then
+ if AktBeat <> last then
begin
+ for beat := LastClick+1 to AktBeat do
+ begin
+
+ PlayClick := false;
for line := 0 to Length(Czesci[CP].Czesc) - 1 do
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
+ if (Czesci[CP].Czesc[line].Start = beat) and (line <> Czesci[CP].Akt) and
not end_ and not PlayOneSentence then
begin
Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Color := 0;
@@ -2640,9 +2649,9 @@ begin
LineChanged[CP] := true;
end;
- if (Czesci[CP].Czesc[line].Nuta[note].Start = AktBeat) then
+ if (Czesci[CP].Czesc[line].Nuta[note].Start = beat) then
begin
- LastClick := AktBeat;
+ LastClick := beat;
PlayClick := true;
end;
end;
@@ -2655,7 +2664,7 @@ begin
for note := 0 to Length(Czesci[(CP+1) mod 2].Czesc[line].Nuta) - 1 do
begin
//line change
- if (Czesci[(CP+1) mod 2].Czesc[line].Start = AktBeat) and (line <> Czesci[(CP+1) mod 2].Akt) and not end_ then
+ if (Czesci[(CP+1) mod 2].Czesc[line].Start = beat) and (line <> Czesci[(CP+1) mod 2].Akt) and not end_ then
begin
if(Length(Czesci[(CP+1) mod 2].Czesc[Czesci[(CP+1) mod 2].Akt].Nuta)>0) then
Czesci[(CP+1) mod 2].Czesc[Czesci[(CP+1) mod 2].Akt].Nuta[AktNuta[(CP+1) mod 2]].Color := 0;
@@ -2669,16 +2678,9 @@ begin
end;
end;
end;
- end;
- end else
- begin
- LineChanged[0]:=false;
- LineChanged[1]:=false;
- PlayVideo := false;
- PlayOneSentence := false;
- end;
- // midi music
+
+ // midi music
if PlaySentenceMidi then
begin
// stop the music
@@ -2689,7 +2691,7 @@ begin
Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Color := 0;
if (Czesci[CP].Akt = lineStart) then
AktNuta[CP] := noteStart;
-
+
Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Color := 2;
EditorLyric[CP].Selected := AktNuta[CP];
end;
@@ -2700,7 +2702,7 @@ begin
if PlayClick then
begin
for Pet := 0 to Czesci[CP].Czesc[Czesci[CP].Akt].HighNut do
- if (Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[Pet].Start = AktBeat) then
+ if (Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[Pet].Start = beat) then
begin
if Pet > 0 then
MidiOut.PutShort($81, Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[Pet-1].Ton + 60, 127);
@@ -2742,7 +2744,7 @@ begin
for note := 0 to Length(Czesci[CP].Czesc[line].Nuta) - 1 do
begin
//note change
- if (Czesci[CP].Czesc[line].Nuta[note].Start = AktBeat) and
+ if (Czesci[CP].Czesc[line].Nuta[note].Start = beat) and
(((note <> AktNuta[CP]) or LineChanged[CP]) and
(not PlayOneSentence or (line = Czesci[CP].Akt))) then
begin
@@ -2768,7 +2770,7 @@ begin
for note := 0 to Length(Czesci[(CP+1) mod 2].Czesc[line].Nuta) - 1 do
begin
//note change
- if (Czesci[(CP+1) mod 2].Czesc[line].Nuta[note].Start = AktBeat) and
+ if (Czesci[(CP+1) mod 2].Czesc[line].Nuta[note].Start = beat) and
((note <> AktNuta[(CP+1) mod 2]) or LineChanged[(CP+1) mod 2]) then
begin
if(Length(Czesci[(CP+1) mod 2].Czesc[Czesci[(CP+1) mod 2].Akt].Nuta)>0) then
@@ -2790,36 +2792,16 @@ begin
end;
- // midi music
- if PlayOneNoteMidi then
- begin
- MidiPos := USTime.GetTime - MidiTime + MidiStart;
- // stop the music
- if (MidiPos > MidiStop) then
- begin
- MidiOut.PutShort($81, Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[MidiLastNote].Ton + 60, 127);
- PlayOneNoteMidi := false;
- end;
-
- // click
- AktBeat := Floor(GetMidBeat(MidiPos - AktSong.GAP / 1000));
- Text[TextDebug].Text := IntToStr(AktBeat);
- if AktBeat <> LastClick then
- begin
- for Pet := 0 to Czesci[CP].Czesc[Czesci[CP].Akt].HighNut do
- begin
- if (Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[Pet].Start = AktBeat) then
- begin
- LastClick := AktBeat;
- if Pet > 0 then
- MidiOut.PutShort($81, Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[Pet-1].Ton + 60, 127);
- MidiOut.PutShort($91, Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[Pet].Ton + 60, 127);
- MidiLastNote := Pet;
- end;
- end;
+ end; //for beat
end;
- end; // if PlayOneNoteMidi
+ end else
+ begin
+ LineChanged[0]:=false;
+ LineChanged[1]:=false;
+ PlayVideo := false;
+ PlayOneSentence := false;
+ end;
// mp3 music
if PlayOneNote then
@@ -2838,18 +2820,55 @@ begin
Text[TextDebug].Text := IntToStr(AktBeat);
if AktBeat <> LastClick then
begin
- for Pet := 0 to Czesci[CP].Czesc[Czesci[CP].Akt].HighNut do
+ for beat := LastClick+1 to AktBeat do
begin
- if (Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[Pet].Start = AktBeat) then
+ for Pet := 0 to Czesci[CP].Czesc[Czesci[CP].Akt].HighNut do
begin
- Music.PlayClick;
- LastClick := AktBeat;
+ if (Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[Pet].Start = beat) then
+ begin
+ Music.PlayClick;
+ LastClick := beat;
+ end;
end;
- end;
+ end; //for beat
end;
end; // click
end; // if PlayOneNote
+ // midi music
+ if PlayOneNoteMidi then
+ begin
+ MidiPos := USTime.GetTime - MidiTime + MidiStart;
+ // stop the music
+ if (MidiPos > MidiStop) then
+ begin
+ MidiOut.PutShort($81, Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[MidiLastNote].Ton + 60, 127);
+ PlayOneNoteMidi := false;
+ end;
+
+ // click
+ AktBeat := Floor(GetMidBeat(MidiPos - AktSong.GAP / 1000));
+ Text[TextDebug].Text := IntToStr(AktBeat);
+
+ if AktBeat <> LastClick then
+ begin
+ for beat := LastClick+1 to AktBeat do
+ begin
+ for Pet := 0 to Czesci[CP].Czesc[Czesci[CP].Akt].HighNut do
+ begin
+ if (Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[Pet].Start = beat) then
+ begin
+ LastClick := beat;
+ if Pet > 0 then
+ MidiOut.PutShort($81, Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[Pet-1].Ton + 60, 127);
+ MidiOut.PutShort($91, Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[Pet].Ton + 60, 127);
+ MidiLastNote := Pet;
+ end;
+ end;
+ end; //for beat
+ end;
+ end; // if PlayOneNoteMidi
+
Text[TextSentence].Text := 'Line: ' + IntToStr(Czesci[CP].Akt + 1) + '/' + IntToStr(Czesci[CP].Ilosc);
Text[TextNote].Text := 'Note: ' + IntToStr(AktNuta[CP] + 1) + '/' + IntToStr(Czesci[CP].Czesc[Czesci[CP].Akt].IlNut);
diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas
index 7f60fe95..6e3da366 100644
--- a/Game/Code/Screens/UScreenSing.pas
+++ b/Game/Code/Screens/UScreenSing.pas
@@ -150,6 +150,8 @@ type
procedure Finish; virtual;
procedure Pause; //Pause Mod(Toggles Pause)
+ procedure SetVis();
+
//OnSentenceEnd for LineBonus + Singbar
procedure onSentenceEnd(CP: integer; S: Cardinal);
//OnSentenceChange (for Golden Notes)
@@ -217,6 +219,16 @@ begin
Music.EnableVocalRemover;
end;
+ SDLK_N:
+ begin
+ if (ScreenSong.Mode <> smNormal) then
+ Exit;
+
+ Inc(ShowNotes);
+ if (ShowNotes>2) then
+ ShowNotes:=0;
+ end;
+
SDLK_TAB:
begin
if not paused then
@@ -470,17 +482,6 @@ end;
procedure TScreenSing.onShow;
var
- V1: boolean;
- V1TwoP: boolean; //added for ps3 skin
- V1ThreeP: boolean; //added for ps3 skin
- 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');
@@ -498,6 +499,8 @@ begin
MP3VolumeHandler.changed := false;
+ ShowNotes := 0;
+
//Reset Player Medley stats
if (ScreenSong.Mode = smMedley) or ScreenSong.PartyMedley then
begin
@@ -558,87 +561,6 @@ begin
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
- 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 := false;
- V4FourP := false;
- 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 := false;
- V5 := false;
- V6 := false;
- 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 else
begin
P4Mode := true;
@@ -685,87 +607,6 @@ begin
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
- 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
- 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;
@@ -802,67 +643,7 @@ begin
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 and not (PlayersPlay=6);
- Static[StaticP1ThreePScoreBG].Visible := V1ThreeP;
- Text[TextP1ThreeP].Visible := V1ThreeP and not (PlayersPlay=6);
- Text[TextP1ThreePScore].Visible := V1ThreeP;
- //eoa
-
- Static[StaticP2R].Visible := V2R;
- Static[StaticP2RScoreBG].Visible := V2R;
- Text[TextP2R].Visible := V2R;
- Text[TextP2RScore].Visible := V2R;
-
- Static[StaticP2M].Visible := V2M and not (PlayersPlay=6);
- Static[StaticP2MScoreBG].Visible := V2M;
- Text[TextP2M].Visible := V2M and not (PlayersPlay=6);
- Text[TextP2MScore].Visible := V2M;
-
- Static[StaticP3R].Visible := V3R and not (PlayersPlay=6);
- Static[StaticP3RScoreBG].Visible := V3R;
- Text[TextP3R].Visible := V3R and not (PlayersPlay=6);
- 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 := false and V4SixP;
- Static[StaticP4SixPScoreBG].Visible := V4SixP;
- Text[TextP4SixP].Visible := false and V4SixP;
- Text[TextP4SixPScore].Visible := V4SixP;
-
- Static[StaticP5].Visible := false and V5;
- Static[StaticP5ScoreBG].Visible := V5;
- Text[TextP5].Visible := false and V5;
- Text[TextP5Score].Visible := V5;
-
- Static[StaticP6].Visible := false and V6;
- Static[StaticP6ScoreBG].Visible := V6;
- Text[TextP6].Visible := false and V6;
- Text[TextP6Score].Visible := V6;
+ SetVis();
//Set Position of Line Bonus - PhrasenBonus
if (Ini.LineBonus = 1) then //Show Line Bonus at Scores
@@ -1209,6 +990,265 @@ begin
PerfLog.StartNewLog;
end;
+procedure TScreenSing.SetVis();
+var
+ V1: boolean;
+ V1TwoP: boolean; //added for ps3 skin
+ V1ThreeP: boolean; //added for ps3 skin
+ V2R: boolean;
+ V2M: boolean;
+ V3R: boolean;
+ V3FourP: boolean;
+ V4FourP: boolean;
+ V4SixP: boolean;
+ V5: boolean;
+ V6: boolean;
+ vis: boolean;
+begin
+ vis := (ShowNotes<2);
+
+ if not P4Mode and vis then
+ begin
+ 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 := false;
+ V4FourP := false;
+ 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 := false;
+ V5 := false;
+ V6 := false;
+ 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 else if vis then
+ begin
+ 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
+ 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
+ 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;
+
+ if not vis then
+ begin
+ V1 := false;
+ V1TwoP := false;
+ V1ThreeP := false;
+ V2R := false;
+ V2M := false;
+ V3R := false;
+ V3FourP := false;
+ V4FourP := false;
+ V4SixP := false;
+ V5 := false;
+ V6 := false;
+ end;
+
+ //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 and not (PlayersPlay=6);
+ Static[StaticP1ThreePScoreBG].Visible := V1ThreeP;
+ Text[TextP1ThreeP].Visible := V1ThreeP and not (PlayersPlay=6);
+ Text[TextP1ThreePScore].Visible := V1ThreeP;
+ //eoa
+
+ Static[StaticP2R].Visible := V2R;
+ Static[StaticP2RScoreBG].Visible := V2R;
+ Text[TextP2R].Visible := V2R;
+ Text[TextP2RScore].Visible := V2R;
+
+ Static[StaticP2M].Visible := V2M and not (PlayersPlay=6);
+ Static[StaticP2MScoreBG].Visible := V2M;
+ Text[TextP2M].Visible := V2M and not (PlayersPlay=6);
+ Text[TextP2MScore].Visible := V2M;
+
+ Static[StaticP3R].Visible := V3R and not (PlayersPlay=6);
+ Static[StaticP3RScoreBG].Visible := V3R;
+ Text[TextP3R].Visible := V3R and not (PlayersPlay=6);
+ 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 := false and V4SixP;
+ Static[StaticP4SixPScoreBG].Visible := V4SixP;
+ Text[TextP4SixP].Visible := false and V4SixP;
+ Text[TextP4SixPScore].Visible := V4SixP;
+
+ Static[StaticP5].Visible := false and V5;
+ Static[StaticP5ScoreBG].Visible := V5;
+ Text[TextP5].Visible := false and V5;
+ Text[TextP5Score].Visible := V5;
+
+ Static[StaticP6].Visible := false and V6;
+ Static[StaticP6ScoreBG].Visible := V6;
+ Text[TextP6].Visible := false and V6;
+ Text[TextP6Score].Visible := V6;
+end;
+
procedure TScreenSing.SongError;
var
I, len: integer;
@@ -1397,7 +1437,7 @@ begin
if error then
begin
- Log.LogError('Error: TXT is longer then the MP3 in Song: ' + AktSong.Path + AktSong.Filename);
+ Log.LogError('Error: TXT is longer than the MP3 in Song: ' + AktSong.Path + AktSong.Filename);
SongError;
Exit;
end;
@@ -1641,6 +1681,7 @@ var
begin
PerfLog.AddComment('ScreenSing: Start Draw');
+ SetVis;
//ScoreBG Mod
// set player colors
if PlayersPlay = 4 then
@@ -1745,7 +1786,6 @@ begin
end;
end; // case
end; // if
-
// stereo
// weird stuff, maybe this is for "dual screen?", but where is player three then?
@@ -2054,12 +2094,13 @@ begin
if AktSong.isDuet then
Static[StaticLyricDuetBar].Texture.Alpha := Alpha[0];
-
+
// draw custom items
SingDraw(Alpha); // always draw
//GoldenNoteStarsTwinkle Mod
- GoldenRec.SpawnRec(Alpha);
+ if (ShowNotes=0) then
+ GoldenRec.SpawnRec(Alpha);
//GoldenNoteStarsTwinkle Mod
// back stereo
diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas
index 59d4b50b..e2576a90 100644
--- a/Game/Code/Screens/UScreenSong.pas
+++ b/Game/Code/Screens/UScreenSong.pas
@@ -2006,6 +2006,8 @@ begin
if SongIndex<>Interaction then
Music.Stop;
+ ShowNotes := 0;
+
PartyMedley := false;
FadeOut := false;
diff --git a/Game/Code/UltraStar.bdsproj b/Game/Code/UltraStar.bdsproj
index 04b68b7c..36df4a05 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\borland\bds\4.0\Bin\dclib100.bpl">Borland InterBase Express Components</Excluded_Packages>
<Excluded_Packages Name="c:\program files\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\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 0aa0ebaf..05a7dfc2 100644
--- a/Game/Code/UltraStar.dpr
+++ b/Game/Code/UltraStar.dpr
@@ -122,7 +122,7 @@ uses
UVideo in 'Classes\UVideo.pas';
const
- Version = 'UltraStar Deluxe Challenge, Medley & Duet Edition r9 RC6.1';
+ Version = 'UltraStar Deluxe Challenge, Medley & Duet Edition r9 RC6.4';
var
WndTitle: string;