summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 121a263)
raw | patch | inline | side by side (parent: 121a263)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sat, 19 Jun 2021 14:33:08 +0000 (17:33 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 9 Jun 2023 07:49:46 +0000 (10:49 +0300) |
diff --git a/src/game/Doom2DF.lpr b/src/game/Doom2DF.lpr
index 6022ee6d9c7a929f6afe6adcf615a4496959265c..dd58577d99041fc2e5d1a69b7e39dc9b802458aa 100644 (file)
--- a/src/game/Doom2DF.lpr
+++ b/src/game/Doom2DF.lpr
UseNativeMusic: Boolean;
{$ENDIF}
- 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 664377ccad70d23e9a067e6e8dba179848495e6f..d49c423c4df2bc1a077536dae63c67422fbbc7d2 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 7c97ea2028f0ec64830783d408bf928a59850a68..96f67908e98ee03f8771204ba8b94688e2bb7d54 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 9f8af0bc4210d2fb906894bbb375af157e6d63aa..1484f6b23ba399ff1ea243c95ca5af4fc3696963 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 641544f8e5978e35226f063bb8d953766c18725f..72c4d6253174f4489a9477a3deffc3efd65f3d4a 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 bd003768ab37d62e2a533fde10aabd47e54e7e58..c228aee8d77952d27bf1cf618f6f8fac1bd0b0e9 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 aacb4fb09133cd58e18d1c4c4ab2e946db1fc282..ca33411b4fd81fe433f7dbbab4e5cc3513834a49 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)