Commit graph

84 commits

Author SHA1 Message Date
Monster Iestyn a71ca1d259 Merge branch 'fof-slope-skew-backport' into 'master'
FOF wall slope skewing backport

See merge request STJr/SRB2!341
2018-11-26 08:54:29 -05:00
mazmazz ea7162a76a Update source copyrights to 2018 2018-11-25 07:35:38 -05:00
Monster Iestyn 0a0336a674 Merge branch 'master' into fof-slope-skew-backport
# Conflicts:
#	src/r_segs.c
2018-11-23 22:40:28 +00:00
Monster Iestyn 948466658f Merge branch 'fof-wall-rendering-fixes-and-cleanup' into 'master'
FOF wall rendering fixes and cleanup

See merge request STJr/SRB2!317
2018-11-20 08:54:09 -05:00
Monster Iestyn 2d1f927a17 Fix the nonsense going on here regarding dc_colormap, this makes FOF walls appear strange if they were for a fog block with colormap adjacent to a normal sector with a colormap and no FOFs.
...that was a mouthful
2018-11-19 22:12:26 +00:00
Monster Iestyn 80cbad61c0 Do lightlist height stepping *after* the heights are used by the FOF rendering code, not before (yes, I caught that they remove a heightstep beforehand for FOFs, but that wasn't done for midtextures it seems?)
Additionally add some macros for repeated slope end assignments and overflow tests
2018-10-13 18:57:40 +01:00
Monster Iestyn bedfed2f00 Move shared code here instead of duplicating it for both dc_numlights and non-dc_numlights rendering code
Also added a few comments, and include the out of range check in the "shared code" above
2018-10-13 15:37:11 +01:00
Monster Iestyn b9b0a8110c Add R_Draw2sMultiPatchTranslucentColumn_8, for columns of multi-patch textures used as midtextures on two-sided linedefs with both transparency AND translucency
...that was a mouthful
2018-10-11 17:05:13 +01:00
Monster Iestyn 40cb22a130 probably best if we did this instead actually 2018-01-08 14:29:47 +00:00
Monster Iestyn 3bc7073918 If NOT skewing FOF walls, make sure dc_texturemid reverts to using unsloped FOF topheight/bottomheight rather than actual left side top/bottom heights 2018-01-08 14:29:39 +00:00
Monster Iestyn a7dc20e7d2 Upper Unpegged on an FOF's control linedef now enables skewing of walls with respect to slopes
Skewing direction is decided per in-level wall by the Lower Unpegged flag on in-level linedefs themselves, since they already decide the stuff for FOF wall pegging as it is. That is unless Transfer Line is involved which moves everything to the control sector linedefs instead...
2018-01-08 14:29:30 +00:00
Monster Iestyn 72bd3e28ed Fix sprtopscreen from getting integer overflows once and for all in R_DrawRepeatMaskedColumn
Fixes TD's terminal from freezing the game this time, oh boy
2017-01-31 22:10:31 +00:00
Monster Iestyn 3212ee0b0f Fix endless loop of R_DrawRepeatMaskedColumn if both sprtopscreen and sprbotscreen are CLAMPMAX (INT32_MAX)
This fixes the grid floors in TD's Lava Mountain freezing the game if they go off the bottom of the screen far enough (they have ACWRFL1A as the wall texture, which is a single patch texture with holes)
2017-01-30 21:08:13 +00:00
Monster Iestyn 6ca806a8c0 Fix FOF lighting being stupid with repeating midtextures. 2016-12-31 20:44:16 +00:00
Monster Iestyn 8e56582728 Created R_CheckTextureCache to make sure midtexture/FOF walls cache their textures before choosing colfunc_2s, for software mode 2016-12-17 19:59:54 +00:00
Monster Iestyn a9cfd12e04 Created R_GetTextureNum to make sure top/bottom/midtexture texture ids are always valid in rendering code for both software and OpenGL (and also for the Solid Midtexture effect physics code) 2016-12-16 21:38:53 +00:00
Monster Iestyn 6ba568ac49 Fixed typo of mine that lead to the ceiling part of GFZ2's tunnel section being rendered wrongly 2016-07-20 15:11:36 +01:00
Monster Iestyn df55019d40 Merge branch 'master' into other-software-fixes 2016-06-13 21:13:51 +01:00
Monster Iestyn 305d32870f Effect 2 (No Midtexture Skew) now toggles off skewing for midtextures on single-sided lines, which was what was intended for them to begin with apparently.
This means the current skewing-by-default effect isn't changed, and OpenGL's equivalent code doesn't have to be touched since apparently it was already like that.
2016-06-12 18:47:27 +01:00
Monster Iestyn a04fcce3a9 Hack to fix midtextures for polyobjects being mucked up
"frontsector" in this part of the code isn't actually the polyobject's sector for back-side polyobject segs, it's the in-level sector the polyobject as a whole is being rendered in it turns out.
2016-06-09 22:07:43 +01:00
Monster Iestyn 20c2d84c78 Fix single side line midtexture skewing
Red apparently left in code for single-sided linedefs to NOT skew their midtextures ...but it doesn't work because it doesn't stop the skewing code from running instead, regardless of whether Effect 1 is on or not. If it's decided single-sided line midtextures shouldn't do this though, the non-skew code could just as well be thrown out lol (or something else I guess?)
2016-06-09 20:37:36 +01:00
Monster Iestyn 8b2b49fb04 Just some final cleanup of the code I changed 2016-05-31 16:08:29 +01:00
Monster Iestyn eb90f4f50d welp no success in fixing the sky HOMs yet, committing progress anyway 2016-05-30 22:53:22 +01:00
Monster Iestyn a2aeece419 Significant rework of main seg-rendering code, to eliminate the possibility of drawing off-screen and crashing the game as result
NOTE: HOMs sometimes appear in the sky in maps like AGZ (map40), so this isn't completely fine yet. I'll fix that later
2016-05-30 21:53:29 +01:00
Monster Iestyn 7c78b95a7d This is probably the "correct" way to set maskedtextureheight
Probably doesn't make any difference in-game at all though, lol
2016-05-24 22:11:48 +01:00
Inuyasha f07585191b copyright dates/statements updated and such
(no actual SLOC changes)
2016-05-17 17:42:11 -07:00
Monster Iestyn 857cd32369 step through light heights too if there is an overflow for a midtexture column 2016-05-05 17:49:57 +01:00
Inuyasha ce4b5db494 organize conditions in a more optimized way
the most common condition (correct drawing) shouldn't be last, however it can't be first without making the conditions longer anyway.

it's a nitpicky thing, but this is the renderer we're talking about here.
2016-05-05 07:20:53 -07:00
Inuyasha 5e8be250a7 fix going under FOFs causing artifacts
i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs i hate FOFs
2016-05-05 06:33:19 -07:00
Inuyasha 4274fb7b92 I hate FOFs; attempted to fix extra tall FOFs breaking
Previous overflow fix resulted in extra tall FOFs disappearing up close (see: ERZ1's elevators at start)
This works "better" in that only some lighting bugs and really really finicky visual glitches show now. I give up trying to totally fix this stuff dfsdfgdgf
2016-05-05 02:31:53 -07:00
Monster Iestyn 2c221da453 Revert "Fix up the ceiling sky hack (yuck) a bit so my commit doesn't break thok barrier planes now"
This created HOMs in THZ2's skybox, ack.

This reverts commit eba382df1b.
2016-05-03 15:26:54 +01:00
Monster Iestyn eba382df1b Fix up the ceiling sky hack (yuck) a bit so my commit doesn't break thok barrier planes now
Interestingly these changes somehow fix how thok barrier walls block the planes, which was an issue even before slopes I believe
2016-05-02 22:08:14 +01:00
Inuyasha 7c79bbc0b3 Proper overflow checking, applied to FOFs and midtex's too
This fixes the annoying flickering when you pass by water, FOFs, tall grass, etc.
2016-05-02 05:29:30 -07:00
Inuyasha 37575d2219 Revert "Another thing that probably needed to check for slopes"
This breaks plane display for thok barriers

This reverts commit ee00da6a74.
2016-05-02 04:08:48 -07:00
Monster Iestyn 0a887948eb Ensure pixhigh/pixlow is always set whenever the game decides a top/bottom texture should be drawn
This fixes the rendering glitches encountered around slopes in Glacier Gear, yes. :)
2016-04-25 18:48:14 +01:00
Monster Iestyn ab2cadd372 Merge branch 'next' into slope-fixes 2016-04-20 20:47:11 +01:00
Monster Iestyn e0604bb5f3 Merge branch 'master' into next 2016-04-20 20:27:09 +01:00
Monster Iestyn 69b43aee2d Fix how FF_CUTEXTRA FOFs carry over cutting ability to FOFs below them in the same sector, even if they shouldn't do that 2016-04-20 20:26:41 +01:00
Monster Iestyn e05951e213 Merge branch 'next' into slope-fixes 2016-04-20 18:17:14 +01:00
Monster Iestyn b797ae9731 Merge branch 'master' into next 2016-04-20 18:05:51 +01:00
Monster Iestyn 0aba2f607b Fix FOFs with FF_CUTSOLIDS but not FF_SOLID causing software renderer problems and even crashes
Always wondered why a flag meant for FOF physics was used in the rendering code, lol
2016-04-20 18:04:51 +01:00
Monster Iestyn b1e736242f fixed all compiling errors relating to ESLOPE being undefined 2016-04-06 22:19:39 +01:00
Monster Iestyn 93a1e46f1c Merge branch 'next' into slope-fixes 2016-04-05 17:19:28 +01:00
Monster Iestyn 69a58d8369 Fix lighting parity between resolutions for sprites and FOFs 2016-04-05 15:33:55 +01:00
Alam Ed Arias b45b9801d6 Merge branch 'next' into slope-fixes 2016-03-31 21:43:51 -04:00
Alam Ed Arias f84d76c683 Merge branch 'next' into portal-fix 2016-03-30 20:43:25 -04:00
Alam Ed Arias 4370459166 Merge branch 'next' into slope-fixes 2016-03-30 20:41:33 -04:00
Monster Iestyn 1108a52959 Check change in ceilinglightsec for markceiling code, not floorlightsec 2016-03-29 22:44:16 +01:00
Monster Iestyn ee00da6a74 Another thing that probably needed to check for slopes 2016-03-29 22:32:09 +01:00
Monster Iestyn ef832dd8b8 Fixed how two adjacent FOFs can prevent each others' walls from displaying if they're at least partially covered
Also some miscellaneous tweaks and changes to account for slopes properly
2016-03-29 18:59:56 +01:00