Spr2 freeslots
Needed for Miles, generally a good idea to have around anyway. Considering Miles uses it without problems, seems to work fine.
See merge request !24
Software crashes fix... fix
Fixes a typo introduced by merge request !75 that caused upper textures to set the wrong ceiling clipping value when not visible, allowing all sorts behind the walls to be visible. This is most noticable in GFZ2 when the inside of the tunnel section is visible
...probably a good idea to make sure this one doesn't introduce any MORE visual glitches by mistake (again, compare with 2.1.15 if possible)
See merge request !93
Fix for flats with transparent pixels on slopes
This fixes how R_DrawTiltedSplat_8 unintentionally allows the cyan pixels to NOT be considered "transparent" if after being remapped, depending on sector brightness and/or linedef type 606 colormaps, the result of remapping is not palette index 247 (the cyan we typically turn transparent). That is, the original colors from the source flat graphic are not checked, but instead the __result__ of coloring the flat under the respective colormap is checked for "transparent" pixels. This is only a problem for the tilted splat drawing function, not the regular one for non-sloped planes with cyan-pixel-using flats.
I found out about this bug from the issues Ritz was having with sloped 255-alpha translucent FOFs using transparent flats and his custom COLORMAP lump (and later when he applied a linedef type 606 colormap to the FOF) for his custom map. Thankfully he has some workarounds, but this should fix the code-side issues that caused his problems in the first place.
I also fixed stuff with another splat drawing function that's not currently used atm (maybe it will be in the future, if splats themselves are ever enabled again? *shrugs*).
See merge request !92
Skybox rendering offset fix for third person/alt view camera
Fixes the issue reported in this thread: https://mb.srb2.org/showthread.php?t=41729
I dunno if this will negatively affect any existing skyboxes in SRB2's own levels, that said. I tried out THZ2 and CEZ1 with this fix at least but I forgot to compare them with how they are in 2.1.15 so _*shrugs_*
See merge request !94
OS X Makefile build setup
This merge request:
* Cleans up the OS X bundle resource location code and fixes a SIGSEGV and memory leak
* Simplifies and fixes the OS X desktop alert code, closing more leaks
* Adds the MACOSX build flag to the Makefiles, to allow building a binary (but not Mac app yet) of SRB2.
This is intended to make it easier for developers to build on Mac OS X, without having to pull in all of XCode. You can keep using CMake if you prefer.
To test, use `make -C src MACOSX=1 NONX86=1 SDL=1 NOASM=1` for a release build.
Left to do:
* Add a content bundling script to be run after building, and a flag to trigger doing that.
`MACOSX_BUNDLE` maybe?
* Somehow get access to a Mac running PowerPC and figure out how to build a multi-platform binary.
* Add the proper magic to compile using gcc if requested. (Right now, compilation is done via LLVM/Clang)
See merge request !72
Gas jets, fan objects, springs and slopes
Whoop whoop whoop minor bugs that only get noticed due to weird experiments whoop whoop whoop
* For gas jets only: the object's standingslope is ALWAYS null. No drifting down the slope for you.
* For gas jets and fan objects: Now checks whether the player's top is below the bottom of the launcher, instead of its bottom. zdist calculation not affected, since it's signed and okay with being negative by about the height of the player.
* For all 3: the player's standingslope is NULL'd so the player isn't launched off at a wacky angle if they're standing on a slope then walk into the thing.
See merge request !91
Remove i_net.c
The code in i_net.c doesn't actually seem to be used in SRB2. I was able to compile a build without it, and hosting and joining netgames worked just fine (well, as fine as they can with the current state of the netcode...).
The vast majority of code in the file seems to be contained in HAVE_SDLNET ifdefs, and I'm pretty sure SRB2 has never used SDLNET in a public build. The only bit not contained in that block is I_InitNetwork(), which just prints an error and returns false.
Do we really need to keep it around? If not, I say get rid of it. It seems like useless clutter that is just going to confuse people who are trying to understand the source code.
See merge request !73
Re-factoring AA tree code from m_misc.c/m_misc.h into its own files
What the title says. The AA tree-related code now lives in the files m_aatree.c and m_aatree.h. Part of why I did this was to solve this m_misc.h/w_wad.h cyclic dependency problem (involving MAX_WADPATH and AA trees themselves) mentioned in the now-removed comments, another reason was ...only OpenGL uses AA trees at all, why include the relevent structs/functions/otherwise anywhere except where is necessary (which is very few files as it turns out)?
Otherwise, it just looked better on its own rather than mixed with all the other stuff already in the m_misc files. Not really important or anything affecting gameplay at all I guess.
See merge request !82
Sideways springs, horizontal hog-launchers, perpendicular plungers...
Call them what you like, they're in the code now. And have been for months!
Nev3r uses the hell out of these and I'm fed up of them being <!>'s all over the place, so please have 'em in master so we can update srb2.srb and make things better for all of us.
See merge request !30
For GCC 6.1 builds
I do not know what I was doing:
NULL checks
building without BLUA support
functions that do not depend on outside vars should be tagged with "const", AKA, FUNCMATH
See merge request !89
* SPR2_PEEL, SPR2_SPEE.
* S_PLAY_PEEL, S_PLAY_SUPER_PEEL.
* PA_PEEL.
* Dashmode actually starts charging from runspeed instead of the arbitrarily calculated (normalspeed - 5*FRACUNIT). This just made things easier, honestly, and it's 1 FU of difference compared to the current test case.
- Now checks whether the player's top is below the bottom of the fan/gas jet, instead of its bottom. zdist calculation not affected.
- mo->standingslope is NULL'd so the player isn't launched off at a wacky angle. (I also did this for springs, since Prime mentioned it was a problem for them too.)
Some slope improvements/fixes (plus P_GetMobjGravity)
Dear Red, I did some things.
* Made the slope flag SL_NOPHYSICS actually have an effect like we wanted to, but didn't get around to implementing yet - activated by setting the slope's linedef flags to have ML_NOSONIC.
* Made downhill slope thrusts proportional to an object's gravity and friction.
* To make the above happen - seperated out the gravity value finding code in P_CheckGravity into a seperate function, P_GetMobjGravity. (p_mobj.c, p_local.h) I also made this function available to Lua.
* Turned those PANIC n console messages (which would inevitably be followed up with a crash, since we're accessing invalid memory immediately after) into a descriptive I_Error.
* Put the SRB2CB type-shimming behind an ESLOPE_TYPESHIM ifdef.
* Removed SPRINGCLEAN-ifdef'd code.
* Cleaned up some eosteric comments.
* NEW SINCE RED +1'd THIS: The teetering code now takes slopes into account pretty well. There are edge circumstances as outlined in commit 9d221f4f3f, but this is unilaterally better behaviour in every way and the teetering code was kind of a mess anyways.
* NEW SINCE RED AND ALAM +1'd THIS: P_ReverseQuantiseMomentumToSlope. Simple function that replaces the inverse angle stuff (which also wasn't using InvAngle, just ANGLE_MAX - angle - which is inaccurate!!)
Current testing files available at /toaster/slptst3.wad and /toaster/gravitytest.lua on the ftp.
I want to do more to the branch like implement SL_ANCHORVERTEX in the near future, but this is probably safe to merge in its current state.
See merge request !77
Climbing on one-sided linedefs
Does what it says on the tin. You couldn't before, now you can.
With this branch, thok barriers are now completely optional for maps with no aesthetic need for sky-topped walls. All the bugs and complications that exist with climbing right now still exist, except now there's one less issue making them suck forever and now Nev3r will be very happy.
Do I need a testing .wad? It's... not that hard to create a very small map and go nuts with Knuckles in it. I have one, but uploading it to the ftp almost feels insulting.
See merge request !90
The whole thing needs a refactor in general, but it's almost 2am here, I need my sleeb, and this fix would probably break something with 2.1 climbing if I made it any more/less (depending on viewpoint) complicated.