Commit graph

32 commits

Author SHA1 Message Date
tertu marybig
9e5a828508 New M_Random implementation 2023-07-26 14:53:01 +00:00
Jaime Ita Passos
2f98cd3b97 Fix I_GetFreeMem 2023-05-19 14:26:30 -03:00
spherallic
1470d099e3 Update copyright year & credits 2023-03-31 14:53:31 +02:00
Eidolon
e5dea805fa Revert "Merge branch 'gamepad-refactor' into next"
This reverts commit 696e2ab909, reversing
changes made to d98d59494f.
2023-01-26 19:26:28 -06:00
Jaime Ita Passos
46f7fa406f Refactor gamepad code
Implements the SDL Game Controller API, haptics, and axis bindings.
2022-11-14 00:37:08 -03:00
Eidolon
f0d7d8467f Refactor timing code even more
System layer is greatly simplified and framecap
logic has been moved internally. I_Sleep now
takes a sleep duration and I_SleepDuration
generically implements a precise sleep with spin
loop.
2022-05-01 00:32:46 -05:00
Eidolon
e79654a33a Completely refactor timing system
Time is now tracked internally in the game using I_GetPreciseTime
and I_UpdateTime. I_Time now pulls from this internal timer. The
system code no longer needs to keep track of time itself.

This significantly improves frame and tic timing in interp mode,
resulting in a much smoother image with essentially no judder at
any framerate.
2022-04-30 16:33:23 -05:00
Sally Coolatta
80cb9994d5 Move I_FinishUpdate to D_SRB2Loop to sync screen updates with FPS cap, use timestamps in I_FrameCapSleep to simplify the code 2022-04-26 20:56:33 -05:00
Sally Coolatta
f482218913 I_GetFrameTime to try and improve frame pace
(It doesn't feel that much better though.)
2022-04-26 20:56:33 -05:00
Sally Coolatta
b18e53417a Handle the sleep at the end of D_SRB2Loop instead of the start
Simplifies logic in the other parts of the loop, and fixes problems with it frequently waiting too long.
2022-04-26 20:56:33 -05:00
Sally Coolatta
c186d6402b Lots of FPS stuff
- Disabled VSync, due to the numerous problems it has.
- Instead, added an FPS cap.
- Frame interpolation is now tied to fpscap != 35.
- By default, the FPS cap is set to the monitor's refresh rate.
- Rewrote the FPS counter.

(This also consolidates several more commits ahead of this
fixing various issues. -eid)
2022-04-26 20:56:32 -05:00
James R
1b49a96eed Interpolate from time of previous tic
Previously interpolated from last 35th of a second, which
may be offset from game time due to connection lag.

Consider this the proper fix to 54148a0dd0 too.
2022-04-26 20:56:31 -05:00
Eidolon
b625076c87 Implement interpolation at the renderer level
Instead of interpolating thinkers, we interpolate mobjs inside the
renderer. Further interpolation is TBI.
2022-04-26 20:31:37 -05:00
spherallic
14295ac7de 2022 2022-03-03 20:24:46 +01:00
Hannu Hanhi
270c7701b4 Timestamp function for Lua 2021-11-08 01:17:30 +02:00
SteelT
0f4074f22d Remove unused I_GetMouseGrab function 2021-09-23 13:46:26 -04:00
LJ Sonic
cfa48574be Merge branch 'next' into 'lua-inputs'
# Conflicts:
#   src/lua_script.c
2021-06-19 10:34:48 -04:00
LJ Sonic
d325c7e6d3 The year is 2021 2021-05-07 17:45:56 +02:00
SwitchKaze
5a247bf375 Fix typo in comment of I_GetMouseGrab 2021-04-02 15:46:08 -05:00
SwitchKaze
eb2dc9e99b Mouse improvements 2021-04-02 15:46:08 -05:00
James R
84ce53db60 Use high precision timer, replace I_GetTimeMicros with I_GetPreciseTime and I_PreciseToMicros 2020-11-07 01:31:24 -08:00
Hannu Hanhi
64a153fdee Render stats 2020-05-02 23:13:08 +03:00
James R
7060083db5 Update copyright year to 2020 2020-02-19 14:08:45 -08:00
Louis-Antoine
5bde4df439 Grab mouse again when closing menu, unpausing, etc 2020-01-02 00:45:28 +01:00
James R
35053adfb2 Rename I_StartupKeyboard to I_RegisterSignals and call it in a sane place 2019-12-12 21:30:35 -08:00
James R
6dcdb8d951 Move everything to i_system.c
This also simplifies things; SDL isn't initialized in the parent process.
2019-12-12 15:08:27 -08:00
James R
7c383e4a1f nix: Fork before game code and wait to catch signals and coredumps
Ditched signal_handler to avoid worrying about async-signal-safe functions.
D_QuitNetGame is not called, so players whose programs are interrupted by a
signal will time out from the server. Because the game runs in a child process,
the window can close before the "Signal Caught" text box appears.

"(core dumped)" is also included in the message if core dumping could be
determined.
2019-12-11 23:46:57 -08:00
Steel Titanium
d415cd5c6d
Update copyright date on source files 2019-12-06 13:49:42 -05:00
mazmazz
ea7162a76a Update source copyrights to 2018 2018-11-25 07:35:38 -05:00
Inuyasha
bb20cfd6be Clipboard copy/paste testing
(unfinished, but basics work)
2016-11-03 01:43:57 -07:00
Inuyasha
f07585191b copyright dates/statements updated and such
(no actual SLOC changes)
2016-05-17 17:42:11 -07:00
Alam Ed Arias
b93cb1b65a SRB2 2.1 release 2014-03-15 13:11:35 -04:00