Commit graph

604 commits

Author SHA1 Message Date
James R
0642e2206e Rotate sprite correctly in reverse gravity 2021-04-06 16:25:25 -07:00
James R
08348fcd43 Merge remote-tracking branch 'srb2/next' 2021-04-05 01:26:17 -07:00
toaster
e27506c660 * Made it possible to perform palette calculations in gamma-corrected space. Now used by:
* Blend tables generated by the game.
    * The Color Cube accessibility tool.
* Fixed another stupid typo that got in the way of FF_BLENDMASK working.
* Some minor adjustments for code cleanliness.
2021-04-01 19:28:01 +01:00
toaster
cf59809852 Fixed some of the worst of it, but still has inconsistencies with the lookup tables we generated for main.kart - will provide evidence on Discord.
(side note, it's weird as hell that code we inherited from vanilla next - and i checked, it wasn't mangled in the merge - has bugs that straight up prevent it from functioning properly...)
2021-04-01 00:05:05 +01:00
toaster
40cbc30bff Mammoth commit, sorry.
All my work thus far on solving the drawflag/renderflag/additive/subtractive conundrum.

Outstandng problems:
* Bad additive/subtractive tables means that they appear opaque except under certain conditions.
* No support for FOFs, Polyobjects, or linedefs in OpenGL yet.
* All OpenGL support mostly done blind, may or may not function in practice.

If nothing else, the hard engineering problems are solved and it's just bug hammering...
2021-03-31 22:46:23 +01:00
Jaime Ita Passos
316ecff003 [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
toaster
72defa325f * Add a seperate step for I_STARTUPSKINS - "Load characters" - since it takes a similar length to loading all other types of sprites.
* Adjust several loading strings, and left-align their rendering.
* Don't call HU_LoadGraphics() again (startup cached ALL FONTS twice).
* Adjust when some functions are called during loading to more effectively compartmentalise sections of loading that depend on each other.
    * LOADED_ISTARTUPGRAPHICS now comes after SCR_Startup, as we can explicitly guarantee the palette has been loaded after that function.
    * Make sure everything closely related to configurations (gamedata, console stuff, etc) which is not directly dependent on anything else is loaded under LOADED_CONFIG - "Load settings" (formerly LOADED_MINIT).
    * The `-warp` command line parameter is now checked alongside LOADED_DCHECKNETGAME.
* Don't attempt to draw the loading bar before LOADED_ISTARTUPGRAPHICS, as the palette is not loaded, which means you're wasting cycles on a white screen.
2021-03-29 17:02:08 +01:00
toaster
99a764dbc0 Loadbar plus.
* Resolves #145.
* Increased granularity, to seperate out texture loading and sprite loading from other render structure initialisation.
* Shows small loading string in DEVELOP builds, to show where we can optimise loading times when we're polishing.
* Clean up con_refresh/startup, which got split into two variables in the merge by mistake.
2021-03-28 20:16:47 +01:00
Lach
14a2f60b4a 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
Sally Coolatta
885b7673eb Makes it to kart files 2021-03-01 01:02:23 -05:00
Sally Coolatta
4139e67ddb Renderer compile errors 2021-02-28 23:31:56 -05:00
Sally Coolatta
420a6ccccb Fix Dehacked loading 2021-02-28 22:39:47 -05:00
Jaime Ita Passos
95c6139b32 Fix thing scale mismatch in R_DrawVisSprite 2021-02-28 16:23:40 -03: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
toaster
1e23a3b663 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
toaster
36099a900f Fixed papersprites' shadows drifting - notably applies to Minecraft items. 2021-02-19 11:31:25 +00:00
toaster
4052e01f4a Introduce a sequence of macros to reduce the reliance of Colormap-related code (especially but not limited to Encore mode) on magic numbers. 2021-02-16 14:34:00 +00:00
LJ Sonic
85cd429d1d Revert "Replace all instances of P_AproxDistance with FixedHypot"
This reverts commit 498ff708bb.
2021-02-13 17:45:20 +01:00
Sally Coolatta
e250c35489 Remove ground scaling
I dun like it, it makes the gameplay purpose of shadows harder to discern
2021-02-10 20:03:29 -05:00
Sally Coolatta
4c26c4fd81 Shadows use additive/subtractive 2021-02-10 19:23:07 -05:00
LJ Sonic
05a75758ab 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
c7647c7f6c 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
498ff708bb Replace all instances of P_AproxDistance with FixedHypot 2020-12-12 14:53:54 -08:00
James R
e5a15f49bc Merge branch 'plane-sorting-fix-part-2' into 'master'
More consistent fix to plane sorting false positive

See merge request KartKrew/Kart!330
2020-11-29 19:14:03 -05:00
James R
d6ed2f4ac8 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
1a2c2c8471 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
490758eac2 Remove SHORT macros for referencing patch width/height/offsets 2020-11-22 20:02:47 -03:00
James R
d7e32e616d Merge remote-tracking branch 'origin/next' into plane-sorting-fix-part-3 2020-11-22 14:41:42 -08:00
Jaime Ita Passos
6d2742f5fb Some fixes for spritestuff2 2020-11-22 03:47:15 -03:00
Jaime Ita Passos
be274a4fa9 Merge branch 'next' into spritestuff2 2020-11-19 00:52:43 -03:00
Sal
b2eb64ac09 Merge branch 'roll-and-tilt' into 'master'
Roll & pitch replace modeltilt

See merge request KartKrew/Kart!326
2020-11-17 20:03:48 -05:00
Sally Coolatta
da59009ba1 More extreme hitlag vibration 2020-11-10 23:12:17 -05:00
Sally Coolatta
470e399abe Merge master, add support for hitlag jitter in OpenGL 2020-11-08 01:56:27 -05:00
James R
cb7b7763cd Do not factor height into sprite thickseg sorting 2020-11-05 18:45:52 -08:00
James R
fb181a5b38 Remove unused stuff 2020-11-05 18:45:51 -08:00
James R
9bb22d5fce 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
James R
131d592bbf Do not factor height into sprite thickseg sorting 2020-11-05 04:55:01 -08:00
James R
648f1f0958 Revert "Do not sort sprite in front of plane if plane should render in front of sprite's plane"
This reverts commit 0d6f329b1d.
2020-11-05 00:20:14 -08:00
Jaime Passos
928ea1abc9 R_DrawSplatSprite -> R_DrawFloorSprite 2020-11-04 21:43:16 -03:00
James R
0d6f329b1d Do not sort sprite in front of plane if plane should render in front of sprite's plane
Say you have a higher plane in the foreground and a lower one behind. And then
insert a sprite above the plane in the background, the top of which is higher
than the height in the foreground. Should the sprite be drawn in front of the
foreground plane? I think not. Sprites drawing in front of a plane if only part
of them is above the plane is a rendering trick that allows sprites to extend
into the floor. This doesn't make sense if the plane they extend into would be
obscured anyway, or if they don't extend into the plane at all.
2020-11-02 17:54:51 -08:00
James R
263a11e62f Remove unused stuff 2020-11-02 03:37:16 -08:00
James R
9abdb855f9 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-02 03:37:00 -08:00
Sally Coolatta
fed0ed98de Add R_SpriteRotationAngle function
Gets the rotation angle for the mobj's sprite. Meant for pitch & roll later, but that part is if'd out currently and just returns mobj->rollangle
2020-10-30 15:54:58 -04:00
Jaime Passos
d2c000b252 Implement an "ignore colormaps" sprite rendering flag 2020-10-27 19:54:50 -03:00
Jaime Passos
ab3f4960cb Bug fixes 2020-10-27 17:02:35 -03:00
Jaime Passos
cdc4a6d86e Implement blend modes 2020-10-27 00:03:41 -03:00
Sally Coolatta
7c2bd0d1c2 Merge remote-tracking branch 'srb2/next' into the-scary-22-merge 2020-10-24 20:50:58 -04:00
Sally Coolatta
9b6aa946ea Merge remote-tracking branch 'srb2/master' into the-scary-22-merge 2020-10-24 19:28:06 -04:00
Jaime Passos
018b826e1b Rename R_DrawVisSplat to R_DrawSplatSprite, move into r_splats.c 2020-10-19 17:36:29 -03:00
Jaime Passos
b84a7ebd53 Remove FLOORSPLATS define 2020-10-19 17:33:16 -03:00