From 65ddad359ed3b9b739215ec89a7645455ae10dce Mon Sep 17 00:00:00 2001 From: brunzelchen Date: Tue, 5 Oct 2010 18:28:42 +0000 Subject: - added webcam support - faster program start - faster sorting (mergesort) - sync lyrics to music - some new backgrounds and credits graphics (thx to MezzoX) - own thread for video decoding - finished 6-Player-on-one-screen-mode - changqed player-colors - fixed some bugs... git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2637 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenSingModi.pas | 39 +++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 9 deletions(-) (limited to 'Game/Code/Screens/UScreenSingModi.pas') diff --git a/Game/Code/Screens/UScreenSingModi.pas b/Game/Code/Screens/UScreenSingModi.pas index 56ea438a..715ec0b2 100644 --- a/Game/Code/Screens/UScreenSingModi.pas +++ b/Game/Code/Screens/UScreenSingModi.pas @@ -63,7 +63,20 @@ procedure PlaySound (const Index: Cardinal); stdcall; //Plays a Custom Sou function ToSentences(Const Czeski: TCzesci): TSentences; implementation -uses UGraphic, UPartyM2, UParty, UDraw, UMain, Classes, URecord, ULanguage, math, UDLLManager, USkins, UGraphicClasses; +uses + UGraphic, + UPartyM2, + UParty, + UDraw, + UMain, + Classes, + URecord, + ULanguage, + math, + UDLLManager, + USkins, + UGraphicClasses, + UWebCam; // Method for input parsing. If False is returned, GetNextWindow // should be checked to know the next window to load; @@ -186,8 +199,7 @@ begin PlayerInfo.NumPlayers := PlayersPlay; for I := 0 to PlayerInfo.NumPlayers-1 do begin - if (ScreenSong.Mode=smChallenge) then - Ini.Name[I] := TeamInfo.TeamInfo[I].Playerinfo[TeamInfo.TeamInfo[I].CurPlayer].Name; + Ini.Name[I] := TeamInfo.TeamInfo[I].Playerinfo[TeamInfo.TeamInfo[I].CurPlayer].Name; PlayerInfo.Playerinfo[I].Name := PChar(Ini.Name[I]); PlayerInfo.Playerinfo[I].Score:= 0; PlayerInfo.Playerinfo[I].Bar := 50; @@ -292,6 +304,7 @@ var medley_start_applause: boolean; CurTime: real; ab: real; + tt: real; begin //Aspect @@ -585,9 +598,11 @@ end; if ShowFinish and AktSong.VideoLoaded AND DllMan.Selected.LoadVideo then begin acGetFrame(Czas.Teraz); - acDrawGL(ScreenAct); // this only draws + acDrawGL(ScreenAct, not WebCam); // this only draws end; + wDraw(WebCam); + // draw static menu (FG) DrawFG; @@ -646,16 +661,22 @@ end; Czesci[I].Czesc[K].Nuta[Czesci[I].Czesc[K].HighNut].Dlugosc); //lyric main and other nice things - if (ab>2.5*dt) or ((K = Czesci[I].High) and (ab>dt)) then + if (ab>2.3*dt) or ((K = Czesci[I].High) and (ab>dt)) then begin - Alpha[I] := Alpha[I]-TimeSkip/dt; + if (ab>3.3*dt) or (Alpha[I]<1) or (K = Czesci[I].High) then + Alpha[I] := Alpha[I]-TimeSkip/dt; if (Alpha[I]<0) then Alpha[I] := 0; end else if (ab>dt) then begin - Alpha[I] := Alpha[I]+TimeSkip/dt; - if (Alpha[I]>1) then - Alpha[I] := 1; + tt := ab-dt; + if (tt<0) then + Alpha[I] := 1 + else + begin + if (1-tt/dt>Alpha[I]) or (K = Czesci[I].High)then + Alpha[I] := 1-tt/dt; + end; end else Alpha[I] := 1; -- cgit v1.2.3