Commit graph

221 commits

Author SHA1 Message Date
Sally Coolatta
7559169144 Fix Trick Panel TERRAIN not working 2022-10-11 01:31:06 -04:00
Nev3r
5c9599f0a9 "UDMF: The whole thing" merged
See merge request STJr/SRB2!1714

Barely any RR features reimplemented
2022-10-09 01:13:37 -04:00
toaster
e03a97c18a Fix double i++ in M_LoadJoinedIPs 2022-09-27 19:52:37 +01:00
toaster
52f0217bac Completely rewrite how joined IPs are saved and written... again
- Use strlcpy instead of strcpy to prevent footguns
- Use fprintf instead of raw fputs
- Enforce consistent MAX_LOGIP (255) length for each component instead of a combination of magic number 255 and MAXSTRINGLENGTH (32!?) depending on where you look
- Fix fun memory leak in waiting
- Avoid pointless strlens
2022-09-26 21:28:33 +01:00
toaster
5779ac6a05 Re-order IPs on successful connection to recent server 2022-09-26 20:41:14 +01:00
toaster
e58a109a2b Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into joinedip-fixes 2022-09-26 20:16:34 +01:00
toaster
710b2da729 Don't strcpy into beyond the end of the joinedIPlist array 2022-09-26 20:14:17 +01:00
toaster
ff629a4c78 Merge branch 'kill-nonet' into 'master'
Kill last of NONET, DJGPP (DOS), WATTCP (also DOS?), _WINDOWS (DirectDraw)

See merge request KartKrew/Kart!704
2022-09-26 17:02:55 +00:00
James R
89abbd33b4 Kill last of DJGPP, WATTCP, _WINDOWS (ol' DirectDraw) 2022-09-24 19:43:44 -07:00
SteelT
08cd0393c0 Properly check for duplicate recent IP
Clean up M_AddToJoinedIPs a bit
2022-09-23 04:20:07 -04:00
toaster
e1c8f8095b Clean up recent IP handling a bunch. 2022-09-23 04:06:37 -04:00
Sally Coolatta
2fddc9f343 Merge branch 'master' into big-large-map-markers 2022-09-10 16:01:02 -04:00
SteelT
c95fed770e Fix the path of srb2home not being taken into account when loading the last IPs joined log file 2022-09-02 15:25:57 -04:00
James R
3b4bb8aea1 Fix always evaluates true warning 2022-06-11 16:49:36 -07:00
toaster
54b9f3b7cc Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart.git into new-menus
# Conflicts:
#	src/Sourcefile
#	src/f_finale.c
#	src/m_menu.c
#	src/y_inter.c
2022-05-22 17:22:49 +01:00
toaster
48d451cfef Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart.git into new-menus
# Conflicts:
#	src/d_ticcmd.h
#	src/deh_soc.c
#	src/deh_soc.h
#	src/deh_tables.c
#	src/dehacked.c
#	src/f_finale.c
#	src/g_game.c
#	src/m_menu.c
2022-05-21 18:57:46 +01:00
toaster
38e6cba181 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart.git into uncapped-absolution
# Conflicts:
#	src/f_finale.c
#	src/sdl/i_video.c
#	src/st_stuff.c
2022-05-21 13:40:20 +01:00
SteelT
8e67946a58 Replace default home folder name and base filename used for screenshot/gifs 2022-05-20 23:08:28 -04:00
Sally Coolatta
852e9b8ce9 Rebrand all console / window stuff 2022-05-19 15:10:47 -04:00
toaster
0f0786617f Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart.git into new-menus
# Conflicts:
#	src/m_menu.c
2022-05-17 22:04:42 +01:00
James R
11f97049b1 Merge remote-tracking branch 'origin/master' into uncapped-absolution 2022-05-11 17:09:59 -07:00
James R
7579cf1b10 Fix misc warnings for GCC 12 2022-05-11 12:21:18 -07:00
Eidolon
f7ec2f182f Uncapped (squashed v2)
Squashed SRB2 2.2 Public uncapped without UDMF merge

Implement interpolation at the renderer level

Instead of interpolating thinkers, we interpolate mobjs inside the
renderer. Further interpolation is TBI.

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 6ecac4159a 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.

Adjust spawned mobj z by gravity inversion

Only check VERTICALFLIP for old_z calc

Fix Marathon Mode menu for uncapped

Move screenshot code before timing

Only play emerald hunt sounds on new tics

Restore deleted zofs (fixes signpost sparkles etc)

Revert to before screenUpdate boolean was added

Was done this way for the sake of an older version of uncapped's timing; now that the new timing is much better, I decided it should remain as close to pre-uncapped as it can be.

Run UpdateLevelInterpolators in preticker

Fixes KartKrew/Kart-Public#10

Run UpdateMobjInterpolators in preticker

Reset view interp in preticker

Add per-split player view resets
2022-05-06 22:47:39 -05:00
toaster
73dabaeab6 Merge branch 'master' into new-menus
# Conflicts:
#	src/d_clisrv.c
#	src/deh_soc.c
#	src/lua_baselib.c
#	src/m_cheat.c
#	src/m_menu.h
#	src/y_inter.c
2022-03-29 17:14:38 +01:00
James R
bdbd85b2cd pedantic: fix win32 2022-02-20 04:48:30 -08:00
James R
bef9f502ca pedantic: cast to (void*) for printf %p 2022-02-20 03:15:51 -08:00
James R
b4e056d06f Fix M_MkdirEach and M_PathParts
OKAY I didn't test this on Windows before, it was BROKEN
AND SHITTY CODE.
2022-02-14 14:26:43 +01:00
James R
cdce6824f2 Fix M_MkdirEach and M_PathParts
OKAY I didn't test this on Windows before, it was BROKEN
AND SHITTY CODE.
2021-12-29 22:13:06 -08:00
Sally Coolatta
92aff0b57c Finish some unused SDL hat input support to use events rather than polling all of the time 2021-12-28 08:02:32 -05:00
Sally Coolatta
f17b948491 Update how input is handled in menus to use key bindings
VERY broken right now, it lost the delay between key presses. Kinda already sick of the reorganization needed though
2021-11-29 12:02:56 -05:00
Sally Coolatta
cd8862f0bc New input handling
Events have a player ID instead of adding billions of keys for separate gamepads. Axis movement (mouse movement, analog sticks) now are counted as keys, so axes don't need to be separately implemented for all controls. Game controls emulate a Saturn controller (some of the external functions like screenshot / gif should be readded, but I got lazy)

This will allow later us to save a config for a controller that can be reused for any player slot, which is one of the main goals for profiles.

Only just enough was made to use the new input system to make it compile. Menus in this branch should aim to move to using PlayerInputDown entirely, instead of using hardcoded keys & simply remapping to those
2021-11-26 14:56:25 -05:00
SinnamonLat
1412b96b20 EXPERIMENTAL: Save last 3 IPs manually joined to allow rejoining them later 2021-11-16 23:03:46 +01:00
toaster
b4af07ffed Merge branch 'master' into new-menus
# Conflicts:
#	src/d_main.c
#	src/dehacked.c
#	src/m_menu.c
#	src/v_video.c
#	src/y_inter.c
2021-10-18 01:18:37 +01:00
Sally Coolatta
359cf86efb Merge branch 'master' into big-large-map-markers 2021-04-09 19:49:33 -04:00
James R
08348fcd43 Merge remote-tracking branch 'srb2/next' 2021-04-05 01:26:17 -07:00
Sally Coolatta
9d7ec0ab8f Merge SRB2 next
Probably doesn't compile yet, but I got rid of all of the conflicts for anyone who wants to take a stab at it.
2021-02-27 05:18:36 -05:00
Jaime Ita Passos
7380ccde60 Fix unused variable warning when USE_APNG is not defined 2020-12-19 17:40:18 -03:00
GoldenTails
676f758d39 Add aPNG downscaling, and its associated consvar. 2020-11-19 13:45:04 -06:00
Sally Coolatta
e6a9e5a68e Merge branch 'master' into new-menus 2020-11-08 02:49:28 -05:00
James R
8f68a21f2f Fix many instances of G_BuildMapName
Some things are gonna be busted. Fix it later, BYE.
2020-10-31 20:17:12 -07:00
James R
37c345c7eb Map lump names can be anything, map number is dynamically allocated 2020-10-30 20:10:31 -07:00
Sally Coolatta
7c2bd0d1c2 Merge remote-tracking branch 'srb2/next' into the-scary-22-merge 2020-10-24 20:50:58 -04:00
James R
b7c4a82a0f Replace C90's junk with a modest macro 2020-10-06 23:04:23 -07:00
toaster
a43f88074e Fix the weird "Eggman is not a colour" print by fixing the code that overwrote your skin and colour willy-nilly, and then disabling it (it was a mistaken element of the port). 2020-09-22 19:44:13 +01:00
Sally Coolatta
bc868d8c60 m_misc compiles 2020-08-14 06:32:03 -04:00
Sally Coolatta
6ef0af4ba5 g_game and g_input now compile 2020-08-13 00:05:44 -04:00
Sally Coolatta
8731c6b7a4 Another round of fixing up
- gametyperules are now fitting for kart, not applied to the whole codebase though
- a few more files compile
2020-08-11 16:13:17 -04:00
Sally Coolatta
a50a9a1843 Lots of splitscreen fixes
LOTS of stuff I changed to use arrays instead of constantly duplicated code
2020-08-10 23:38:32 -04:00
Sally Coolatta
c96bd5f64a Many removals
Lots of NiGHTS code, lots of ringslinger code, revert actnum behavior back to vanilla
2020-08-10 21:45:51 -04:00
Sally Coolatta
7ac6723e46 gamecontrol has another index for player num, instead of being duplicated for players 2-4 2020-08-10 20:08:32 -04:00