Commit graph

87 commits

Author SHA1 Message Date
Eidolon
8f354ad9c1 Implement Uncapped (squashed)
Co-Authored-By: Sally Coolatta <tehrealsalt@gmail.com>
Co-Authored-By: James R <justsomejames2@gmail.com>
Co-Authored-By: Monster Iestyn <iestynjealous@ntlworld.com>
Co-Authored-By: katsy <katmint@live.com>

Place Frame Interpolation in "Experimental" video options header

This seems like an appropriate way to describe the feature for now.

Add smooth level platter under interpolation, `renderdeltatics`

`renderdeltatics` can be used as a standard delta time in any place,
allowing for smooth menus. It will always be equal to `realtics`
when frame interpolation is turned off, producing consistent
framerate behavior everywhere it is used.

Add smooth rendering to save select screen

Add smooth rendering to Record/NiGHTS Attack, F_SkyScroll

Ensure viewsector is accurate to viewx/viewy

This fixes a potential crash in OpenGL when changing between levels.

Ensure + commands get executed before map start

Always have precise_t defined

Fix misc dropshadow issues

Reset view interpolation on level load

Remove unnecessary precipmobj thinker hack

Add reset interpolation state functions

Reset precip interpolation on snap to ceil

Reset mobj interp state on TeleportMove

Only swap view interp state if a tick is run

Run anti-lag chasecam at tic frequency

Fixes jittery and unstable chasecam in high latency netgames

Homogenize mobj interpolations

Add sector plane level interpolations

Add SectorScroll interpolator

Add SideScroll interpolator

Add Polyobj interpolator

Intialize interpolator list at a better time

Delete interpolators associated with thinkers

Interpolate mobj angles and player drawangle

Interpolate HWR_DrawModel

Add functions to handle interpolation

Much less code duplication

P_InitAngle, to fix angle interpolation on spawning objects

Fully fix drop shadows

It used the thing's floorz / ceilingz directly -- that wouldn't account for interpolated coordinates.

Do not speed up underwater/heatwave effect in OpenGL

Closer OpenGL underwater/heatwave effect to Software

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.

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.

Keep rect in memory

Feel better about this than creating one all da time

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)

Misc changes after Kart cherry-picks

Fix renderdeltatics with new timing data

Update mobj oldstates before all thinkers

Allow FPS cap values

Adjust how FPS cap is checked to improve FPS stability

Fix precip crash from missing vars

Improve the framerate limiter's timing for extreme stable FPS

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.

Reset mobj interp state on add

Add mobj interpolator on load netgame

Move mobj interpolators to r_fps

Dynamic slope interpolators

I_GetFrameTime to try and improve frame pace

(It doesn't feel that much better though.)

Move I_FinishUpdate to D_SRB2Loop to sync screen updates with FPS cap, use timestamps in I_FrameCapSleep to simplify the code

Fix plane interpolation light level flickering

Fix flickering plane interpolation for OpenGL in the exact same way

Funny OpenGL renderer being at least 50% copy-pasted Software code :)

P_SetOrigin & P_MoveOrigin to replace P_TeleportMove

Convert P_TeleportMove use to origin funcs

Revert "P_InitAngle, to fix angle interpolation on spawning objects"

This reverts commit a80c98bd164a2748cbbfad9027b34601185d93f5.

Waypoint polyobjects interpolate z & children

Add interpolation to more moving plane types

Adds interpolation to the following:
- Crumbling platforms
- Mario blocks
- Floatbob platforms (this one works really strangely due to two thinkers, maybe double-check this one?)

Reset overlays interp states each TryRunTics

Interpolate model interpolation (lol)

Use interp tracer pos for GL linkdraw

Papersprite angle interpolation

Makes the ending signpost smooth

Move intermission emerald bounce to ticker

Bring back shadows on polyobjects

Also optimizes the method used so rings can show their shadows too. Using just the subsector is a tad bit imprecise admittedly but any more precise methods get really laggy.

Fix a bunch of ticking in hu_ drawing functions

Revert "Reset overlays interp states each TryRunTics"

This reverts commit a71a216faa20e8751b3bd0157354e8d748940c92.

Move intro ticking out of the drawer

Adjust 1up monitor icon z offsets

Fixes interpolation issues with 1up monitors.

Delta time choose player menu animations

Add drawerlib deltaTime function

Interpolate afterimages further back

Use old sleep in dedicated mode

Clamp cechotimer to 0

Fixes issues with cechos staying on-screen and glitching out
(NiGHTS items for example).

Revert "Remove unnecessary precipmobj thinker hack"

This reverts commit 0e38208620d19ec2ab690740438ac2fc7862a49e.

Fix frame pacing when game lags behind

The frame timestamp should've been made at the start of the frame, not the end.

Fix I_FrameCapSleep not respecting cpusleep

Jonathan Joestar bruh

Allow dedicated to use precise sleep timing again

Instead of only using one old sleep, just enforce framerate cap to match TICRATE.

Make Lua TeleportMove call MoveOrigin

Reset Metal fume interp state on appear

Add interpdebug

Put interpdebug stuff in perfstats instead

Add timescale cvar

Slow the game down to debug animations / interpolation problems! Speed it up if you need to get somewhere quickly while mapping!

Enable timescale outside of DEVELOP builds

It has NETVAR, so it should be fine -- put an end to useful debugging features excluded in multiplayer!

Force interpolation when timescale != 1.0

Reset old_z in MT_LOCKON think

Fixes interpolation artifacting due to spawn pos.

Fix cutscenes in interp

Fix boss1 laser in interp

Interpolate mobj scale

Precalculate refresh rate

Slower PCs can have issue querying mode over and over. This might kinda suck for windowed mode if you have different refresh rate displays but oh well

Fix interp scaling crashing software

Reset interp scale when Lua sets .scale

Disable angle interp on fresh mobjs

Fix interp scale crash for hires sprites

Interp shadow scales

Copy interp state in P_SpawnMobjFromMobj

Fix multiplayer character select

Don't interpolate mobj state if frac = 1.0

Fix Mario block item placement

Interpolate spritescale/offset x/y

Fix offset copies for SpawnMobjFromMobj

THANKS SAL

Add Lua HUD drawlists

Buffers draw calls between tics to ensure hooks
run at the originally intended rate.

Rename drawerlib deltaTime to getDeltaTime

Make renderisnewtic is false between tics

I know what I'm doing! I swear

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.

Ensure mobj interpolators reset on level load

Ensure view is not interpolated on first frame

Disable sprite offset interpolation (for now)

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 17:35:30 -05:00
James R
fbde926497 Fix NOPNG compiling 2020-08-24 17:52:55 -07:00
Kimberly Wilber
1bfcec9242 [OSX] Fix "SIGILL: illegal instruction" on macOS Catalina
on OSX, strncpy may copy to overlapping (protected) memory. this
sometimes happens when loading WAD files.

This patch eliminates these problems for me
2020-08-15 12:16:05 -04:00
Hannu Hanhi
38c3d78d8a Cleaner version of the W_ReadLumpHeaderPwad memory leak fix 2020-06-13 21:37:33 +03:00
Hannu Hanhi
2f65955496 Add missing inflateEnd to fix memory leak in W_ReadLumpHeaderPwad 2020-06-13 17:07:05 +03:00
Sal
e4766bbaf1 Merge branch 'ferror-errno-yareyare' into 'master'
Fix false file error reporting

See merge request KartKrew/Kart-Public!162
2020-05-15 19:27:08 -04:00
James R
4ad360155f Fix nonpacked to packed cast for OpenGL
(cherry picked from commit d2a7a87c7f39bd423fde7f8b4228082d12839583)
2020-04-11 22:10:05 -07:00
James R
abaefa05b1 ferror does not return errno, are you stupid?
Use M_FileError to return the proper error description, or "end-of-file".
2019-10-07 17:55:31 -07:00
Latapostrophe
ff04e0c103 chaos conflict 2019-06-11 17:02:47 +02:00
Jaime Passos
de5e44cfbc Merge remote-tracking branch 'upstream/master' into gl_shaders 2019-06-10 16:21:46 -03:00
fickleheart
430831423c Strip out things that limit wad files added by filename 2019-04-17 23:09:10 -05:00
Monster Iestyn
7441dd7d9b Merge branch 'master' into next 2019-03-25 18:08:36 +00:00
Alam Arias
544f806f92 Merge commit 'upstream/master~1' 2019-03-22 10:18:10 -04:00
Jaime Passos
76967e46bb destroy hw_glide.h because no modern GPU supports such API 2019-03-21 18:23:40 -03:00
Jaime Passos
da001a5b54 PK3 support 2019-03-19 18:25:55 -03:00
Jaime Passos
f714cba310 Improve custom shader support 2019-03-19 17:37:04 -03:00
Jaime Passos
75919422c6 custom shader support 2019-03-18 23:03:29 -03:00
Steel Titanium
6d751ff302 Remove the define. 2019-03-15 18:46:25 -04:00
Steel Titanium
5a170b9e4e Merge branch 'master' into errorifpng 2019-03-15 16:40:47 -04:00
fickleheart
c30c3f7a3a Merge remote-tracking branch 'remotes/upstream/next' into HEAD 2019-03-11 21:53:53 -05:00
fickleheart
fcf072cbeb Merge remote-tracking branch 'remotes/upstream/master' into HEAD 2019-03-11 21:53:47 -05:00
fickleheart
66c9d9aa83 Move modified check on -file addons later in startup 2019-03-10 19:44:31 -05:00
fickleheart
5f0c4271d7 Use consts in place of some 16s 2019-03-09 16:46:55 -06:00
Steel Titanium
15323328c5 Check using memcmp() 2019-03-03 22:43:21 -05:00
Steel Titanium
3d5d02fc15 Error if the lump is a PNG lump 2019-03-03 19:58:01 -05:00
Alam Arias
d4f05e5be9 fixup merged mess for NO-LUA mess 2019-03-02 13:32:47 -05:00
Alam Arias
ae368a3e0f Merge remote-tracking branch 'upstream/master' into upstream-merge 2019-03-01 17:33:32 -05:00
Alam Ed Arias
c2618fd987 Merge branch 'master' into next 2019-03-01 17:32:17 -05:00
Alam Ed Arias
f823768699 Fix building without BLUA support 2019-03-01 17:31:32 -05:00
wolfy852
84755ec171 Handle things in a more sensible way 2019-02-20 19:04:18 -06:00
wolfy852
f34ed24132 Correct an oversight 2019-02-19 22:20:18 -06:00
Steel Titanium
de9e25d5b3
Add missing ifdefs 2019-02-14 20:59:07 -05:00
toaster
66273898b7 * Refactor all instances of majormods = true; to route through G_SetGameModified, and catch a few spots I missed in the process.
* Make G_SetGameModified only console-print for major mods.
* Add amnesty to "major mod" detection while loading files with custom savedatas.
* Improved the console prints for command `isgamemodified`.
2019-01-17 22:01:28 +00:00
toaster
2f2d3768d5 * Increased leniency for SOC wrt "major mods".
* If your file defines state and object freeslots in SOC, you are allowed to modify those freeslots IN ANY SOC SCRIPT IN THE SAME FILE without being marked as a "major mod".
	* If your file contains broken unlockables/emblems that don't actually have effect for any reason, it's not counted as a "major mod".
* Added add-ons menu message for adding a "major mod".
2019-01-17 20:51:41 +00:00
TehRealSalt
de72403fb9 Add MUSICDEF lump for defining custom songs & replacing existing songs
Very rudimentary at the moment, but it's workable
2019-01-09 21:00:45 -05:00
SeventhSentinel
73542c008c merge srb2 next 2019-01-05 15:59:23 -05:00
Digiku
393c64b8bc Merge branch 'expanded-nmuslist' into 'next'
Expand NMUSList to include HUD changes

See merge request STJr/SRB2!388
2019-01-01 15:06:04 -05:00
mazmazz
1b7a9aaa01 2.1 Score/Time/Rings lump name 2018-12-16 16:53:13 -05:00
mazmazz
899120e475 Revert NMUSlist to original 2.1 2018-12-16 16:42:57 -05:00
mazmazz
d7321fd8c4 Pull expanded NMUSlist from 2.2 2018-12-16 16:40:40 -05:00
mazmazz
046d36a657 Remove Kart entries from NMUSlist 2018-12-16 16:08:31 -05:00
mazmazz
f0967520ed Compile fixes; enable PK3 support in addons menu
* Add missing vars highlightflags, recommendedflags, warningflags from Kart
* V_GetStringColormap() use vanilla behavior because Kart behavior glitches for us
* V_GetStringColormap() made non-static
2018-12-15 21:44:39 -05:00
mazmazz
37950341ec Merge remote-tracking branch 'public-gitlab/next' into addons-backport 2018-12-15 20:52:46 -05:00
mazmazz
0a3b3736bf Handle Kart-specific changes; add PK3 to exttable 2018-12-15 20:50:33 -05:00
mazmazz
b32f50648d Merge branch 'addons_menu' into 'master'
Addons menu

See merge request KartKrew/Kart!8
2018-12-15 20:46:42 -05:00
TehRealSalt
aa16edec1d Merge remote-tracking branch 'srb2public/next' into merge-next 2018-12-03 00:31:23 -05:00
Monster Iestyn
e0a1c43813 Free lump names *before* either lumpinfo or the WAD itself! 2018-11-30 14:19:47 +00:00
TehRealSalt
aa9b36ac04 Fix this memory freeing 2018-11-29 22:31:20 -05:00
TehRealSalt
4cfaf746bb Reimplement png warning 2018-11-29 11:16:40 -05:00
TehRealSalt
d9654bcc1a Merge remote-tracking branch 'srb2public/next' into merge-next 2018-11-29 10:26:38 -05:00