Commit graph

3193 commits

Author SHA1 Message Date
toasterbabe 4f3f647f5b A minor assortment of changes. 2018-04-03 01:46:42 +01:00
toasterbabe 156cc031ea * Optimise them even further... AGAIN! Using an offset-based system rather than a multiplication-based one...
* Again, tweak the spawning code to take maximum advantage of these gains.
* Fix potential crashes with MT_NULL mace/chain types supplied.
* #ifdef out the height-clipping code. It needs more TLC than I can give it right now, and the existing behaviour is less obviously broken (sadly enough).
* Fix chainmace points, which were apparently broken without anyone realising.
2018-04-03 01:10:10 +01:00
toasterbabe 4051ae8915 * Revamp mace creation again to potentially serve as the foundation for further optimisation (and also not rely on a while (1) loop, which easily went wrong several times whilst I was making changes to it).
* Fix minor typoes and other small tweaks in the P_MaceRotate function, which I'm probably about to rewrite again anyways...
2018-04-02 21:36:12 +01:00
toasterbabe 0102da824e Make the h-chain repairing safer. 2018-04-02 01:20:32 +01:00
toasterbabe 5ac70bbb7e * Fix multispoke mace/chainbars having problems.
* Completely rework how mace/chainbars are spawned to reduce the number of matrix multiplications required EVEN FURTHER!
* Reimplement the maceretry solidity stuff (effect 4).
* Flip the mminlength stuff so that existing dev maps don't break badly.
* Fix hacky chainbar grabbing.
* Tweak height of tinychain a smidge.
2018-04-02 01:08:31 +01:00
toasterbabe 97ddb8881d * Remove ability to change speed of chains.
* Fix ability to turn chains (still disabled by default, just at least want the option...)
* Replace max speed setting with a "minimum chainlink distance" setting - if greater than zero, that many chains will not be spawned from the center outwards. Doesn't affect the head of the chain at all, since otherwise what's the point? :V
2018-04-01 22:05:59 +01:00
toasterbabe 6d59551afd Mace optimisation!
* Handle all chain objects as a hnext/hprev chain.
* When removing mobjs with hnext/hprev, "repair the chain" (make the h links meet).
* Fix hidden slings, which I accidentially broke when I revamped maces the first time.
* Kill MF2_MACEROTATE. Not needed for anything anymore.
* P_MaceRotate now available to Lua to make up for it.
* Related: Made modifying hnext/hprev using Lua safer, so it keeps the reference counts in play.
2018-04-01 20:54:19 +01:00
Sryder 6f2de824fb Uncomment HWR_CorrectSWTricks but set gr_correcttricks to be off by default
I wasn't aware of the cvar, this should do for now since I don't believe any maps use these software tricks, probably an old leftover from DOOM.
2018-03-30 23:12:44 +01:00
toasterbabe 0fbebcaa08 Make special stage tallies do the token noise if you cash in a token! 2018-03-30 22:03:14 +01:00
toasterbabe d9b5155e6e * Make Tokens appear in competition.
* Tweak thrown ring colours.
* Make Armageddon shield loop properly.
* Tweak drowning numbers to be consistent between third and first person.
2018-03-30 21:49:15 +01:00
Sryder 0aaae501d3 Warnings must die 2018-03-30 18:53:23 +01:00
Sryder f3aa02e26d Start with lightnum on sector lightlevel 2018-03-30 18:13:52 +01:00
Sryder 66f220d6ad Merge branch 'master' into openglquickfixes 2018-03-30 18:09:41 +01:00
toasterbabe de8f1fa407 * Incorporate (almost) all of Mystic's feedback.
* Prevent ANY input when blindfolded.
* Make CECHOs always perplayer'd. (A little hacky; quads will need work here.)
* Make NiGHTS link timer bounces not a mess, and only when the colour changes.
2018-03-30 16:39:59 +01:00
Sryder 65c893da86 static tempsec for R_FakeFlat
I don't fully understand this, but it's what software does and it fixes the issue of the lighting in DSZ3. Also don't need the extra call to R_Prep3DFloors.
2018-03-29 23:28:54 +01:00
Nevur fc3e863fd3 asdf
Signed-off-by: Nevur <apophycens@gmail.com>
2018-03-29 20:12:19 +02:00
toasterbabe 98601dc757 A lot!
* cv_powerupdisplay. Never, First-person only (default), Always.
* New monitor stuff.
* Fixed hitmessages.
* Some CTF stuff.
* Aaaaugh it's a lot I hate myself I need to work on my coursework.
* I'll figure out what I did here in the merge request when that's done.
2018-03-26 23:53:09 +01:00
mazmazz d85f108997 P_SpawnMapThing: Ignore MTF_ flags if MT_NIGHTSBUMPER 2018-03-25 19:42:46 -04:00
mazmazz dc9fd6f02e MT_NIGHTSBUMPER Spawn: Don't reset mthing->options 2018-03-25 19:07:21 -04:00
toasterbabe 33afd94252 Merge branch 'master' of https://git.magicalgirl.moe/STJr/SRB2Internal.git into pretty_stuff
# Conflicts:
#	src/d_main.c
#	src/st_stuff.c
2018-03-24 17:17:01 +00:00
Sryder f62cb3a30a I've commented out the call to HWR_CorrectSWTricks.
I don't think it does anything for us anymore, and might even break things with slopes.
Someone let me know if I'm wrong and am breaking things horribly here.
2018-03-23 22:27:29 +00:00
Sryder fab4b7f5ea Stop squashing the screen vertically in non-green resolutions 2018-03-22 01:10:53 +00:00
Sryder 839ee0ab85 OpenGL Sprite Splitting 2018-03-22 00:52:14 +00:00
Sryder 0885d27171 Transform sprites in world space rather than screen space
Transformation based on screen space would make sense if we didn't want anything in the world to effect the sprites.
This should allow sprite splitting and sorting of sprites with level geometry easier.
stransform is no longer needed.
2018-03-21 19:45:37 +00:00
toasterbabe 24c017564e Mammoth commit!
* Make TIME part of HUD count down in a bunch of circumstances where it was otherwise some other seperate thing.
* Make race countdown happen in a bunch of appropriate circumstances.
* Refactor race countdown.
* Remove a lot of useless stuff from H&S/Tag UI.
* Make co-op/competition/race end-of-act countdown use the race countdown and bigger HUD font.
* Remove useless PLAYING/SPECTATE text from lives element.
* Merge lap counter into lives element.
* Move some other text around.
2018-03-21 18:18:45 +00:00
toasterbabe 05bf3674d3 * M_Random function access to v! (so v.RandomFixed(), etc...)
* Remove deprecated P_Random() from Lua.
2018-03-20 15:00:27 +00:00
Sryder 4e95066f5a Some fixes and updates for HWR_SplitWall
Solid walls *can* be cut
Fix issues with water and fog FOFs not cutting each other out correctly
Fix Fog colourmap and lighting setting that is done here.
Remove HWR_SplitFog

There is currently a bug with FF_DOUBLESHADOW (that also exists in software) but has a larger impact here. When 2 FF_DOUBLESHADOW lights are directly stacked on each other the bottom one has its height set incorrectly. This causes all the Fog in the timed gravity flipping section of ERZ2 to be drawn and it looks really bad.
2018-03-20 14:20:08 +00:00
toasterbabe ae033a9409 * Clean up a lot of NiGHTS stuff still using the old, shitty NOSCALESTART offsetting in nonstandard resolutions.
* Clean up the ST_ drawing macro list.
2018-03-20 00:19:20 +00:00
toasterbabe 7885ae57e2 * Allow for V_ flag control for hudinfo SOC/Lua stuff through hudinfo[n].f (for flags).
* Fix Old Special Stage offsets.
* Fix drowning number offsets.
* Remove useless "WS" macros.
2018-03-19 23:08:51 +00:00
toasterbabe 4798f85382 Fix issues with the level platter in nonstandard resolutions. 2018-03-19 17:41:53 +00:00
toasterbabe c0cc1471e5 Make some tweaks to devmode offsets. 2018-03-19 16:39:37 +00:00
toasterbabe 7d1885917a Some minor intro tweaks. 2018-03-19 16:36:14 +00:00
Sryder f3d63b82ce Revert "Fix screenshot functionality in fullscreen in SDL2"
This reverts commit 121fcd8369.

The reason I am reverting this is because the last commit actually fixes the *old* screenshot functionality, as the screen is being drawn back onto the buffer after they're swapped in the "real" size. Meaning the old function actually works perfectly fine now.
2018-03-18 18:33:53 +00:00
Sryder a984d979d1 Fix wipes in low resolutions 2018-03-18 17:12:12 +00:00
Sryder 31d1ef8db0 Draw the final screen texture in the centre with black bars
Only applies when the monitor aspect ratio is different to the game's aspect ratio.
2018-03-17 19:22:14 +00:00
Sryder 527df5c248 Fix OpenGL Title Screen Sky
My IDE doesn't seem to like Vada's name.
2018-03-17 15:11:32 +00:00
Sryder 6de0cc6bcc Remove the OpenGL only code from V_DrawPatchFill
That's all of the HUD drawing functions that are currently used updated in GL.
2018-03-17 14:47:06 +00:00
Sryder a9214ebd37 Match HWR_DrawCroppedPatch to V_DrawCroppedPatch 2018-03-17 13:58:44 +00:00
Sryder 801f7547d3 Add the full-screen drawfill functionality to HWR_DrawFixedPatch 2018-03-17 13:26:43 +00:00
Sryder 7830c031f7 Make HWR_DrawFill match V_DrawFill 2018-03-16 19:46:45 +00:00
Sryder 7764a1bb5d Match HWR_DrawFixedPatch to V_DrawFixedPatch 2018-03-16 18:08:24 +00:00
Sryder 1b3e1f78af Translucent floors shouldn't write into the depth buffer 2018-03-15 23:59:01 +00:00
Sryder 5a4ea9fab3 Better fog block colouring
They still aren't perfect, but now they are at least not quite so obviously just translucent polygons over the level. A mixture between partially modulating the background colours and adding the fog colour. Notably white fog blocks look like they're brightening what's behind them.
Additive was also setting noalphatest before, can probably decide that depending on what it needs anyway. I don't think it's currently used anyway.
2018-03-15 23:58:37 +00:00
Alam Ed Arias 5a04145e43 Merge branch 'master' into next 2018-03-14 14:29:42 -04:00
Alam Ed Arias 1619b392f6 Merge remote-tracking branch 'public/master' 2018-03-14 14:26:07 -04:00
toasterbabe fee8714109 i suck at the alphabet! 2018-03-14 16:55:33 +00:00
toasterbabe a5ab9f01bb oh yeah this guy's name needs changing too 2018-03-14 16:49:10 +00:00
toasterbabe 68cb919205 down with cis 2018-03-14 16:47:19 +00:00
Louis-Antoine aefe06e2ef Fix Lua panic when archiving a table element with an userdata key 2018-03-09 16:40:34 +01:00
Sryder e4ed3a793b Small hacky fix for MD2s and sprites until sorting for walls, floors, and sprites is done
Sorts all translucent sprites and MD2s so they're drawn after all the opaque ones. Fixes most of the observable issues between translucent MD2s and opaque sprites/MD2s.
2018-03-09 09:58:10 +00:00
Sryder 121fcd8369 Fix screenshot functionality in fullscreen in SDL2 2018-03-08 22:28:38 +00:00
Monster Iestyn 145616b152 Merge branch 'master' into next 2018-03-08 19:35:51 +00:00
Sryder 77af3a8f95 Optimise the screen texture setup for SDL2, Post-processor, and wipes.
Only use glCopyTexImage2D when first creating the screen texture, use glCopyTexSubImage2D anytime after that as it does not define a new texture each time.
Flushing of the screen textures has been implemented for when the screen size changes (so that the screen textures don't stay at a wrong size) and the game is closed, I believe they would leave a memory leak before.
2018-03-07 22:55:21 +00:00
Sryder 67ee1637c9 Decrease far clipping plane
The Far clipping plane did not need to be nearly as high as it was, the new value is 32768, which I suspect is about how far software can render before it completely falls apart.
It is desirable to increase the near clipping plane to between 6-10, but it can introduce more issues with close geometry not being drawn when the player or camera is scaled or viewheight is set to MIN in first person view. It would also stop sprites from being drawn ever so slightly too early, but this isn't too much of an issue and isn't too noticeable with those values. Might look into scaling near clipping plane in accordance to camera scale in the future.
The reason for wanting to increase the near clipping plane is because the small value can cause very noticeable Z-fighting where there shouldn't be on older GPU's, usually Intel ones, that don't support 24-bits for the depth buffer.
2018-03-07 00:39:33 +00:00
Monster Iestyn aba4adfabc shrunk buffer from 32 to 28 so that all of "Downloading "extremely...longname.wad"" can fit on screen at once. 2018-03-06 20:52:55 +00:00
Monster Iestyn a66824d63f replace the 3 strncpys with a snprintf 2018-03-06 20:20:27 +00:00
Sryder 538d0de949 Merge branch 'master' of git@git.magicalgirl.moe:STJr/SRB2.git into openglquickfixes 2018-03-06 16:11:05 +00:00
Monster Iestyn e3151f26dc rewrite download file screen code:
* fix screen to properly truncate the filename to just the real name only
* if the real name itself is too long, use ellipsis and paste in parts of the start and end of the actual name

note: I haven't actually tested if this works or compiles yet, I haven't the time right now
2018-03-05 22:24:03 +00:00
Monster Iestyn bfbe69c627 Merge branch 'master' into hardcoding-time-again 2018-03-04 19:22:08 +00:00
Monster Iestyn b254acaa0d Merge branch 'master' into texture-fixes 2018-03-04 19:20:54 +00:00
Monster Iestyn 01f1e7fc33 Merge branch 'zoning-out' into 'master'
Zoning out

See merge request STJr/SRB2Internal!133
2018-03-04 14:19:25 -05:00
Monster Iestyn 61923f3b1f Merge branch 'public_next'
# Conflicts:
#	src/sdl/i_system.c
2018-03-04 19:18:13 +00:00
Monster Iestyn ad1801e7f1 Merge branch 'master' into next 2018-03-04 19:10:01 +00:00
Monster Iestyn 16e60aada9 Merge branch 'linux-limbo' into 'master'
Linux limbo

See merge request STJr/SRB2!228
2018-03-04 14:08:21 -05:00
Monster Iestyn 4fdb82c942 Merge branch 'soc-sanitizing' into 'next'
SOC sanitizing

See merge request STJr/SRB2!227
2018-03-04 14:07:30 -05:00
toasterbabe 33d5baa2aa * Add new console text colours - sky, purple, aqua, peridot, azure, brown, rosy, and invert.
* Remove redundant check from V_DrawFadeScreen().
* Clean up potential endless sound source in Race HUD.
2018-03-02 13:32:55 +00:00
Monster Iestyn 4a0305eec8 more I_GetFreeMem fixes: don't attempt to set *total to 0L if total itself is NULL 2018-02-23 20:40:19 +00:00
Monster Iestyn 1216c9da18 Use __linux__ instead of LINUX/LINUX64
Turns out compiling for Linux 32-bit using the Makefiles never actually defines LINUX! Apart from that, most of the existing Linux-specific code in SRB2's source code (except for tmap.s) actually uses __linux__ instead anyway
2018-02-23 20:21:16 +00:00
Monster Iestyn 6e21059713 Eat unprintable keys too, since there's no reason to feed them to G_Responder anyway when the console is open 2018-02-23 20:08:02 +00:00
Monster Iestyn ad8c51ab8f removing stupid dumb useless code fish 2018-02-21 22:45:51 +00:00
Monster Iestyn fb3e78c020 Make CON_Responder eat Ctrl+key combos that have no effect, instead of passing the key on to G_Responder 2018-02-20 17:06:03 +00:00
Monster Iestyn 1bc98da70b Added Z_TotalUsage as a shortcut for Z_TagsUsage(0, INT32_MAX) 2018-02-16 20:32:43 +00:00
Monster Iestyn 81a9b7b070 Total reorganisation of z_zone.c/h, added doxygen-compatible comments to all functions and additional regular comments where appropriate, changed purge tag macros to an enum list 2018-02-15 22:09:24 +00:00
Monster Iestyn 4782cc89fa updating comment for Z_TagsUsage in the .c file 2018-02-15 16:53:58 +00:00
Monster Iestyn 013d185d9e Z_FreeTag and Z_TagUsage are now both macros of their respective two arg variants 2018-02-15 16:31:05 +00:00
Monster Iestyn 8f834d6784 added a quick Z_FreeTag function as a shortcut to Z_FreeTags(tag, tag) where both tags are the same 2018-02-14 23:16:16 +00:00
Monster Iestyn 836bf5e12f Clean up z_zone.h's function protos to look more readable like m_random.h, don't name functions with "2" if not using PARANOIA or ZDEBUG
also, Z_Malloc/Calloc/Realloc are now macros of the "Align" versions, regardless of ZDEBUG or not
2018-02-14 22:52:25 +00:00
Monster Iestyn bd7ced9363 Merge branch 'master' into hardcoding-time-again 2018-02-14 16:24:05 +00:00
Alam Ed Arias 306cbc43e2 Merge branch 'public_next' into private 2018-02-14 10:34:36 -05:00
Alam Ed Arias 99552c2ba2 Merge branch 'master' into next 2018-02-14 10:29:24 -05:00
Louis-Antoine c7320f9f82 Don't allocate memory for net commands already executed, as it would cause them to be never freed 2018-02-14 15:09:52 +01:00
Monster Iestyn df95e2175f Merge branch 'master' into hardcoding-time-again 2018-02-13 21:21:30 +00:00
Monster Iestyn 49b8fd6d67 Don't attempt to load the "Lua/" or "SOCs/" folder lumps themselves as Lua/SOC lumps 2018-02-13 21:12:42 +00:00
toasterbabe 7018ce925b Fixed the strengths going in the wrong direction of transparency in GL! 2018-02-12 21:31:03 +00:00
toasterbabe b69cbd85b9 Merge branch 'master' of https://git.magicalgirl.moe/STJr/SRB2Internal.git into pretty_stuff 2018-02-12 18:59:01 +00:00
toasterbabe da3f8ceb8d * Move the non-mapping drawFill out of the source code function and into the Lua interface.
* Add a drawFill fallback for COLORMAP too.
* Correct a few index mishaps.
2018-02-12 18:23:57 +00:00
toasterbabe c1b48ea79f * Total overhaul of V_DrawFadeScreen(color, strength!
- controllable strengths between 0-31 for COLORMAP lump like before
   - arbitrary colour indices in the palette via TRANSMAP lumps, with strengths 0-9
   - exposed to Lua as v.fadeScreen(color, strength)!
* Remove last vestiges of V_STATICPATCH.
2018-02-12 17:47:31 +00:00
Monster Iestyn 8556a05668 Fix SOC/Lua loading messages to display full names or even display at all (for PK3s at least), and otherwise some cleanup of existing code for the messages.
Also, I moved lua_lumploading on/offing to LUA_LoadFile.
2018-02-09 22:43:08 +00:00
Monster Iestyn bf88407d00 Make sure both software and OpenGL ignore patches that are completely out of a multi-patch texture's bounds.
This fixes OpenGL in particular crashing because of such a weird situation.
2018-02-09 17:23:35 +00:00
Monster Iestyn f12530a39f Merge branch 'master' into hardcoding-time-again 2018-02-08 20:33:17 +00:00
Monster Iestyn b533d36143 Merge branch 'master' into file-loading-cleanup 2018-02-08 20:32:59 +00:00
Monster Iestyn b1695de124 Merge branch 'public_next' 2018-02-08 20:31:53 +00:00
Monster Iestyn c42c70cb34 Merge branch 'playdemo-custom-home-fix' into 'next'
Fix for "playdemo" not working with custom home paths

See merge request STJr/SRB2!221
2018-02-08 15:29:39 -05:00
Monster Iestyn fbd4ce1d47 optimised R_ExpandPlane too 2018-02-07 18:11:32 +00:00
Monster Iestyn efe9204f78 Fixed sky-sky thok barriers showing HOM (turns out the floor and ceiling share the same plane, so I've modified the code to account for this)
Additionally, place some optimisations in both software and OpenGL; in particular one has been added for when all of back and front sector (floor and ceiling) is sky: since everything is "open" anyway, we can simply the usual checks involved.
2018-02-07 17:46:01 +00:00
Monster Iestyn 493af49a00 Correct backwards skies for OpenGL too 2018-02-03 21:39:36 +00:00
Monster Iestyn 33a538383f Added proper support for upside-down thok barriers, in both renderers
Thankfully it was really just a copy+paste of the code I already tinkered with for the normal ceiling sky based thok barriers, but tweaked for floors instead
2018-02-03 19:48:18 +00:00
Monster Iestyn 0dc867c05e Cleanup of the code I've tweaked for skies, added SLOPEPARAMS macro to R_StoreWallRange for use in getting seg end z positions 2018-02-03 18:30:49 +00:00
Monster Iestyn ecf2eed37f Pushing all my work to make OpenGL consistent with my changes to software's sky so far 2018-02-01 22:04:04 +00:00
toasterbabe 5adfdf9516 cv_playername already has a valid default value of "Sonic". We do NOT need to expose things like this. 2018-01-30 22:48:53 +00:00