Commit graph

518 commits

Author SHA1 Message Date
Sally Coolatta
f34a61156c Papersprite angle interpolation
Makes the ending signpost smooth
2022-04-26 20:56:35 -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
cd70b499bd Fully fix drop shadows
It used the thing's floorz / ceilingz directly -- that wouldn't account for interpolated coordinates.
2022-04-26 20:56:31 -05:00
Eidolon
ac2510f284 Homogenize mobj interpolations 2022-04-26 20:56:27 -05:00
Eidolon
4ee6027180 Remove unnecessary precipmobj thinker hack 2022-04-26 20:31:39 -05:00
Eidolon
7c9e133eb4 Fix misc dropshadow issues 2022-04-26 20:31:38 -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
Sally Coolatta
8c62a0d640 Fix papersprites being rotated incorrectly in Software when viewing them on the flipped side 2022-03-22 05:53:21 -04:00
sphere
7ec7b2699f Merge branch 'floorsprite-and-shadow-fake-planes-fix' into 'next'
Drop shadow fake floor/ceiling fix

See merge request STJr/SRB2!1638
2022-03-21 22:40:25 +00:00
Lactozilla
4f9ac9edb8 Drop shadow fake floor/ceiling fix 2022-03-21 22:40:24 +00:00
spherallic
14295ac7de 2022 2022-03-03 20:24:46 +01:00
sphere
14cb5415c9 Merge branch 'fix-portals' into 'next'
Fix portals

See merge request STJr/SRB2!1724
2022-02-17 12:26:27 +00:00
LJ Sonic
6c7d4b8ef5 Merge branch 'sw-splat-skybox-crash' into 'next'
Fix software splats breaking and crashing in skyboxes

See merge request STJr/SRB2!1711
2022-02-06 17:22:58 +00:00
LJ Sonic
c69edce2fc Merge branch 'sw-dropshadow-patch' into 'next'
Hack that fixes software drop shadow crashes (Fixes #159)

Closes #159

See merge request STJr/SRB2!1700
2022-02-06 17:22:08 +00:00
Hannu Hanhi
ba04b045e6 Fix portals
- Resetting portalcullsector fixes the major visual glitches

- Using 32 bits for nummasks and i fixes crashes when rendering lots of portals
2022-01-25 04:53:40 +02:00
Hannu Hanhi
f72f45d93a Fix software splats breaking and crashing in skyboxes 2022-01-14 19:53:03 +02:00
lachablock
d764d68d02 Turn dispoffset into a mobj field 2022-01-13 18:53:26 +11:00
Hannu Hanhi
a8fe12ae98 Hack that fixes software drop shadow crashes by bypassing incorrectly set variables 2022-01-04 22:30:50 +02:00
sphere
a3be09bb3f blentran part 2: Sprite & patch blendmodes. 2021-12-05 00:48:21 +01:00
sphere
3802f601a9 blentran part 1: Flag changes & semibright support. 2021-12-05 00:48:21 +01:00
Hannu Hanhi
77ecfb9cdc Perfstats averaging and refactor 2021-10-29 02:18:02 +03:00
Tatsuru
8aee7fcbce Merge branch 'floorsprite-fix' into 'next'
Fix #649

Closes #649

See merge request STJr/SRB2!1604
2021-09-11 15:00:14 +00:00
Jaime Ita Passos
450955cba2 Fix floor sprite projection 2021-08-26 13:22:32 -03:00
lachablock
2e7141b54a Use tracer's color for uncolored objects flagged with MF2_LINKDRAW 2021-07-06 18:56:45 +10:00
lachablock
7ea73bf817 Add a color field to vissprites and use that instead of referencing its mobj 2021-07-06 18:36:05 +10:00
LJ Sonic
4af3b860fd Merge branch 'next' of https://git.do.srb2.org/STJr/SRB2.git into folder-next 2021-06-25 00:30:30 +02:00
Nev3r
ab06ff011e Merge branch 'colorfret' into 'next'
Respect mobj->color while enemies & bosses flash (resolves #531)

Closes #531

See merge request STJr/SRB2!1513
2021-06-01 02:31:22 -04:00
lachablock
4e5c3566c9 Respect mobj->color while enemies & bosses flash 2021-05-22 16:52:01 +10:00
Sally Coolatta
5d93f86499 Merge branch 'next' into skin-unlocks-sanity 2021-05-08 12:55:46 -04:00
Monster Iestyn
65624bf6c0 Change numadded counter to UINT16 instead of UINT8, to allow for more sprites properly 2021-04-25 19:01:51 +01:00
Sally Coolatta
8278e621fb Removed skin->availability
Locked skins now are a specific unlockable type, instead of being tied to the skin's properties.

This has plagued custom gamedata since 2.2 launch. It's extremely obnoxious having to set aside random numbers as dummy unlockables just to ensure that Amy Fang & Metal are unlocked from the start in a custom map pack.

Other changes made to accommodate this:
 - R_GetSkinAvailabilities is now created from the list of unlockables set to skin type. (1st skin unlockable defined is (1), 2nd skin unlockable defined is (1 << 1), etc...)
- The "Added skin x" print shows up when loading addons but not at all for the base game, because the previous behavior of hiding based on if the skin was locked would now require iterating unlockables, which felt wrong to do during that stage of the loading process
 - I noticed in my test wad that Sonic&Tails would give you Sonic&Sonic out if Tails was locked. I fixed that by making both skins required to show the character select option.

Mods that reserved empty dummy unlockables for Amy Fang and Metal won't have to do anything. Mods that wanted to re-lock them behind different requirements will have to update, but in the future they will not have to be in specific slots. Additionally, now Sonic Tails and Knuckles can also be locked for mods.
2021-04-25 07:18:32 -04:00
sphere
bcd3245b76 Merge branch 'blendmode-revision' into 'next'
Blending changes

See merge request STJr/SRB2!1446
2021-04-11 08:18:12 -04:00
Jaime Ita Passos
eece82c481 Blend modes revision
This changes how blend modes render, and includes fixes.
2021-03-30 17:03:05 -03:00
Jaime Ita Passos
4025a1d517 [Software] A few floorsprite fixes
This fixes the texture of the floorsprite sometimes facing the wrong way, since plane rendering can change the view angle.
2021-03-29 23:04:13 -03:00
Jaime Ita Passos
dca158096d Experimental implementation 2021-03-22 23:56:55 -03:00
Lach
cf42a62b7e Merge branch 'dropdropSHAdow' into 'next'
Papersprite dropshadows no longer askance

Closes #409

See merge request STJr/SRB2!1408
2021-03-14 20:52:25 -04:00
Jaime Ita Passos
07ffe2599c Fix thing scale mismatch in R_DrawVisSprite 2021-02-28 16:23:40 -03:00
toaster
73758f50ff Fix dropshadows of papersprites drifting depending on angle relative to camera. Discovered in Kart internal for the paper item drops and ported back, hence the branch name. 2021-02-19 06:45:28 -05:00
LJ Sonic
09d911a5b6 Revert "Replace all instances of P_AproxDistance with FixedHypot"
This reverts commit 75633bde50.
2021-02-13 17:45:20 +01:00
LJ Sonic
83947d4428 Merge branch 'redundant-hypot' into 'next'
Replace P_AproxDistance with FixedHypot, and replace FixedHypot's algorithm with R_PointToDist2's

See merge request STJr/SRB2!1320
2021-01-25 18:08:25 -05:00
James R
4d6b677765 Revert "Merge branch 'plane-sorting-fix-part-3' into 'next'"
This reverts merge request !1235
2020-12-23 03:02:31 +00:00
James R
75633bde50 Replace all instances of P_AproxDistance with FixedHypot 2020-12-12 14:53:54 -08:00
James R
4ab667c6a0 Merge branch 'spritestuff2-fixes' into 'next'
Some fixes for spritestuff2

See merge request STJr/SRB2!1264
2020-11-25 19:26:49 -05:00
James R
40e954779e Resolve one last conflict in splat sorting
Can't use gz/gzt because there is no transformation to make those work
differently for splats.
2020-11-22 15:12:34 -08:00
Jaime Ita Passos
5293c52bca Remove SHORT macros for referencing patch width/height/offsets 2020-11-22 20:02:47 -03:00
James R
54da9552de Merge remote-tracking branch 'origin/next' into plane-sorting-fix-part-3 2020-11-22 14:41:42 -08:00
Jaime Ita Passos
071ec73389 Some fixes for spritestuff2 2020-11-22 03:47:15 -03:00
Jaime Ita Passos
5e890ee6f8 Merge branch 'next' into spritestuff2 2020-11-19 00:52:43 -03:00
James R
0d97903573 Do not factor height into sprite thickseg sorting 2020-11-05 18:45:52 -08:00
James R
8d63a994f0 Remove unused stuff 2020-11-05 18:45:51 -08:00
James R
81cbf35560 Check that top of sprite is above plane or bottom is below
This fixes slightly raised fofs drawing on top of sprites that should be in
front of them. Previously would check that the bottom of the object was above
the plane. Now also uses sprite offsets like the fof seg sorting does.
2020-11-05 18:45:43 -08:00
Jaime Passos
805818d48e R_DrawSplatSprite -> R_DrawFloorSprite 2020-11-04 21:43:16 -03:00
Jaime Passos
0f9d85694d Implement an "ignore colormaps" sprite rendering flag 2020-10-27 19:54:50 -03:00
Jaime Passos
b03d95c5c6 Bug fixes 2020-10-27 17:02:35 -03:00
Jaime Passos
b872222b50 Implement blend modes 2020-10-27 00:03:41 -03:00
Jaime Passos
a21685812f Rename R_DrawVisSplat to R_DrawSplatSprite, move into r_splats.c 2020-10-19 17:36:29 -03:00
Jaime Passos
dbc149f85a Remove FLOORSPLATS define 2020-10-19 17:33:16 -03:00
Jaime Passos
bf9ed39ec3 Change vis->transmap statement 2020-10-15 14:05:18 -03:00
Jaime Passos
bc3ac7615f Remove unnecessarily duplicated code in R_GetSpriteTranslation 2020-10-15 11:32:21 -03:00
Jaime Passos
3bace37a25 Don't project if rot_y is less than a single fracunit 2020-10-14 21:26:23 -03:00
Jaime Passos
bf8bb383ab Simplify the floor splat clipping code a bit 2020-10-14 21:20:37 -03:00
Jaime Passos
ab526e47cc Implement object-defined floor sprite slopes. 2020-10-14 00:57:13 -03:00
Jaime Passos
a8a66f698a [Software] Use the light at the bottom of the object for splats 2020-10-13 23:14:05 -03:00
Jaime Passos
4b7bfce95e Implement sloped floor sprites 2020-10-13 22:42:07 -03:00
Jaime Passos
4273896311 Implement relative and absolute sprite offsets for objects (mobjs)
Added RF_ABSOLUTEOFFSETS and RF_FLIPOFFSETS
2020-10-13 12:57:36 -03:00
Jaime Passos
87e5d63723 Improve sorting between sprites and floor sprites 2020-10-13 02:24:18 -03:00
Jaime Passos
95d0097df6 Improve splat sorting:
Adjust the sort scale of splats
Do splat sorting in R_CreateDrawNodes if either vissprite is a splat, instead of if both are
2020-10-13 01:45:18 -03:00
Jaime Passos
7dbd34345c Fix splat sorting 2020-10-13 01:09:17 -03:00
Jaime Passos
f2aca01e2b Fix other uninitialized variable warnings 2020-10-13 00:14:27 -03:00
Jaime Passos
831ccccdd6 OpenGL support for splats, fix some shadow draw bugs in Software 2020-10-12 19:53:21 -03:00
Jaime Passos
b620f4835a Support spritexscale and spriteyscale in OpenGL
Fix papersprite scaling with spritexscale and spriteyscale in Software
2020-10-12 17:25:18 -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
b2f45986ad Add r_patchrotation.h 2020-10-10 18:53:05 -03:00
Jaime Passos
6e5f71dd45 Refactor patch rotation 2020-10-10 18:43:26 -03:00
Jaime Passos
b15bbd505c Merge branch 'next' into patch-stuff-again-2 2020-10-10 17:01:10 -03:00
Hannu Hanhi
4f20a20165 Performance stats 2020-10-10 22:12:34 +03:00
Jaime Passos
aaa9cff6ac Fix PNG issue in OpenGL + optimize PNG sprite loading 2020-10-02 19:48:13 -03:00
SteelT
a033f482be Merge branch 'pictureformats' into 'next'
PNG conversion refactoring

See merge request STJr/SRB2!675
2020-09-10 15:58:18 -04:00
Jaime Passos
dcaad758f4 Improved memory management for patches 2020-09-07 02:23:07 -03:00
Jaime Passos
92c4993d67 Introduce Doom patch format into picture formats
Fixes sprite rotation
2020-08-15 21:52:01 -03:00
Jaime Passos
9b426b474c Merge branch 'pictureformats' into patch-stuff-again-2 2020-08-15 20:48:28 -03:00
Jaime Passos
91ed56ef40 Refactor patch loading 2020-08-08 05:16:47 -03:00
lachwright
3a96142c8b Hide Metal Sonic's jet fume in first person 2020-08-03 20:09:35 +08:00
Jaime Passos
7911deebf8 Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2 into pictureformats 2020-07-06 19:29:14 -03:00
kaysrishaq
cad1f57b1e FF_HORIZONTALFLIP and mobj->mirrored (sprite enhancements) 2020-06-19 11:11:18 -04:00
Hannu Hanhi
da98ea242e Merge remote-tracking branch 'upstream/next' into shaders-224-next-merge 2020-06-07 20:01:05 +03:00
lachwright
f32d29f700 Oops, forgot to #undef 2020-05-31 01:26:23 +08:00
lachwright
a7f73bfa85 Move drop shadows to the ceiling for objects in reverse gravity 2020-05-31 01:21:26 +08:00
Monster Iestyn
702a7041d4 also do the fovtan multiplication thing with precip sprites 2020-05-20 19:34:18 +01:00
Monster Iestyn
c3d576058a on second thought maybe we don't need extra tx clamping, it turns out to be more effort than it's worth (at least for now)
meanwhile, let's move x/yscale calculations down since we don't actually need them until later on
2020-05-19 22:00:34 +01:00
Monster Iestyn
65d6b04fd2 change limits for tx based on fov, by multiplying by fovtan
this makes it so that higher fov values can actually let you see all the sprites that should be in the view
2020-05-19 18:54:39 +01:00
Monster Iestyn
35e5d673e0 do tx checking after tz clamping, not before 2020-05-19 18:43:33 +01:00
Monster Iestyn
12e1094143 We don't actually need x1 or x2 until these points in the function, at least for papersprites 2020-05-19 17:23:22 +01:00
Monster Iestyn
1a790235c6 added basic culling of papersprites if tx for either is too large, proper clamping to be added later
also removed some commented out old code
2020-05-19 17:19:44 +01:00
Monster Iestyn
c8320b6c9d split "rot" into two variables: frame and rot, for frame number and rotation angle
it always bothered me that "rot" was used for both of the above, since it confused me as to what it was for every time I look at this function
2020-05-19 16:58:53 +01:00
Monster Iestyn
dd42682791 remove gxt and gyt, as they are unnecessary
also add a few comments to explain what tx/tz are
2020-05-19 16:48:50 +01:00
Louis-Antoine
d0abd6e86c Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2.git into slope-cleanup
# Conflicts:
#	src/hardware/hw_main.c
#	src/p_spec.c
2020-05-18 16:14:05 +02:00
Louis-Antoine
a06c4a8c98 Rename P_GetZAt to P_GetSlopeZAt and P_GetZAt2 to P_GetZAt 2020-05-18 15:23:56 +02:00
Jaime Passos
00ac9deb5b Fix missing sprite column 2020-05-15 16:17:31 -03:00
Jaime Passos
1a79f6246d Merge remote-tracking branch 'origin/next' into pictureformats 2020-05-15 01:34:54 -03:00