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/5000Points/Until5000.dpr | 7 ++++--- plugins/Blind/Blind.dpr | 5 ++++- plugins/Don't_Get_Worse/Hold_The_Line.dpr | 6 +++--- plugins/Duell/Duell.dpr | 5 ++++- plugins/Team_Duell/TeamDuell.dpr | 22 +++++++++++----------- 5 files changed, 26 insertions(+), 19 deletions(-) diff --git a/plugins/5000Points/Until5000.dpr b/plugins/5000Points/Until5000.dpr index 507159ff..df79bfe2 100644 --- a/plugins/5000Points/Until5000.dpr +++ b/plugins/5000Points/Until5000.dpr @@ -4,8 +4,6 @@ library Until5000; {$MODE Delphi} {$ENDIF} -{$I ../../Game/Code/switches.inc} - uses ModiSDK in '..\SDK\ModiSDK.pas'; @@ -90,7 +88,10 @@ for I := 0 to PlayerInfo.NumPlayers-1 do end; exports -PluginInfo, Init, Draw, Finish; + PluginInfo, + Init, + Draw, + Finish; begin diff --git a/plugins/Blind/Blind.dpr b/plugins/Blind/Blind.dpr index 2f94229c..8093c2d6 100644 --- a/plugins/Blind/Blind.dpr +++ b/plugins/Blind/Blind.dpr @@ -95,7 +95,10 @@ begin end; exports -PluginInfo, Init, Draw, Finish; + PluginInfo, + Init, + Draw, + Finish; begin diff --git a/plugins/Don't_Get_Worse/Hold_The_Line.dpr b/plugins/Don't_Get_Worse/Hold_The_Line.dpr index 8ac4b2e7..a2aa2e66 100644 --- a/plugins/Don't_Get_Worse/Hold_The_Line.dpr +++ b/plugins/Don't_Get_Worse/Hold_The_Line.dpr @@ -3,9 +3,9 @@ library Hold_The_Line; uses 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', - Windows; + gl in '..\..\src\lib\JEDI-SDL\OpenGL\Pas\gl.pas'; var PointerTex: TSmallTexture; @@ -101,7 +101,7 @@ begin //Aktivate Blink If (CurSentence = CountSentences div 5 * 2 - 1) OR (CurSentence = CountSentences div 3 * 2 - 1) then begin - Tick := Gettickcount div 400; + Tick := SDL_GetTicks() div 400; If (Tick <> LastTick) then begin LastTick := Tick; diff --git a/plugins/Duell/Duell.dpr b/plugins/Duell/Duell.dpr index 3aff4d3e..ddc962c4 100644 --- a/plugins/Duell/Duell.dpr +++ b/plugins/Duell/Duell.dpr @@ -92,7 +92,10 @@ begin end; exports -PluginInfo, Init, Draw, Finish; + PluginInfo, + Init, + Draw, + Finish; begin 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