aboutsummaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/base')
-rw-r--r--src/base/UMain.pas22
-rw-r--r--src/base/USingScores.pas2
-rw-r--r--src/base/UThemes.pas8
-rw-r--r--src/base/UTime.pas28
4 files changed, 31 insertions, 29 deletions
diff --git a/src/base/UMain.pas b/src/base/UMain.pas
index 3900c877..275510fc 100644
--- a/src/base/UMain.pas
+++ b/src/base/UMain.pas
@@ -359,9 +359,11 @@ begin
CountMidTime;
Delay := Floor(1000 / MAX_FPS - 1000 * TimeMid);
+ Log.LogError ('MainLoop', 'Delay: ' + intToStr(Delay));
if Delay >= 1 then
SDL_Delay(Delay); // dynamic, maximum is 100 fps
+ Log.LogError ('MainLoop', 'Delay: ok ' + intToStr(Delay));
CountSkipTime;
@@ -386,15 +388,15 @@ begin
begin
Display.Fade := 0;
Display.NextScreenWithCheck := nil;
- Display.CheckOK := True;
+ Display.CheckOK := true;
end;
end;
procedure CheckEvents;
var
- Event: TSDL_event;
- mouseDown: Boolean;
- mouseBtn: Integer;
+ Event: TSDL_event;
+ mouseDown: boolean;
+ mouseBtn: integer;
begin
if Assigned(Display.NextScreen) then
Exit;
@@ -416,18 +418,18 @@ begin
case Event.type_ of
SDL_MOUSEMOTION:
begin
- mouseDown := False;
- mouseBtn := 0;
+ mouseDown := false;
+ mouseBtn := 0;
end;
SDL_MOUSEBUTTONDOWN:
begin
- mouseDown := True;
- mouseBtn := Event.button.button;
+ mouseDown := true;
+ mouseBtn := Event.button.button;
end;
SDL_MOUSEBUTTONUP:
begin
- mouseDown := False;
- mouseBtn := Event.button.button;
+ mouseDown := false;
+ mouseBtn := Event.button.button;
end;
end;
diff --git a/src/base/USingScores.pas b/src/base/USingScores.pas
index 32b63197..499e1188 100644
--- a/src/base/USingScores.pas
+++ b/src/base/USingScores.pas
@@ -530,7 +530,7 @@ var
Result := 0;
bPlayerCount := 1 shl (bPlayerCount - 1);
- for I := 0 to PositionCount-1 do
+ for I := 0 to PositionCount - 1 do
begin
if ((Positions[I].PlayerCount and bPlayerCount) <> 0) then
Inc(Result);
diff --git a/src/base/UThemes.pas b/src/base/UThemes.pas
index 832e17d9..3fd77853 100644
--- a/src/base/UThemes.pas
+++ b/src/base/UThemes.pas
@@ -42,13 +42,13 @@ uses
type
TRGB = record
- R: single;
- G: single;
- B: single;
+ R: single;
+ G: single;
+ B: single;
end;
TRGBA = record
- R, G, B, A: Double;
+ R, G, B, A: double;
end;
type
diff --git a/src/base/UTime.pas b/src/base/UTime.pas
index 3f35dffd..83844cb5 100644
--- a/src/base/UTime.pas
+++ b/src/base/UTime.pas
@@ -61,20 +61,20 @@ procedure CountSkipTime;
procedure CountMidTime;
var
- USTime : TTime;
+ USTime: TTime;
VideoBGTimer: TRelativeTimer;
- TimeNew : int64;
- TimeOld : int64;
- TimeSkip : real;
- TimeMid : real;
- TimeMidTemp : int64;
+ TimeNew: int64;
+ TimeOld: int64;
+ TimeSkip: real;
+ TimeMid: real;
+ TimeMidTemp: int64;
implementation
uses
sdl,
- ucommon;
+ UCommon;
const
cSDLCorrectionRatio = 1000;
@@ -91,14 +91,14 @@ http://www.gamedev.net/community/forums/topic.asp?topic_id=466145&whichpage=1%EE
procedure CountSkipTimeSet;
begin
- TimeNew := SDL_GetTicks();
+ TimeNew := SDL_GetTicks();
end;
procedure CountSkipTime;
begin
- TimeOld := TimeNew;
- TimeNew := SDL_GetTicks();
- TimeSkip := (TimeNew-TimeOld) / cSDLCorrectionRatio;
+ TimeOld := TimeNew;
+ TimeNew := SDL_GetTicks();
+ TimeSkip := (TimeNew-TimeOld) / cSDLCorrectionRatio;
end;
procedure CountMidTime;
@@ -127,10 +127,10 @@ end;
**}
(*
- * Creates a new timer.
- * If TriggerMode is false (default), the timer
+ * creates a new timer.
+ * if triggermode is false (default), the timer
* will immediately begin with counting.
- * If TriggerMode is true, it will wait until Get/SetTime() or Pause() is called
+ * if triggermode is true, it will wait until get/settime() or pause() is called
* for the first time.
*)
constructor TRelativeTimer.Create(TriggerMode: boolean);