aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Game/Code/Classes/UGraphicClasses.pas6
-rw-r--r--Game/Code/Classes/UJoystick.pas2
-rw-r--r--Game/Code/Menu/UDisplay.pas6
-rw-r--r--Game/Code/Menu/UMenuButton.pas4
-rw-r--r--Game/Code/Menu/UMenuText.pas9
-rw-r--r--Game/Code/Screens/UScreenCredits.pas2
6 files changed, 15 insertions, 14 deletions
diff --git a/Game/Code/Classes/UGraphicClasses.pas b/Game/Code/Classes/UGraphicClasses.pas
index 15bd2244..f176d69c 100644
--- a/Game/Code/Classes/UGraphicClasses.pas
+++ b/Game/Code/Classes/UGraphicClasses.pas
@@ -9,7 +9,7 @@ interface
{$I switches.inc}
-uses UTexture;
+uses UTexture,SDL;
const DelayBetweenFrames : Cardinal = 60;
type
@@ -348,7 +348,7 @@ constructor TEffectManager.Create;
var c: Cardinal;
begin
inherited;
- LastTime := GetTickCount;
+ LastTime := SDL_GetTicks();
for c:=0 to 5 do
begin
TwinkleArray[c] := 0;
@@ -370,7 +370,7 @@ var
// DelayBetweenFrames : Cardinal = 100;
begin
- CurrentTime := GetTickCount;
+ CurrentTime := SDL_GetTicks();
//Manage particle life
if (CurrentTime - LastTime) > DelayBetweenFrames then
begin
diff --git a/Game/Code/Classes/UJoystick.pas b/Game/Code/Classes/UJoystick.pas
index fbbcaebd..486a8a78 100644
--- a/Game/Code/Classes/UJoystick.pas
+++ b/Game/Code/Classes/UJoystick.pas
@@ -165,7 +165,7 @@ begin
end;
//Get Tick
- Tick := Gettickcount;
+ Tick := SDL_GetTicks();
//Get CoolieHat
if (SDL_JoystickNumHats(SDL_Joy)>=1) then
diff --git a/Game/Code/Menu/UDisplay.pas b/Game/Code/Menu/UDisplay.pas
index 7ac5f9b2..74a55ea7 100644
--- a/Game/Code/Menu/UDisplay.pas
+++ b/Game/Code/Menu/UDisplay.pas
@@ -247,13 +247,13 @@ begin
if not BlackScreen then
NextScreen.onShow;
- lastTime:=GetTickCount; // TODO: use cross-plattform SDL_GetTicks() instead
+ lastTime:=SDL_GetTicks();
if (S=2) or (Screens = 1) then
myfade:=myfade+1;
end; // end texture creation in first fading step
//do some time-based fading
- currentTime:=GetTickCount; // TODO: use cross-plattform SDL_GetTicks() instead
+ currentTime:=SDL_GetTicks();
if (currentTime > lastTime+30) and (S=1) then
begin
myfade:=myfade+4;
@@ -462,7 +462,7 @@ begin
glColor4f(0, 0, 0, 1);
//Calculate FPS
- Ticks := GetTickCount; // TODO: use cross-plattform SDL_GetTicks() instead
+ Ticks := SDL_GetTicks();
if (Ticks >= NextFPSSwap) then
begin
LastFPS := FPSCounter * 4;
diff --git a/Game/Code/Menu/UMenuButton.pas b/Game/Code/Menu/UMenuButton.pas
index 93b987b7..e5a6d45b 100644
--- a/Game/Code/Menu/UMenuButton.pas
+++ b/Game/Code/Menu/UMenuButton.pas
@@ -4,7 +4,7 @@ interface
{$I switches.inc}
-uses TextGL, UTexture, OpenGL12, UMenuText;
+uses TextGL, UTexture, OpenGL12, UMenuText,SDL;
type
CButton = class of TButton;
@@ -291,7 +291,7 @@ begin
begin
if (FadeProgress < 1) and (FadeProgress > 0) then
begin
- Tick := GetTickCount div 16;
+ Tick := SDL_GetTicks() div 16;
if (Tick <> FadeLastTick) then
begin
FadeLastTick := Tick;
diff --git a/Game/Code/Menu/UMenuText.pas b/Game/Code/Menu/UMenuText.pas
index f180a41b..3dff321a 100644
--- a/Game/Code/Menu/UMenuText.pas
+++ b/Game/Code/Menu/UMenuText.pas
@@ -11,7 +11,8 @@ interface
uses TextGL,
UTexture,
OpenGL12,
- SysUtils;
+ SysUtils,
+ SDL;
type
TText = class
@@ -102,7 +103,7 @@ begin
//Set Cursor Visible
SelectBlink := True;
- STicks := GettickCount div 550;
+ STicks := SDL_GetTicks() div 550;
end;
procedure TText.SetText(Value: String);
@@ -175,7 +176,7 @@ begin
//Set Cursor Visible
SelectBlink := True;
- STicks := GettickCount div 550;
+ STicks := SDL_GetTicks() div 550;
//Exit if there is no Need to Create Tiles
If (W <= 0) and (Pos('\n', Value) = 0) then
@@ -283,7 +284,7 @@ begin
//If Selected Set Blink...
if SelectBool then
begin
- I := Gettickcount div 550;
+ I := SDL_GetTicks() div 550;
if I <> STicks then
begin //Change Visability
STicks := I;
diff --git a/Game/Code/Screens/UScreenCredits.pas b/Game/Code/Screens/UScreenCredits.pas
index 067defd9..08892cce 100644
--- a/Game/Code/Screens/UScreenCredits.pas
+++ b/Game/Code/Screens/UScreenCredits.pas
@@ -451,7 +451,7 @@ begin
Log.LogStatus('',' JB-1');
- T := GetTickCount div 33;
+ T := SDL_GetTicks() div 33;
if T <> Credits_Time then
begin
Credits_Time := T;