summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4b15e91)
raw | patch | inline | side by side (parent: 4b15e91)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sat, 19 Jun 2021 14:33:08 +0000 (17:33 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Tue, 29 Jun 2021 09:51:12 +0000 (12:51 +0300) |
diff --git a/src/game/Doom2DF.lpr b/src/game/Doom2DF.lpr
index b66ba3b6535bfe364524b3c3247bbcc6f1bc08ea..1e76da9f5a1f041b38e5920ca0dbac9c38300bd3 100644 (file)
--- a/src/game/Doom2DF.lpr
+++ b/src/game/Doom2DF.lpr
binPath: AnsiString = '';
forceBinDir: Boolean = False;
- wLoadingQuit: Boolean = false;
- Time, Time_Delta, Time_Old: Int64;
- Frame: Int64;
- flag: Boolean = false;
-
+ Time_Old: Int64;
NoSound: Boolean;
procedure Update ();
function ProcessMessage (): Boolean;
var
i, t: Integer;
+ flag: Boolean;
+ Time, Time_Delta: Int64;
+ Frame: Int64;
begin
result := sys_HandleInput();
- Time := sys_GetTicks();
+ Time := GetTickCount64();
Time_Delta := Time-Time_Old;
flag := false;
g_Map_ProfilersEnd();
g_Mons_ProfilersEnd();
- if wLoadingQuit then
- begin
- g_Game_Free();
- g_Game_Quit();
- end;
-
if (gExit = EXIT_QUIT) then
begin
result := true;
if (not gGameOn) and gAskLanguage then
g_Menu_AskLanguage;
{$ENDIF}
- Time_Old := sys_GetTicks();
+ Time_Old := GetTickCount64();
while not ProcessMessage() do begin end;
g_Console_WriteGameConfig;
{$IFNDEF HEADLESS}
diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index af3d8ad0c99ffcdd01002045a44084cde72561c2..cf142396da91482d3332baf4611c7fdecc6b5364 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
gDelayedEvents[n].DENum := Num;
gDelayedEvents[n].DEStr := Str;
if DEType = DE_GLOBEVENT then
- gDelayedEvents[n].Time := (sys_GetTicks() {div 1000}) + Time
+ gDelayedEvents[n].Time := (GetTickCount64() {div 1000}) + Time
else
gDelayedEvents[n].Time := gTime + Time;
Result := n;
KeyPress(IK_F10);
end;
- Time := sys_GetTicks() {div 1000};
+ Time := GetTickCount64() {div 1000};
// Обработка отложенных событий:
if gDelayedEvents <> nil then
diff --git a/src/game/g_net.pas b/src/game/g_net.pas
index 2316d1c7e5e77f354434d250c393a516c38660e4..98ca2ab33d8b0d31f15a1e6880f2301d576c5807 100644 (file)
--- a/src/game/g_net.pas
+++ b/src/game/g_net.pas
end;
// предупредить что ждем слишком долго через N секунд
- TimeoutTime := sys_GetTicks() + NET_CONNECT_TIMEOUT;
+ TimeoutTime := GetTickCount64() + NET_CONNECT_TIMEOUT;
OuterLoop := True;
while OuterLoop do
end;
end;
- T := sys_GetTicks();
+ T := GetTickCount64();
if T > TimeoutTime then
begin
TimeoutTime := T + NET_CONNECT_TIMEOUT * 100; // одного предупреждения хватит
index f4b5618b20448ce2f44ea517f82db2af52096885..56dec596971af747214515d3d6de09d737355e15 100644 (file)
--- a/src/game/g_netmaster.pas
+++ b/src/game/g_netmaster.pas
//==========================================================================
function GetTimerMS (): Int64;
begin
- Result := sys_GetTicks() {div 1000};
+ Result := GetTickCount64() {div 1000};
end;
index ebfdda5676d4d9a088a55cf14b2ee890cc829360..df9e82d7ab15812c1b6104a4fc4c7f90d27bf723 100644 (file)
begin
if gExit = EXIT_QUIT then Exit;
- Time := sys_GetTicks() {div 1000};
+ Time := GetTickCount64() {div 1000};
FPSCounter := FPSCounter+1;
if Time - FPSTime >= 1000 then
begin
index 12ee89648e5285f656a51ac1cb8ae4c65bc8f643..117215d8e5eff50a9f64783ed344997f2c27a040 100644 (file)
uses Utils;
(* --- Utils --- *)
- function sys_GetTicks (): Int64;
procedure sys_Delay (ms: Integer);
(* --- Graphics --- *)
(* --------- Utils --------- *)
- function sys_GetTicks (): Int64;
- begin
- result := SDL_GetTicks()
- end;
-
procedure sys_Delay (ms: Integer);
begin
SDL_Delay(ms)
index 026d7854d9de8ba348abb34ead345358523bf890..5f1b7f32448eb2c866d9916a8369af29d5beee4e 100644 (file)
uses Utils;
(* --- Utils --- *)
- function sys_GetTicks (): Int64;
procedure sys_Delay (ms: Integer);
(* --- Graphics --- *)
(* --------- Utils --------- *)
- function sys_GetTicks (): Int64;
- begin
- result := SDL_GetTicks()
- end;
-
procedure sys_Delay (ms: Integer);
begin
SDL_Delay(ms)
index 9d14f24fcaa45a3740b1f74a551b418bcd236c62..ab42c12025de79afdd2f3921bc38f6b96f93e1a4 100644 (file)
uses Utils;
(* --- Utils --- *)
- function sys_GetTicks (): Int64;
procedure sys_Delay (ms: Integer);
(* --- Graphics --- *)
(* --------- Utils --------- *)
- function sys_GetTicks (): Int64;
- begin
- Result := Round(TimeStampToMSecs(DateTimeToTimeStamp(Now())))
- end;
-
procedure sys_Delay (ms: Integer);
begin
Sleep(ms)