Commit graph

123 commits

Author SHA1 Message Date
LJ Sonic
41fb0c8943 Merge branch 'netcode-refactor' into merging 2023-01-15 17:45:06 +01:00
LJ Sonic
717e0d5a17 Move netcode files to a new folder 2022-12-31 14:10:19 +01:00
sphere
e301268af7 Merge branch 'nodepthset' into 'next'
Don't force bit depth to 8-bit when setting default video mode

See merge request STJr/SRB2!1733
2022-12-31 09:01:27 +00:00
Lactozilla
86a052537e Add PO2 flat cases for sizes smaller than 32x32 2022-11-16 01:40:54 +00:00
Eidolon
90489de517 Merge branch 'slope-fog-fix' into 'next'
Fix slope planes not being able to render fog (fixes #664)

Closes #664

See merge request STJr/SRB2!1637
2022-11-13 20:17:07 +00:00
Eidolon
4a580558f0 Tweak showfps alignment 2022-11-07 18:50:23 -06:00
Sally Coolatta
79f736b75f Use double instead of precise_t for FPS counter
Makes the displayed FPS more accurate to what it's actually displaying.

Also removed HUDTRANS from it -- stop it fading out during level transitions, it's annoying when I actually want to see the FPS during those bits.
2022-05-19 16:08:42 -05: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
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
Eidolon
a56a57b3d1 Misc changes after Kart cherry-picks 2022-04-26 20:56:32 -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
Sally Coolatta
40b021d6e4 Calculate FPS stuff even if frame is skipped
I decided ultimately to actually keep the frame skip optimization disabled, because I think it is actually a little bit helpful that you can still get accurate rendering perfstats while paused, however if we decide otherwise then we can have this optimization back without making the game act like it's lagging.
2022-04-26 20:56:32 -05:00
spherallic
14295ac7de 2022 2022-03-03 20:24:46 +01:00
SteelT
98aafc6056 Don't force bit depth to 8-bit when setting default video mode 2022-02-03 18:44:46 -05:00
Jaime Ita Passos
5db4bff19c Fix slope planes not being able to render fog 2021-10-12 14:10:48 -03:00
LJ Sonic
d325c7e6d3 The year is 2021 2021-05-07 17:45:56 +02:00
katsy
d1700bbf18 Merge remote-tracking branch 'stjr/next' into dontdothisinsoftwarelol 2021-03-31 03:15:31 -05:00
katsy
d6eaf7e0ff clear before switching, not after 2021-03-28 12:22:04 -05:00
Hannu Hanhi
6c330bbf16 Fix video mode 0 not getting centered 2020-12-21 00:03:20 +02:00
Jaime Ita Passos
abe35fd008 Some interface fixes 2020-11-22 17:22:18 -03:00
Jaime Passos
8f65b98c24 Remove NOWATER define 2020-11-05 00:00:08 -03:00
Jaime Passos
4b7bfce95e Implement sloped floor sprites 2020-10-13 22:42:07 -03:00
Jaime Passos
cc97e22e2f Changes to sprite rendering:
- Added render flags (see r_defs.h)
- Implemented floor splats
- Drop shadow sprite rendering through render flags
2020-10-12 00:13:22 -03:00
Jaime Passos
b15bbd505c Merge branch 'next' into patch-stuff-again-2 2020-10-10 17:01:10 -03:00
James R
dbd79a29a4 Replace C90's junk with a modest macro 2020-10-06 23:04:23 -07:00
James R
be4c5751f8 Revert "Warn when going to OpenGL from the menu"
This reverts commit 569453ee93.

And one line from b6089ccdaf.
2020-10-02 15:37:23 -07:00
Jaime Passos
78cc4a78d0 Refactor renderer switching 2020-08-14 22:27:16 -03:00
Jaime Passos
91ed56ef40 Refactor patch loading 2020-08-08 05:16:47 -03:00
toaster
9686ad2d70 * In-game timer option! Doesn't tick in intermission or in lag, only when a frame is actually run. Realtime option remains default.
* Tweak retry behaviour to restart timer and not subtract life if you're on the first level and haven't hit a checkpoint yet.
2020-05-15 16:33:20 +01:00
toaster
47419ce0df Introducing "antisplice" - a pair of small highlights on the Marathon bar that is based on the real time the executable has been open for and *isn't* restored with the Live Event Backup, making spliced runs basically intractable. 2020-05-15 15:08:45 +01:00
toaster
d593e2e1bb Introducing Marathon Run. (I was going to call it Marathon Mode, but NiGHTS Mode being right next to it on the menu looked terrible.)
Basically a dedicated Record Attack-like experience for speedrunning the game as a continuous chunk rather than ILs. Has several quality of life features.

Benefits include:
* An unambiguous real-time bar across the bottom of the screen, always displaying the current time, ticking up until you reach the ending.
* Disable the console (pausing is still allowed, but the timer will still increment).
* Automatically skip intermissions as if you're holding down the spin button.
* Show centiseconds on HUD automatically, like record attack.
* "Live Event Backups" - a category of run fit for major events like GDQ, where recovery from crashes or chokes makes for better entertainment. Essentially a modified SP savefile, down to using the same basic functions, but has its own filename and tweaked internal layout.
* "spmarathon_start" MainCfg block parameter and "marathonnext" mapheader parameter, allowing for a customised flow (makes this fit for purpose for an eventual SUGOI port).
* Disabling inter-level custom cutscenes by default with a menu option to toggle this (won't show up if the mod doesn't *have* any custom cutscenes), although either way ending cutscenes (vanilla or custom) remain intact since is time is called before them.
* Won't show up if you have a mod that consists of only one level (determined by spmarathon_start's nextlevel; this won't trip if you manually set its marathonnext).
* Unconditional gratitude on the evaluation screen, instead of a negging "Try again..." if you didn't get all the emeralds (which you may not have been aiming for).
* Gorgeous new menu (no new assets required, unless you wanna give it a header later).

Changes which were required for the above but affect other areas of the game include:
* "useBlackRock" MainCFG block parameter, which can be used to disable the presence of the Black Rock or Egg Rock in both the Evaluation screen and the Marathon Run menu (for total conversions with different stories).
* Disabling Continues in NiGHTS mode, to match the most common singleplayer experience post 2.2.4's release (is reverted if useContinues is set to true).
* Hiding the exitmove "powerup" outside of multiplayer. (Okay, this isn't really related, I just saw this bug in action a lot while doing test runs and got annoyed enough to fix it here.)
* The ability to use V_DrawPromptBack (in hardcode only at the moment, but) to draw in terms of pixels rather than rows of text, by providing negative instead of positive inputs).
* A refactoring of redundant game saves smattered across the ending, credits, and evaluation - in addition to saving the game slightly earlier.
* Minor m_menu.c touchups and refactorings here and there.

Built using feedback from the official server's #speedruns channel, among other places.
2020-05-14 23:10:00 +01:00
sphere
61dfee7e13 Don't show the FPS counter during startup. 2020-05-11 01:33:34 +02:00
sphere
c55d6dbc9f Make showfps save to config, and add a compact option. 2020-05-08 15:40:50 +02:00
James R
aca39d6210 Merge remote-tracking branch 'origin/master' into next 2020-04-09 17:04:04 -07:00
James R
2dfe276a73 Merge branch 'sdlglcontext' into 'master'
Only initialise OpenGL if the user intends to load it (for real this time)

See merge request STJr/SRB2!796
2020-04-09 19:51:20 -04:00
Louis-Antoine
892a8dd6e7 Make SRB2 flat like Earth 2020-03-20 18:55:29 +01:00
SteelT
7d14796954 Merge branch 'fix-ogllib' into 'master'
Fix -OGLlib

See merge request STJr/SRB2!794
2020-03-02 15:21:50 -05:00
James R
7060083db5 Update copyright year to 2020 2020-02-19 14:08:45 -08:00
Jaime Passos
e53a17bb52 Rename stuff around 2020-02-17 21:11:56 -03:00
Jaime Passos
cac5f9d171 add -nogl parm 2020-02-17 12:14:51 -03:00
Jaime Passos
9d9de3aff6 Only set OpenGL as the target renderer if it loaded successfully 2020-02-17 01:14:48 -03:00
Jaime Passos
b6089ccdaf Fix -OGLlib 2020-02-17 01:08:15 -03:00
Jaime Passos
8f3855d09f Don't stop the automap (just restart it instead.) 2020-01-26 23:12:28 -03:00
James R
7af2533d23 Make the menu option for renderer switching transparent under NOHW 2019-12-30 21:45:19 -08:00
James R
e8db39229c Don't let the user switch to OpenGL if NOHW 2019-12-30 20:29:41 -08:00
James R
569453ee93 Warn when going to OpenGL from the menu 2019-12-29 18:37:22 -08:00
Jaime Passos
5ea43aa023 Fix sprite rotation crashes. 2019-12-27 00:37:40 -03:00
James R
76a1a80d71 Save the renderer 2019-12-26 18:44:02 -08:00
James R
4959d52ae0 Make cv_renderer CV_NOLUA instead of hidden!!! 2019-12-26 18:15:52 -08:00