aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens
diff options
context:
space:
mode:
authorbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-10-30 11:22:25 +0000
committerbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-10-30 11:22:25 +0000
commita7d0970a2e7dec907fccbc2d63ffb5cb799a7505 (patch)
tree71dda6083f7a032585010f842a2d44135c5f4168 /Game/Code/Screens
parentf3c351b423c1a3439d64c7ed7e3c66a3af0ca36b (diff)
downloadusdx-a7d0970a2e7dec907fccbc2d63ffb5cb799a7505.tar.gz
usdx-a7d0970a2e7dec907fccbc2d63ffb5cb799a7505.tar.xz
usdx-a7d0970a2e7dec907fccbc2d63ffb5cb799a7505.zip
- correct drawing of short notes in 4/6-player mode on one screen
- rimshot022b.mp3 + 15db - changed fonts: higher resolution esp. for medley countdown - some other bugfixes and corrections - update of installer files git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2699 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Screens')
-rw-r--r--Game/Code/Screens/UScreenCredits.pas12
-rw-r--r--Game/Code/Screens/UScreenEditSub.pas25
-rw-r--r--Game/Code/Screens/UScreenSing.pas21
-rw-r--r--Game/Code/Screens/UScreenSong.pas9
4 files changed, 48 insertions, 19 deletions
diff --git a/Game/Code/Screens/UScreenCredits.pas b/Game/Code/Screens/UScreenCredits.pas
index a59ba863..54225682 100644
--- a/Game/Code/Screens/UScreenCredits.pas
+++ b/Game/Code/Screens/UScreenCredits.pas
@@ -206,7 +206,8 @@ Procedure TScreenCredits.Draw_FunkyText;
var
S{,I, Len}: Integer;
X,Y,A: Real;
- visibleText: PChar;
+ visibleText: PChar;
+ visibleString: string;
begin
SetFontSize(10);
//Init ScrollingText
@@ -230,10 +231,13 @@ begin
if Credits_X+X > 32 then A:=17;
glColor4f( 230/255-40/255+Y*(Credits_X+X)/900, 200/255-30/255+Y*(Credits_X+X)/1000, 155/255-20/255+Y*(Credits_X+X)/1100, A/17);
glPrintLetter(visibleText[S]);
- X := X + Fonts[ActFont].Width[Ord(visibleText[S])] * Fonts[ActFont].Tex.H / 30 * Fonts[ActFont].AspectW;
+ visibleString := visibleText[S];
+ X := X + glTextWidth(PChar(visibleString));
end;
- if (Credits_X<0) and (CurrentScrollStart < length(Funky_Text)) then begin
- Credits_X:=Credits_X + Fonts[ActFont].Width[Ord(Funky_Text[CurrentScrollStart])] * Fonts[ActFont].Tex.H / 30 * Fonts[ActFont].AspectW;
+ if (Credits_X<0) and (CurrentScrollStart < length(Funky_Text)) then
+ begin
+ visibleString := Funky_Text[CurrentScrollStart];
+ Credits_X:=Credits_X + glTextWidth(PChar(visibleString));
inc(CurrentScrollStart);
end;
visibleText:=pchar(Copy(Funky_Text, CurrentScrollStart, CurrentScrollEnd));
diff --git a/Game/Code/Screens/UScreenEditSub.pas b/Game/Code/Screens/UScreenEditSub.pas
index 5c2e121a..ff1340de 100644
--- a/Game/Code/Screens/UScreenEditSub.pas
+++ b/Game/Code/Screens/UScreenEditSub.pas
@@ -1561,6 +1561,7 @@ begin
Czesci[P].Czesc[C].Nuta[0].Tekst := Copy(Czesci[P].Czesc[C].Nuta[0].Tekst, 2, 100);
// move spaces on the start to the end of the previous note
+ {
for N := 1 to Czesci[P].Czesc[C].HighNut do
begin
while (Copy(Czesci[P].Czesc[C].Nuta[N].Tekst, 1, 1) = ' ') do
@@ -1569,20 +1570,22 @@ begin
Czesci[P].Czesc[C].Nuta[N-1].Tekst := Czesci[P].Czesc[C].Nuta[N-1].Tekst + ' ';
end;
end; // N
+ }
// correct '-' to '- '
- for N := 0 to Czesci[P].Czesc[C].HighNut do
+ {for N := 0 to Czesci[P].Czesc[C].HighNut do
begin
if Czesci[P].Czesc[C].Nuta[N].Tekst = '-' then
Czesci[P].Czesc[C].Nuta[N].Tekst := '- ';
end; // N
-
+ }
// add space to the previous note when the current word is '- '
- for N := 1 to Czesci[P].Czesc[C].HighNut do
+ {for N := 1 to Czesci[P].Czesc[C].HighNut do
begin
if Czesci[P].Czesc[C].Nuta[N].Tekst = '- ' then
Czesci[P].Czesc[C].Nuta[N-1].Tekst := Czesci[P].Czesc[C].Nuta[N-1].Tekst + ' ';
end; // N
+ }
// correct too many spaces at the end of note
for N := 0 to Czesci[P].Czesc[C].HighNut do
@@ -1592,9 +1595,9 @@ begin
end; // N
// and correct if there is no space at the end of sentence
- N := Czesci[P].Czesc[C].HighNut;
+ {N := Czesci[P].Czesc[C].HighNut;
if Copy(Czesci[P].Czesc[C].Nuta[N].Tekst, Length(Czesci[P].Czesc[C].Nuta[N].Tekst), 1) <> ' ' then
- Czesci[P].Czesc[C].Nuta[N].Tekst := Czesci[P].Czesc[C].Nuta[N].Tekst + ' ';
+ Czesci[P].Czesc[C].Nuta[N].Tekst := Czesci[P].Czesc[C].Nuta[N].Tekst + ' ';}
end;
end; // C
EditorLyric[P].AddCzesc(P, Czesci[P].Akt);
@@ -2171,12 +2174,12 @@ begin
cRR := 1; cGR := 0.8; cBR := 0.8;
// Line
- AddText(500, 573, 1, 7, 0, 0, 0, 'Line:');
- TextSentence := AddText(545, 573, 1, 7, 0, 0, 0, '0 / 0');
+ //AddText(500, 573, 1, 7, 0, 0, 0, 'Line:');
+ TextSentence := AddText(500, 573, 1, 7, 0, 0, 0, 'Line: 0/0');
// Note
- AddText(655, 573, 1, 7, 0, 0, 0, 'Note:');
- TextNote := AddText(710, 573, 1, 7, 0, 0, 0, '0 / 0');
+ //AddText(655, 573, 1, 7, 0, 0, 0, 'Note:');
+ TextNote := AddText(655, 573, 1, 7, 0, 0, 0, 'Note: 0/0');
AddText(10, 10, 0, 8, 0, 0, 0, 'Title:');
AddText(10, 30, 0, 8, 0, 0, 0, 'Artist:');
@@ -2847,8 +2850,8 @@ begin
end; // click
end; // if PlayOneNote
- Text[TextSentence].Text := IntToStr(Czesci[CP].Akt + 1) + ' / ' + IntToStr(Czesci[CP].Ilosc);
- Text[TextNote].Text := IntToStr(AktNuta[CP] + 1) + ' / ' + IntToStr(Czesci[CP].Czesc[Czesci[CP].Akt].IlNut);
+ 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);
// Song info
if not BPMEditMode then
diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas
index 0fa5227c..7f60fe95 100644
--- a/Game/Code/Screens/UScreenSing.pas
+++ b/Game/Code/Screens/UScreenSing.pas
@@ -1343,6 +1343,8 @@ end;
procedure TScreenSing.LoadNextSong;
var
P, I: integer;
+ C, N, beat: integer;
+ error: boolean;
begin
// load notes
@@ -1383,6 +1385,23 @@ begin
AktSong.Path := CatSongs.Song[CatSongs.Selected].Path;
+ error := false;
+ for P := 0 to Length(Czesci) - 1 do
+ begin
+ C := Length(Czesci[P].Czesc)-1;
+ N := Length(Czesci[P].Czesc[C].Nuta)-1;
+ beat := Czesci[P].Czesc[C].Nuta[N].Start + Czesci[P].Czesc[C].Nuta[N].Dlugosc;
+ if (Music.Length < GetTimeFromBeat(beat)) then
+ error := true;
+ end;
+
+ if error then
+ begin
+ Log.LogError('Error: TXT is longer then the MP3 in Song: ' + AktSong.Path + AktSong.Filename);
+ SongError;
+ Exit;
+ end;
+
if (ScreenSong.Mode = smMedley) or ScreenSong.PartyMedley then
begin
SetMedleyMode;
@@ -2510,7 +2529,7 @@ begin
glColor4f(0.15, 0.30, 0.6, t);
h := 100*t*ScreenH/RenderH;
- SetFontStyle(1);
+ SetFontStyle(4);
SetFontItalic(false);
SetFontSize(h);
CountDownText := IntToStr(round(timeDiff-t));
diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas
index 7450fadb..59d4b50b 100644
--- a/Game/Code/Screens/UScreenSong.pas
+++ b/Game/Code/Screens/UScreenSong.pas
@@ -2257,12 +2257,14 @@ begin
Music.SetMusicVolume(100);
//If Preview is deactivated: Load MUsicfile now
- If (Ini.PreviewVolume = 0) then
+ If (Ini.PreviewVolume = 0) and (Display.NextScreen <> @ScreenEditSub) and
+ (not CatSongs.Song[Interaction].Main) then
Music.Open(CatSongs.Song[Interaction].Path + CatSongs.Song[Interaction].Mp3);
//When hide then Stop Music (For Party Mode Popup on Exit)
if (Display.NextScreen <> @ScreenSong) and (Display.NextScreen <> @ScreenSing) and
- (Display.NextScreen <> @ScreenSingModi) and (Music <> nil) then
+ (Display.NextScreen <> @ScreenSingModi) and (Display.NextScreen <> @ScreenEditSub) and
+ (Music <> nil) then
Music.Stop;
end;
@@ -3621,7 +3623,8 @@ end;
procedure TScreenSong.OpenEditor;
begin
- if (Length(Songs.Song) > 0) and (not CatSongs.Song[Interaction].Main) AND (Mode = smNormal) then begin
+ if (Length(Songs.Song) > 0) and (not CatSongs.Song[Interaction].Main) AND (Mode = smNormal) then
+ begin
Music.Stop;
acClose;
VidVis := none;