Commit graph

76 commits

Author SHA1 Message Date
toaster ce2a1aa3b2 Minor optimisations surrounding R_DrawFlippedMaskedColumn.
* Replace the texheight parameter provided directly to it with a previously existing (now renamed) global used for the same purpose, so that it can be used as an interchangeable function pointer with R_DrawMaskedColumn.
* Using the above, optimise R_DrawVisSprite to call a function pointer in a tighter loop rather than check SC_VFLIP each time around.
* SHORT macro can involve repeated operations; calculate once and put in memory for both RANGECHECK and papersprite.
* Remove irrelevant range check (already covered by existing range check immediately above) from R_DrawFlippedMaskedColumn and R_DrawMaskedColumn.
* "Warning: avoiding a crash in %s %d" is a terrible error message, and it chips away at the tightness of the loop just for something most people will never see printed. Replace with a PARANOIA I_Error in case someone actively wants to go hunting for its cause.
2020-03-26 16:09:19 +00:00
Monster Iestyn 1dd4ed4afa Reorganise r_things.h 2020-03-08 21:17:30 +00:00
Monster Iestyn a67dbfff54 Create r_skins.c/.h, to contain skins code formerly in r_things.c/h 2020-03-08 19:32:07 +00:00
James R 7060083db5 Update copyright year to 2020 2020-02-19 14:08:45 -08:00
James R 4238003887 Merge remote-tracking branch 'origin/master' into next 2020-01-30 23:54:56 -08:00
James R 762223db7c Duplicated code is gone, so sad 2020-01-17 20:53:36 -08:00
fickleheart 27bd7e4a7f Merge remote-tracking branch 'upstream/next' into software-dropshadows 2020-01-11 17:09:57 -06:00
Monster Iestyn c7ab065b0a Merge branch 'master' into next 2020-01-11 18:38:09 +00:00
fickleheart fa4b49d52c Refactor shadow floor finding code a bit
I tried to fix ring shadows on polyobjects and got this in return:
https://media.discordapp.net/attachments/629477786943356938/664695818913185822/srb20156.png
2020-01-08 23:19:52 -06:00
fickleheart a7edf51cb9 Stop misusing papersprite vars for sprite skew 2020-01-08 21:52:10 -06:00
fickleheart c46c92d605 Prevent linkdraw sprites from connecting to shadows 2020-01-08 21:37:38 -06:00
fickleheart c0380a3052 Make papersprite projection completely correct in software
I heard properpaper had some weird crashes? I couldn't reproduce
them no matter how hard I tried, but I added some bounds checking
to this version too just in case. Gotta get other people's help
to try to reproduce those.
2020-01-08 21:14:07 -06:00
toaster 0b1108425d Hexafaceted sprite angle support (See merge request description coming soon).
Also, some minor memory efficiency fixes to both rotsprite and ordinary sprite rotations.
2020-01-08 20:49:14 +00:00
Steel Titanium d415cd5c6d
Update copyright date on source files 2019-12-06 13:49:42 -05:00
Jaime Passos e78999549b Hopefully the last time this week I'll ever touch these files 2019-11-06 20:41:55 -03:00
Jaime Passos a22af36305 add r_patch.c 2019-10-28 15:28:42 -03:00
Jaime Passos 7eb5155240 sprite2info soc yummy yummy yes 2019-09-29 19:03:10 -03:00
Jaime Passos c268743220 hehee 2019-09-29 12:13:51 -03:00
Jaime Passos 73e4e67595 JIMITA DO THE SOC 2019-09-28 19:13:51 -03:00
Jaime Passos 5118f8589d Merge remote-tracking branch 'origin/master' into rotsprite_i 2019-09-28 12:14:55 -03:00
toaster ed5e8c486c Continue screen! With aaaaaall the new assets to go with it.
* https://cdn.discordapp.com/attachments/428262628893261828/621129794045870108/srb20077.gif
* https://cdn.discordapp.com/attachments/428262628893261828/621129785124585502/srb20078.gif
* I will be accepting no further questions at this time.
2019-09-11 00:50:51 +01:00
Jaime Passos f68652aa66 I 2019-08-18 14:16:48 -03:00
toaster 063e350c63 A good and bad ending cutscene now exist.
Also:
* SPR2_XTRA - instead of defining lumpnames in S_SKIN, those kinds of assets can just be bundled into the spriteset. Required for ending cutscene stuff, I guess, but also done for HUD life icon and character select image (aside from Sonic&Tails, still SOC'd in).
* Minor oversights in SPR2 support corrected.
* Better evaluation, featuring ending assets.
* Intro has warping-in blackrock, reusing ending assets.
* Cutscene text now supports lowercase (intro and custom).
* Disable the asset-fucking "gamma correction" I put in over two years ago when implementing colour cube. (This is the only thing I could move into another branch if you MUST, but it's basically invisble in the diff so w/e.)
* Don't blank the screen if the top left pixel of a screen-covering patch is transparent. (Checked via nonzero topdelta for first column)

Bugs:
* OPENGL ONLY: The first ~20 frames of both endings are fucked. A little help here? Might be HWR_DrawFadeFill's fault, which I just created. OR it could be in f_finale, but I doubt it, since it doesn't appear in Software.
2019-07-28 00:32:57 +01:00
Nev3r d2692ddd24 viewx/viewy also need to be stored/restored. 2019-06-06 13:31:48 +02:00
Nev3r 1c14062e8b Vissprite clipping improvements.
Vissprites are now only clipped against their respective portal's geometry obtained from their BSP run.
Additionally, if a portal is provided, they're clipped to the portal's clip boundaries.
The work on this branch should conclude after a pair of remaining glitches are fixed.
2019-06-05 18:07:08 +02:00
Nev3r 25b56ffecd Masked elements are now fully grouped individually for each portal/view; fixed viewz-related glitches,.
The drawnodes are now fully grouped in separate lists, and then sorted individually. This fixes sorting problems caused by portals belonging to differently perceived scales (skyboxes for example).

Drawsegs and vissprite/drawnode sorting require the viewz, so the viewz is stored for each portal/view, and then restored when needed; without this, the rendering process erroneously sorts the elements, and draws some at wrong positions.
2019-06-05 12:10:59 +02:00
Nev3r 8abecc7f86 Created drawnode lists for each view/portal.
Each shall eventually have its specific vissprites/drawsegs; currently only drawsegs are stored in their correct list, vissprites are stored in the first list as a placeholder.
The idea is to sort each list individually, and then render their masked elements, starting from the last drawnode list.
This retains a non-recursive function calling method while still rendering things in order.
2019-06-04 20:15:42 +02:00
Monster Iestyn 7a0d8b408e Merge branch 'public_next'
# Conflicts:
#	src/d_main.c
#	src/dehacked.c
#	src/m_menu.c
#	src/m_menu.h
2019-02-27 22:36:01 +00:00
Steel Titanium fad341b0e9 Fix skins overflow 2019-01-15 14:29:43 -05:00
mazmazz 075f28b7c8 WIP 20190101 merge
d_netcmd.c
filesrch.c
m_menu.c
p_setup.c
p_spec.c
r_data.c
r_main.c
r_things.c
w_wad.c
w_wad.h
2019-01-02 01:09:15 -05:00
mazmazz dc7992a815 R_Char2Frame special case for backslash: accept plus as substitute 2018-12-13 14:59:12 -05:00
mazmazz ea7162a76a Update source copyrights to 2018 2018-11-25 07:35:38 -05:00
Monster Iestyn 224c0fccdb Merge branch 'public_next'
# Conflicts:
#	src/Makefile.cfg
#	src/d_clisrv.c
#	src/p_setup.c
#	src/r_segs.c
#	src/r_things.c
2018-11-20 14:33:10 +00:00
Alam Ed Arias 0b5069f36c We need to include the NUL char 2018-11-18 20:21:32 -05:00
toasterbabe 50d6208913 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into FileManagement 2017-10-21 14:28:44 +01:00
Wolfy ec9d47cb34 Use the new sprite system 2017-10-09 14:24:04 -05:00
wolfy852 b298c7a541 Fix p_spec.c and r_things.h, get the compiler to shut up
This compiles with no errors or warnings, but hasn't been tested yet. Please review/test when you can.
2017-10-07 17:18:25 -05:00
toasterbabe 844416855f Smiles follow-mobj initial support! Still using a Lua hook to follow closely behind, but now it doesn't need to be a generic thinkframe. Woo! 2017-10-02 14:08:58 +01:00
toasterbabe f6670fea76 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into new_coop
# Conflicts:
#	src/r_things.h
2017-08-16 19:29:23 +01:00
toasterbabe 06dc30ea54 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into skin_patch
# Conflicts:
#	src/dehacked.c
2017-08-14 21:34:37 +01:00
Nevur 4f8d53b329 Got rid of functions I added once but turned out to be unnecessary. 2017-08-11 15:46:46 +02:00
Nevur 8b64a6eef3 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into FileManagement 2017-08-08 10:41:33 +02:00
toasterbabe e2a9d47ef6 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into new_coop 2017-08-05 12:28:31 +01:00
toasterbabe 634c560e99 * Who wore it better? https://cdn.discordapp.com/attachments/293238104096112641/338696939774279680/srb20037.png
* Now that Cyan is back, swap out the substitute Teal in the emblems for it.
* P_GetMobjSprite2 is now P_GetSkinSprite2.
* Correct "Siler".
2017-07-23 17:49:19 +01:00
toasterbabe 59ea08ee11 * Change the order of operations such that linkdraw sprites aren't ever used for ordering comparisons with non-linkdraw sprites.
* Refactor of the unbundling to not involve modifying the next/prev links.
* Make the booleans in vissprite_t use flags stored in sprite->cut instead.
* Make the linkdrawn sprites much more linked - ie, same brightness (unless independently fullbright), same colormap, and don't draw if the tracer isn't being drawn.
* Other minor corrections.
2017-06-26 14:44:10 +01:00
Nevur 677c1045a1 The sprites stuff is changed now.
-PK3 loadtime drastically reduced, even for very big files.
-Looks for srb2.pk3 now instead.
-"flipped the switch" for sprites.
2017-06-25 23:04:51 +02:00
toasterbabe 93dce12fce Seriously improves the reliability of the linkdraw system (in Software, the only rendering engine which actually does anything with this information), reducing the number of visual errors it produces significantly.
Of particular note: Standing in shallow pools of water as Smiles will now reliably associate the bottom half of the tails following mobj with the underwater portion of Smiles' body, and the flicking ends with his un-submerged head.

Deliberately engineered to only affect objects with MF2_LINKDRAW applied.
2017-06-25 20:46:30 +01:00
Nevur d4c324eb30 PK3 stuff again.
-Now can load map WAD files inside Maps/ directory, but they must only contain map data explicitly!

Known problems:
-There's an issue causing a crash with palettes and colormaps in PK3s.
-SS_START and SS_END don't work now. Will check later.
-Standalone lumps for maps in the Maps/ folder don't work anymore; perhaps I should keep that functionality?

Notes:
-It's now a mashup of something dumb that I wanted to do and yet piling hacks again.
-A lot of code duplicity with map lump loading functions.
2017-05-16 21:10:02 +02:00
Nevur 8ef6d6fd9e A bit more work on PK3.
-Expanded folder recognition for PK3s. Some resources are still not loaded from them yet.
-Took a glimpse at how maps are loaded, since the flat recognition is rooted somewhere there; did nothing yet about it though.
-Working towards "generalizing" how new resources are handled. Some var and functionality redundancy is still present.
2017-05-06 16:52:53 +02:00
toasterbabe 8f9ee2da30 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into skin_patch
# Conflicts:
#	src/dehacked.c
#	src/p_setup.c
#	src/r_things.c
2017-04-07 15:37:22 +01:00