From 027e55035b969bea18892db0e29aa5bc00fb8fad Mon Sep 17 00:00:00 2001 From: tobigun Date: Tue, 4 Nov 2008 13:47:58 +0000 Subject: plugins update - OpenGL12 unit replaced with SDL gl unit - Windows timer replaced with SDL_GetTicks -> Windows unit removed git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1500 b956fd51-792f-4845-bead-9b4dfca2ff2c --- plugins/Team_Duell/TeamDuell.dpr | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'plugins/Team_Duell') diff --git a/plugins/Team_Duell/TeamDuell.dpr b/plugins/Team_Duell/TeamDuell.dpr index 20db2b2e..b1490b20 100644 --- a/plugins/Team_Duell/TeamDuell.dpr +++ b/plugins/Team_Duell/TeamDuell.dpr @@ -1,11 +1,12 @@ library TeamDuell ; uses - ModiSDK in '..\SDK\ModiSDK.pas', - StrUtils in '..\SDK\StrUtils.pas', - sysutils, - OpenGL12, - Windows; + ModiSDK in '..\SDK\ModiSDK.pas', + StrUtils in '..\SDK\StrUtils.pas', + sdl in '..\..\src\lib\JEDI-SDL\SDL\Pas\sdl.pas', + moduleloader in '..\..\src\lib\JEDI-SDL\SDL\Pas\moduleloader.pas', + gl in '..\..\src\lib\JEDI-SDL\OpenGL\Pas\gl.pas', + sysutils; var TeamPlayer: array of array of String; @@ -80,12 +81,11 @@ begin until NOT(NextSinger[I] = CurSinger[I]) OR (SPT[I] = 1) ; end; ChangeOnSentence := 8; - starttick := GetTickCount; + starttick := SDL_GetTicks(); firsttime := true; secondtime := true; bps := 1; MethodRec := Methods; - LoadOpenGL; Result := True; end; @@ -100,23 +100,23 @@ begin If (CurSentence = ChangeOnSentence - 7) AND (firsttime) then begin firsttime := false; - starttick := GetTickCount; + starttick := SDL_GetTicks(); end; start := false; // show first singers for 5sec - if (CurSentence < 1) AND ((starttick + 5000) > GetTickCount) then begin start := true; end; + if (CurSentence < 1) AND ((starttick + 5000) > SDL_GetTicks()) then begin start := true; end; // TickCount(thirdSentence) If (CurSentence = 3) AND (secondtime) then begin secondtime := false; firsttime := true; - endtick := GetTickCount; + endtick := SDL_GetTicks(); bps := (Startpoints[3]-Startpoints[1]) * 1000 / (endtick-starttick); // BeatsPerSecond end; // Time to next Change - RTtoNextChange := ((Startpoints[ChangeOnSentence]-Startpoints[ChangeOnSentence - 7]) / bps) - ((GetTickCount - starttick) / 1000); + RTtoNextChange := ((Startpoints[ChangeOnSentence]-Startpoints[ChangeOnSentence - 7]) / bps) - ((SDL_GetTicks() - starttick) / 1000); TtoNextChange := Trunc(RTtoNextChange) +1; // Next Singer for Team I -- cgit v1.2.3