Commit graph

517 commits

Author SHA1 Message Date
Hannu Hanhi
7e8543a408 More render stats for software mode, renamed and relocated some render stats variables 2020-05-02 23:13:53 +03:00
Monster Iestyn
1528f2aef8 Fix drop shadow and rotsprite code to use SHORT() 2020-05-02 17:13:16 +01:00
MascaraSnake
485a4e5035 Remove POLYOBJECTS and POLYOBJECTS_PLANES defines 2020-05-02 12:08:31 +02:00
Monster Iestyn
a71fe6445a Merge branch 'master' into next 2020-04-23 18:49:53 +01:00
James R
4e7283c833 Merge branch 'pk3-directory-start' into 'next'
Don't skip the first directory entry of PK3 if it's a file

See merge request STJr/SRB2!764
2020-04-09 19:49:44 -04:00
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
Louis-Antoine
6f9422d380 Encapsulate plane height checks 2020-03-22 17:28:50 +01:00
Louis-Antoine
892a8dd6e7 Make SRB2 flat like Earth 2020-03-20 18:55:29 +01:00
Monster Iestyn
e81ef824d6 Set the "spritename" variable within R_AddSingleSpriteDef rather than externally to it, since R_InstallSpriteLump is the only place it gets used anyway
This way we don't have to make it some extern in order for r_skins.c to use it
2020-03-08 19:51:18 +00:00
Monster Iestyn
b2d9697e07 remove r_skins.c include in r_things.c, on second thoughts 2020-03-08 19:36:56 +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
Jaime Passos
26e367eb9b Merge remote-tracking branch 'origin/next' into pictureformats 2020-03-07 20:43:16 -03:00
Steel Titanium
76f26cda24 Merge branch 'master' into next 2020-02-21 21:01:29 -05:00
James R
7060083db5 Update copyright year to 2020 2020-02-19 14:08:45 -08:00
Jaime Passos
2893803c68 Merge remote-tracking branch 'origin/next' into pictureformats 2020-02-19 02:25:36 -03:00
James R
d0b9027d0a Merge branch 'viewroll' into 'next'
Rolling

See merge request STJr/SRB2!690
2020-02-17 00:10:57 -05:00
fickleheart
c4b390bc76 Merge remote-tracking branch 'upstream/master' into viewroll 2020-02-16 21:32:57 -06:00
MascaraSnake
512c6f24a9 Clean up the mess that is extracolormap_t::fog 2020-02-16 20:19:24 +01:00
James R
841094976b Add flag name variant of SF_NONIGHTSROTATION to S_SKIN 2020-02-12 18:02:36 -08:00
James R
0a53f91820 Don't skip the first directory entry of PK3 if it's a file
Also puts the marker skipping in the WAD API.
2020-02-07 19:41:45 -08:00
James R
4238003887 Merge remote-tracking branch 'origin/master' into next 2020-01-30 23:54:56 -08:00
Jaime Passos
f4a976f3be Merge remote-tracking branch 'origin/next' into pictureformats 2020-01-20 16:53:41 -03:00
fickleheart
8868fc4d8a Fix lighting discrepancies between different FOVs 2020-01-18 00:16:18 -06:00
fickleheart
1d221a453a Avoid rendering unused left/right edges of screen while rolling 2020-01-17 23:21:11 -06:00
James R
94a2f0bb4f Don't draw Tails' tails in first person (MF2_LINKDRAW) 2020-01-17 20:56:32 -08:00
James R
762223db7c Duplicated code is gone, so sad 2020-01-17 20:53:36 -08:00
fickleheart
f59ed6b2f4 DOUBLE DAMNIT 2020-01-17 00:34:57 -06:00
fickleheart
d39d8506ca Let nerds turn off shadows 2020-01-17 00:20:10 -06:00
fickleheart
9a4ad20947 DAMNIT 2020-01-17 00:13:13 -06:00
fickleheart
f0843cba13 Let vissprites have shadows too
fuck it, hopefully it works
2020-01-17 00:13:05 -06:00
James R
542e38e717 Don't draw player mobj in first person
This solves that annoying albeit slightly amusing bug
where your sprite clips into your view during a quake.

For OpenGL, this also solves the player's model
rendering while in first person. So you'll no
longer be looking through Sonic's body!
2020-01-16 03:18:05 -08:00
fickleheart
9e101fc2bb Limit shadow Y scale to prevent graphical bugs 2020-01-12 09:10:09 -06:00
fickleheart
ba8ff3d502 Add mobj shadowscale property 2020-01-11 18:24:08 -06:00
fickleheart
1b0a3d0fe3 Use dedicated shadow graphic 2020-01-11 17:56:49 -06: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
James R
dc151fc7a4 Merge branch 'accurate-papersprites' into 'master'
Accurate papersprite projection

See merge request STJr/SRB2!657
2020-01-10 16:02:23 -05:00
Jaime Passos
c1acdfe52e Merge remote-tracking branch 'origin/next' into pictureformats 2020-01-10 04:11:26 -03:00
fickleheart
7d2402ac62 Fix shadows under hiresscale characters 2020-01-08 23:33:43 -06:00
fickleheart
9e8d20504e Refactor shadow scale into an argument 2020-01-08 23:24:31 -06: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
ef4974ab4d Apply portal clipping to drop shadows too 2020-01-08 21:37:44 -06:00
fickleheart
8757194d73 Make ring shadows smaller and fix scale bug 2020-01-08 21:37:43 -06:00
fickleheart
c078ab630d Fix more shadow crashes and save my sanity 2020-01-08 21:37:41 -06:00
fickleheart
9c49e020c3 FUCK IT, SLOPED SHADOWS NOW 2020-01-08 21:37:40 -06:00
fickleheart
5929b4797e This acursed crash-inducing typo spat in my face and called me a bitch 2020-01-08 21:37:39 -06:00
fickleheart
c46c92d605 Prevent linkdraw sprites from connecting to shadows 2020-01-08 21:37:38 -06:00
fickleheart
48c1ce3ac3 Add render-based drop shadows to some objects
Uses a hardcoded list for now. I was experiencing some
crashes with this, but the shadowyscale check seems to
have suppressed them.
2020-01-08 21:37:36 -06:00
fickleheart
ccc473917e Check for papersprites per-sprite instead of per-row
In theory, should be a performance improvement. In practice idk
2020-01-08 21:14:11 -06:00
fickleheart
1790891fd8 Reduce disappearance of vissprites close to the camera 2020-01-08 21:14:09 -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
d89050f073 Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2.git into public_hexang
# Conflicts:
#	src/r_defs.h
2020-01-08 21:47:47 +00:00
James R
7deb18bdc9 Merge remote-tracking branch 'origin/master' into next 2020-01-08 13:27:14 -08: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
Jaime Passos
b8625d9efb AA trees are not needed at all for rotated patches 2020-01-07 16:10:38 -03:00
Jaime Passos
5a2ad5c2f3 Merge remote-tracking branch 'origin/next' into pictureformats 2020-01-07 16:10:25 -03:00
Jaime Passos
edb0bbcd6d Cleanup, NOW 2020-01-06 20:16:48 -03:00
Jaime Passos
a1af6b9134 Picture formats test 2020-01-06 18:22:23 -03:00
Jaime Passos
03245b28fd Merge remote-tracking branch 'origin/master' into more-opengl-fixes 2020-01-05 22:04:51 -03:00
Jaime Passos
6d754821fb AA trees are not needed at all for rotated patches 2020-01-05 03:10:03 -03:00
Alam Ed Arias
a26c5f5428 Merge branch 'master' into next 2020-01-03 14:56:37 -05:00
Louis-Antoine
b45ee059e3 Fix major issue 2020-01-03 02:58:23 +01:00
Jaime Passos
c7794d4ce0 Remove unused parameter 2020-01-01 17:36:55 -03:00
James R
939814d479 Merge remote-tracking branch 'origin/master' into next 2019-12-30 22:37:24 -08:00
James R
36c5bb7b0d Fix NOHW compiling 2019-12-30 20:18:08 -08:00
James R
fc8c0f8a9a Merge remote-tracking branch 'origin/master' into next 2019-12-30 13:16:53 -08:00
James R
152a63b682 Merge branch 'rotsprite3' into 'next'
More rollangle changes

See merge request STJr/SRB2!582
2019-12-27 16:49:21 -05:00
James R
69ad41e58e Merge branch 'skinusable-fix' into 'next'
Fix edge case with R_SkinUsable

See merge request STJr/SRB2!573
2019-12-27 16:49:06 -05:00
Jaime Passos
5ea43aa023 Fix sprite rotation crashes. 2019-12-27 00:37:40 -03:00
Jaime Passos
56fd29a42a stuff 2019-12-26 21:27:30 -03:00
Steel Titanium
f0ef4e3193 Fix edge case with R_SkinUsable 2019-12-24 18:31:47 -05:00
Jaime Passos
6779c508e7 Satisfy rollangle table with a 3deg angle 2019-12-23 12:19:05 -03:00
Jaime Passos
fa58c1fb26 stuff 2019-12-13 12:26:47 -03:00
toaster
0bd1399c52 Revert paperprojection, but keep it as a #define in case someone fixes it in a patch. 2019-12-07 10:22:10 +00:00
Steel Titanium
d415cd5c6d
Update copyright date on source files 2019-12-06 13:49:42 -05:00
toaster
7c7f258c2d Another potential papersprite crash fix, but way more confident about this one. 2019-12-05 09:28:28 +00:00
MascaraSnake
e6f1b82cc4 Merge branch 'minusoneframes' into 'master'
Minus One Frames

See merge request STJr/SRB2Internal!593
2019-12-04 17:15:51 -05:00
toaster
e75490c99d Semi-hacky fix to R_AddSpriteDefs printing Added -1 frames in 0 sprites: if the start marker is equal to or beyond the end marker, none of r_things' for (l = startlump; l < endlump; l++) loops will run, so just assume no sprites.
Simply put, `W_CheckNumForFolderStartPK3` and its `End` equivalent will never return INT16_MAX for nonexistence, and I don't want to break any assumptions elsewhere by modifying those functions directly, so this is the simplest possible fix.
2019-12-03 21:05:05 +00:00
toaster
f21ebaea0c Nail a likely culprit in papersprite rendering for #427 and #375. 2019-12-01 13:21:41 +00:00
toaster
3594623891 Courteousy of fickle, an adjustment to papersprite rendering that prevents the object's x1 and x2 being slightly off where they should be. Not perfect, but absolutely better than it was!
Also, tweak the Minecart segment spawning position, since this was originally placed based on the awkward rendering.
2019-11-24 16:42:13 +00:00
toaster
66001cc73c Resolve #288.
* Fix off-by-one error I caused in the skin randomisation selection.
* Clean up signcolour set to never go outside of valid entry range.
* Fix the preventing-console-spam mechanism for invalid sprites viewed in-game by only setting the state's sprite/frame to S_UNKNOWN's if the object's sprite/frame is currenly equal to the state's.
2019-11-15 12:47:21 +00:00
MascaraSnake
8f6890025c Merge branch 'secretstuff' into 'master'
The letter

See merge request STJr/SRB2Internal!438
2019-11-14 17:49:23 -05:00
toaster
278ddcf770 Merge branch 'rotsprite_i' of https://git.magicalgirl.moe/STJr/SRB2Internal.git into rotsprite_toast 2019-11-14 17:15:34 +00:00
Jaime Passos
8506d420a6 Optimise 2019-11-14 14:12:36 -03:00
toaster
afe28b0a0a * Remove the 22(!!) NiGHTS sprite2s that no longer get used in ROTSPRITE builds (which should be our main builds going forward).
* Rename `SPR2_NGT0` to `SPR2_NFLY`, and `SPR2_DRL0` to `SPR2_NDRL` to account for this. (requires modifying player.dta)
2019-11-14 17:03:02 +00:00
Jaime Passos
4292c5fc0b Other things I missed. Also added SF_NONIGHTSROTATION. Do I even have to keep the old behaviour? I have no idea. 2019-11-14 12:27:22 -03:00
Jaime Passos
b54f6181c3 Rotation axis (will rename internally later) 2019-11-13 12:36:44 -03:00
Jaime Passos
245881ec55 Merge remote-tracking branch 'origin/master' into rotsprite_i 2019-11-12 21:38:02 -03:00
toaster
5729ba3cd2 Merge branch 'master' of https://git.magicalgirl.moe/STJr/SRB2Internal.git into metalrecording
# Conflicts:
#	src/p_user.c
2019-11-12 21:56:46 +00:00
MascaraSnake
66123b8165 Merge branch 'internal-md3-vanilla-c' into 'master'
Internal MD3 merge 2 good riddance glBegin

See merge request STJr/SRB2Internal!362
2019-11-12 15:44:20 -05:00
MascaraSnake
6b567bfb5c Merge branch 'dashmodecut' into 'master'
Dashmode polish

Closes #266

See merge request STJr/SRB2Internal!418
2019-11-12 15:40:46 -05:00
Jaime Passos
91a01be891 Merge remote-tracking branch 'origin/master' into rotsprite_i 2019-11-11 14:41:55 -03:00
James R
6ac613b2ca Move this "skin wads" check so that PK3 can work with it 2019-11-07 18:27:06 -08: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
4ff769704a function renaming 2019-11-05 10:28:19 -03:00
toaster
915e50a1e4 Merge branch 'master' of https://git.magicalgirl.moe/STJr/SRB2Internal.git into internal-md3-vanilla-c
Merge seems fine, but won't compile for some reason.
2019-11-02 18:34:12 +00:00
toaster
417f17ebdd Do a bunch of stuff to the MD2/3 sprite2 support to get it back to feature parity with before, without going back to being hacky as fuck.
* Store the number of frames per sprite2 run in the spr2frames struct.
* Reintroduce P_GetModelSprite2, to allow for the sprite2 defaulting system to be used to full advantage even in GL.
* Instead of splitting the SUPER and normal SPR2 stuff within the same cell of the struct, have them exist in different cells just like in the "normal" sprite2 structs.
* Allow for just providing spr2 frames in order without specifying which "normal" sprite2 frame it's supposed to replace.

Also:
* Fix FF_VERTICALFLIP-ignoring regression.
* Fix whitespace adjustment in win_dll.c
* Remove bracket in P_GetSkinSprite2 because I realised it was extraneous while making sure P_GetModelSprite2 worked with it.
2019-11-02 17:52:54 +00:00
toaster
67f5b2245f Secret stuff. (I intend to keep candid discussion of this outside of any commits; you'll see me write up a comment describing what's going on here soon.) 2019-11-01 15:48:50 +00:00
toaster
67a99f6334 ACTUALLY applied colorized flashing for dashmode to non-SF_MACHINE players, which wasn't happening for non-transparent players because :VVV 2019-10-30 17:16:44 +00:00
toaster
1906709cf2 * Improve the Metal Sonic recording/playback system.
* Make the skin to record with Metal rather than Flesh Sonic. (Allowed even if not unlocked!)
    * Make the object that plays back the recording actually use the Metal skin, rather than just a seperate spriteset. (The boss will still need the spriteset, though.)
    * Actively record the player's sprite2, frame, and followmobj, just like regular ghosts do.
    * Disable dashmode while recording, for a fairer race.
    * Fix a probably long-standing bug where, while recording, being "hurt" would get Metal stuck in pain frames until they physically left the area of hurt.
    * Always start Metal recording in wait frames for bonus taunting.

Other relevant changes:
* Increment DEMOVERSION *again*.
* Improve the Record Attack ghost followmobj recording to accomodate Metal's jet.
* Increase the datatype width of spritenum_t read/write for Record Attack ghosts because SUGOI 4: Back With A Revengance will probably also use more than 255 sprites alone.
* Return to standing frames (or prolong them if you're in them, rather than going to wait frames) if the player rotates on the spot with enough force.
    * This was specifically done *for* Metal recording, but I decided it looked good enough to enable all the time.
2019-10-28 22:12:47 +00:00
Jaime Passos
a22af36305 add r_patch.c 2019-10-28 15:28:42 -03:00
Jaime Passos
79e99dc471 Merge remote-tracking branch 'origin/master' into rotsprite_i 2019-10-28 14:29:10 -03:00
toaster
9e8733be42 Make player flash colorized when dashmode if not SF_MACHINE, per Sonic Advance 2. 2019-10-27 13:07:06 +00:00
lachwright
7be046e16c Fix compile warnings 2019-10-23 13:46:30 +08:00
lachwright
6d498fe357 Allow machine skins to damage objects in dashmode 2019-10-23 13:41:32 +08:00
lachwright
441aceb116 Add new dashmode colormap 2019-10-21 04:37:56 +08:00
MascaraSnake
01fbb91f7e Merge branch 'bogus_requestskin' into 'master'
Fix bogus "requested skin not found!" print

Closes #247

See merge request STJr/SRB2Internal!373
2019-10-13 11:07:59 -04:00
toaster
e62d097265 Fix "requested skin not found!" print happening whenever you select an unlockable character.
Also, since I'm less paranoid now - readd the skin number to its print.
2019-10-13 15:10:19 +01:00
toaster
a550eb79d3 Additional crash fix for papersprites. 2019-10-13 11:53:53 +01:00
MascaraSnake
68599ccc63 Only apply NiGHTS draw distance to hoops, because it turns out they're pretty much the sole cause of NiGHTS lag 2019-10-11 21:02:11 +02:00
Jaime Passos
d67804cb9c png fix yes so cool 2019-09-29 19:10:49 -03:00
Jaime Passos
7eb5155240 sprite2info soc yummy yummy yes 2019-09-29 19:03:10 -03:00
Jaime Passos
318fde6ae7 Giant mistake 2019-09-29 14:12:53 -03:00
Jaime Passos
4a0848acd7 I want to be able to stack skins in a sprite2 block 2019-09-29 12:41:15 -03:00
Jaime Passos
82be346091 change comment and error message 2019-09-29 12:16:38 -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
b74cfca3e2 JIMITA DO TH EROTSPRITE 2019-09-28 17:56:27 -03:00
Jaime Passos
8aefc03409 quick maths 2019-09-28 13:40:40 -03:00
Jaime Passos
6574e1a7d3 memory management 2019-09-28 12:50:07 -03:00
Jaime Passos
5118f8589d Merge remote-tracking branch 'origin/master' into rotsprite_i 2019-09-28 12:14:55 -03:00
Alam Arias
530b5784b8 platersprite_t is not the same as unsigned 2019-09-19 21:42:59 -04:00
Nev3r
777e7f8760 Merge branch 'deathstuff' into 'master'
Lots of death stuff

Closes #207

See merge request STJr/SRB2Internal!306
2019-09-16 16:32:45 -04:00
toaster
9006bdd6a3 I_Error if no frames are found for a loaded skin's SPR2_STND subspriteset, given this is what everything will default to if nothing else is provided, and I really don't wanna go across the code adding checks for sprite2s not existing (since R_GetSkinSprite2, under all circumstances other than this one, is capable of bouncing back). 2019-09-12 12:52:25 +01:00
Jaime Passos
aa91627ba2 Allow PNG graphics to be used as patches
Also allows them to be used as sprites.
2019-09-11 16:59:28 -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
Alam Ed Arias
a6fe6ebcd3 Fix signed vs unsigned comapre 2019-08-07 12:41:22 -04:00
toaster
a87e1b8aa6 Fix inadvertent fallthrough and associated whitespace. 2019-08-04 10:27:36 +01:00
mazmazz
5b284c8170 gcc7 compile fixes (Fall through; spr2 var comparison) 2019-08-03 23:01:10 -04:00
toaster
8a0f1e7ed4 Merge branch 'ending' into 'master'
ENDINGS

See merge request STJr/SRB2Internal!264
2019-08-03 16:23:51 -04:00
Alam Ed Arias
b77780e1e7 Fix building with MSVC 2019-07-29 19:02:45 -04: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
Steel Titanium
848061d517
Fix compiling on Linux 2019-07-09 15:42:14 -04:00
toaster
4ad1703ae3 Revert "Revert "Merge branch 'metalfixes' into 'toast_cleanup'""
This reverts commit c04b560e92.
2019-07-03 00:58:02 +01:00
MascaraSnake
c04b560e92 Revert "Merge branch 'metalfixes' into 'toast_cleanup'"
This reverts merge request !239
2019-07-02 23:49:10 +00:00
toaster
faebe0f9af Metal Sonic fixes!
* Add more context clues to his fight, including an indicator for which laser attack is being used after chargeup.
* Make missiles able to vectorise him.
* Add another laser orb attack - vertical slice - and change the laser orb sequence to accurately reflect that horizontal is the hardest of the ones in 2.1.
* Optimise TC_BLINK, and fix an issue with TC_ALLWHITE that somehow avoided coming up in testing.
* Fix colorized bosses losing their colorization when flashing, by forcing TC_ALLWHITE.
2019-06-28 20:48:14 +01:00
toaster
8f6973cb51 Now it's CA_TWINSPIN's turn to get the improvements!
* Remove PF_THOKKED every time a successful damage bounce occours.
* When this happens, spawn a number of particles based on thokitem at half scale! (Optimised, again, for MT_LHRT.)
* Also spawn these particles when a successful spring boost occours, as well as playing a twisted spring sound.

Also, some other related tweaks:

* Optimisations to A_VultureBlast, which was used as a base for the particle creation.
* Make the Metal Sonic boss use P_PlayerCanDamage instead of a custom, somewhat broken player damage detection mechanism.
* P_SpawnGhostMobj takes colorized into account.
* Fold Tails propeller damage into P_PlayerCanDamage.
* When performing an Attraction Blast, place the player in roll frames.
* Update all conditions preventing SH_PINK to incorporate thokitem and spinitem as well.
* Buff MT_LHRT travel distance at slow speeds.
2019-06-26 23:26:05 +01:00
toaster
50e4a65f99 Correct some more oversights of switching to revitem for CA2_MELEE's particles. 2019-06-21 12:51:55 +01:00
toaster
2e6898f29e PITY IN PINK!
* Smoothen Pity Shield animation to go with sphere's updates to Nev3r's sprites.
* Added LHRT object, designed to be summoned with CA2_MELEE.
    * Gives a pink Pity Shield (SH_PINK) on same-team player contact.
    * Deals damage to non-player enemies.
    * Harmlessly fades into nothing when touching an enemy player, players with SH_PINK already, and players capable of applying SH_PINK to others (through non-Lua methods).
* Basically, you-know-who is the Healer of the party whenever they're around. Fun consequences for the Co-op and CTF metas.
2019-06-19 23:20:24 +01:00
toaster
1d65caa250 With permission from Kart Krew (Sal and Sryder specifically - they don't know WHY vanilla's using it):
* Port across the additional colour translation maps, including mobj-level support for "colorized" objects.
* Make Fangboss and both Metal Sonic objects greyscale if, on spawn, there is a player in the game who is not a spectator whose skin is that character.
* Allow bosses with MF_GRENADEBOUNCE to opt out of the MF2_FRET colour-flashing tomfoolery, and give this flag to Fang.
2019-06-18 17:55:57 +01:00
toaster
861d0d0b0a Improve rain/weather.
* Like Kart, remove cv_precipdensity.
* Like Kart, replace "Infinite" draw distance value with "None".
* Better thinker with more return optimisation.
* Better placement of thinking in rendering, to avoid ceiling-mounted sprite glitches.
2019-06-18 14:22:10 +01:00
Nev3r
c014235ad3 Fix 1 extra column rendering on portal-clipped vissprites. 2019-06-10 17:59:12 +02: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
Nev3r
2aabf6ffd5 Moving away more portal-related global vars to r_portal. 2019-06-03 13:33:12 +02:00
Nev3r
df0a40b3c2 Code refactoring to turn portal struct into a more generalized shape.
Split portal-related code to its own source files.
Most of the 2-line-specific setup has been moved to the function which adds a 2-line case. The portals should render as they used to so far, anyway.
2019-06-01 13:07:23 +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
d5de5e9f49 Fix player.dta SIGNA0 overwriting regular end sign frame 2019-01-08 00:19:42 -05:00
Nev3r
7d09149b04 Solved conflicts related to PK3s
Signed-off-by: Nev3r <apophycens@gmail.com>
2019-01-07 19:00:31 +01:00
mazmazz
015e7b9862 Resolve p_setup and d_netcmd conflicts (20190101 public merge) 2019-01-07 03:07:24 -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
MPC
9c2197db17 Software plane fixes 2018-12-14 14:08:25 -03:00
Monster Iestyn
33c1ac33f5 Merge branch 'next' into 21-version
# Conflicts:
#	src/d_netcmd.c
2018-12-02 15:45:07 +00:00
Wolfy
b8ce51bff2 Multiple admins
# Conflicts:
#	src/d_netcmd.c
#	src/d_netcmd.h
2018-11-29 06:46:59 -06:00
MonsterIestyn
b53cd70201
Merge branch 'next' into PK3-BackportNext 2018-11-26 18:56:51 +00:00
mazmazz
ea7162a76a Update source copyrights to 2018 2018-11-25 07:35:38 -05:00
Nev3r
c548aaa347 Backported PK3 support to 2.1
Hopefully I'm not missing anything.

Signed-off-by: Nev3r <apophycens@gmail.com>
2018-11-23 16:58:16 +01: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
fb08950c19 Fix stringop-truncation: ‘strncpy’ output truncated before terminating nul copying 8 bytes from a string of the same length 2018-11-14 16:32:57 -05:00
Monster Iestyn
291ebf302c Merge branch 'public_next'
# Conflicts:
#	src/Makefile
#	src/lua_script.c
#	src/p_user.c
#	src/sdl/i_system.c
#	src/v_video.c
#	src/w_wad.c
2018-10-10 14:51:34 +01:00
toaster
b1e02467bf Weather is already run client-side. What if we ran it render-side, for major performance gains? This commit will answer all your questions - and more! 2018-10-07 15:00:58 +01:00
mazmazz
7d36aae7c4 Make lightlists react to control sector colormap changes (double pointer) 2018-09-12 16:06:56 -04:00
Monster Iestyn
58a844d3cf Merge branch 'public_next'
# Conflicts:
#	src/r_things.c
#	src/v_video.c
2018-08-28 19:31:08 +01:00
toaster
973b3c3f5e Continuing my recent streak of making random lighting/colormap-related fixes to long-standing bugs:
* Fix that thing where ALL transparent FOF planes were continuously fullbright unless encased in a fog which disables sprite fullbrightness, which was long-hated by many people in the community!
	* For backwards compatibility, setting flag 1 in that fog field (which is probably the most common "in-the-wild" usage of this feature) will continue to make objects un-fullbright.
	* For situations where you desperately want the behaviour to be enabled, you can apply fog flag 2.
* Change the fadestart and fadeend range in which colormaps are generated.
	* The problem HERE was that the darkest light level reached by generated colormaps was actually slightly brighter than the darkest level reached by normal colormaps.
	* The typo I fixed does have SOME basis in fact - standard colormap lumps are 34 (33 in 0-indexing) long rather than 32 (31), but whoever wrote this didn't realise that the code for generating them didn't do it DooM style, just bright-to-dark with no extras on the end...
2018-08-25 16:46:45 +01:00
toaster
6e07631cc9 MONSTER COMMIT.
OLD SPECIAL STAGES:
* Spheres in old special stages instead of rings!
* Individual timers in old special stages instead of a global one!
* Old special stages use a variant of the NiGHTS HUD now!
* Special stage damage in old special stages loses 5 seconds of time instead of 10 rings/spheres!
* All damage gained through old special stages is converted to special stage damage! As a consequence, the special spikeball has no need to be special anymore.
* Made emerald gaining function be based on special stage number rather than gained emeralds!
* Consistency with...

NiGHTS SPECIAL STAGES:
* Spheres now flash in bonus time. https://cdn.discordapp.com/attachments/400761370800422922/452590553100713984/srb20032.gif
* Sphere and ring mapthingnums are now less fucked up in 'em. (Rings are 300, same as usual, while Spheres are now 1706 replacing NiGHTS Wings.)

SPECIAL STAGES IN GENERAL:
* useNightsSS is now dead. Each individual special stage is now assessed for NiGHTS-mode behaviour based on maptol & TOL_NIGHTS.
* CRAWLA HONCHO\n CAN NOW BE\n SUPER CRAWLA HONCHO end tally modification now also includes a mini-tutorial on turning super. https://cdn.discordapp.com/attachments/400761370800422922/452844894113759233/srb20036.gif
* SONIC GOT A CHAOS EMERALD? https://cdn.discordapp.com/attachments/400761370800422922/452623869497573386/srb20034.gif

NiGHTS NON-SPECIAL STAGES:
* Colour Chips and Star Chips! Replaces Spheres and Rings of NiGHTS Special Stages.
* Colour Chips turn yellow in bonus time.
* Ideya!
* Its own "drowning" music!
* All of the object types for Dream Hill.
* GIF: https://cdn.discordapp.com/attachments/400761370800422922/452844894113759233/srb20036.gif

RANDOM BS:
* Turn super with the spin button instead of the jump button!
* Followmobj now correctly set with P_SetTarget instead of pointer assignment.
* Emerald hunt uses new sprites!
* Made unlock noise different from emblem gain noise! (It's the CRAWLA HONCHO CAN NOW TURN yadda yadda sound from S3K now.)
2018-06-03 22:41:54 +01:00
toasterbabe
6d1ba20a1d * Add native support for multi-hit badiks to MF_ENEMY.
* MF2_FRET application and removal.
   * Flashing when flag present.
   * Bounce player back on successful damaging.
   * Add their spawnhealth to the chain.
* Reduce code duplication in P_TouchSpecialThing.
* Play with Crawla Commander a little bit as a test of its power.
2018-05-02 23:48:50 +01:00
toasterbabe
2141754e54 V_PERPLAYER. (Hooh boy.)
* Completely redid how splitscreen works, with eventual support for quads. Squish per-player stuff automatically into the right places! Works in GL, associated flag kills V_SPLITSCREEN.
* Seriously update the lives-drawing function for all gametypes, with strings that replace the lives number whenever it's missing (deprecates SKINNAMEPADDING).
* Improved how the nosshack works, alongside many other refactorings.
2018-01-20 22:14:24 +00: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
2fff5e9f6d Fix empty WAD files printing the wrong sprite count. 2017-10-10 01:41:28 -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
87fc24ccbb Fancy super transformation changes! About to go out for dinner, so no major writeup,but let's just say all this changed code means that the transformation animation is smoother in colour change. 2017-10-04 17:45:03 +01:00
toasterbabe
40ef1335a1 * Smiles hardcode!
* Add a default behaviour to followmobj (just basic A_CapeChase).
* Allow for modifying which character starting a new SP game should start you on, relative to the first valid character. (SOC's "startchar" variable)
* Make MF2_SHADOW transferrable via linkdraw.
* Modify P_GetSkinSprite2's recursion limiter to have zero chance of ever infinitely looping.
2017-10-03 18:18:18 +01: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
Nevur
77d7b1495c Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into FileManagement 2017-09-24 14:52:41 +02:00
toaster
3cc14e3985 Merge branch 'directionchar' into 'master'
Autobrake & decoupling player sprite angle from camera angle

See merge request !69
2017-09-19 07:56:22 -04:00
Nevur
4aed951bd8 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into FileManagement
# Conflicts:
#	src/r_things.h
#	src/w_wad.h
2017-09-04 22:32:11 +02:00
Nevur
b087c16eb1 Merge branch 'toastfixes' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into FileManagement
# Conflicts:
#	src/p_setup.c
#	src/p_spec.c
2017-09-04 21:13:29 +02:00
toasterbabe
76300026f8 * Added support for sprite2s to MD2s!
- Name each frame either SPR2_**** or SUPER**** (where **** is the 4-character name)
    - If the name is 3 characters, '.' is accepted as a substitute for the '_', but a space/absent isn't (for tool-related reasons).
    - Adds a big sprite2 index array to all models, even non-player ones. Sorry!
* Made MD2 frame interpoleration only work across the same spriteset (and sprite2set).
* Made MD2 frame interpoleration happen when there's less than a quarter of a second between frames, as opposed to the hardcoded specific animation disabling.
* Fixed sprite2-related typo in dehacked.c.
2017-08-26 18:56:23 +01:00
toasterbabe
4da6169892 Add spr2defaults[] array to make sprite2 defaulting system much, much simpler to manage.
This is in preparation for a seperate project which still involves sprite2s.
2017-08-25 18:00:20 +01:00
toasterbabe
2e6c09a636 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into directionchar
# Conflicts:
#	src/hardware/hw_main.c
2017-08-16 21:40:32 +01:00
Monster Iestyn
9f726bc66d Merge branch 'new_coop' into 'master'
New Co-op

See merge request !104
2017-08-16 15:01:39 -04:00
Monster Iestyn
75d363527b Merge branch 'toastfixes' into 'master'
An assortment of relatively minor bugfixes and behaviour tweaks

See merge request !110
2017-08-16 14:58:30 -04: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
toasterbabe
6e79de3de8 Patched an out-of-bounds crash with papersprites in the least resource-intensive way I could find (xiscale not fitting perfectly into frac). This will have to do until papersprites get a make-over at some point. 2017-08-11 16:00:45 +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
fe4dcee9ad fix inaccurate SC_FULLBRIGHT declarations 2017-06-26 16:30:23 +01:00
toasterbabe
b2fc2e03ba * Always remove linkdraw vissprites from unsorted drawing chain.
* Make the related I_Error more descriptive and "#define PARANOIA"'d only.
2017-06-26 16:11:50 +01:00
toasterbabe
dda9148e56 Fix issue with precipitation not modifying its mobj reference, resulting in Smiles' tails disappearing in CEZ3.
Also, as a result, safeguard some stuff against referencing stuff that's outside of *precipmobj_t's domain.
2017-06-26 15:53:20 +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
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
d5e38c087d Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into FileManagement
# Conflicts:
#	src/p_setup.c
2017-06-25 14:51:37 +02:00