Commit graph

1590 commits

Author SHA1 Message Date
Nevur c558900c61 Deleted the Add_WallScroller function entirely from code.
Removed commented out instance using the function.
2016-10-07 18:56:10 +02:00
Monster Iestyn df9ad4a0e6 wall-scroll-by-linedef specials now use just linedef dx/dy to determine scrolling direction, rather than the complex system that was in place before
If there's any reason to bring the old system back we could make it togglable by one of the linedef flags I suppose. Not that many people would actually use it though, most likely
2016-08-16 17:15:39 +01:00
Alam Ed Arias 074dde5f78 Merge branch 'public_next' into master 2016-08-11 12:59:04 -04:00
Alam Ed Arias 60f0bd8eec Merge branch 'next' into public_next 2016-08-11 12:58:08 -04:00
Alam Ed Arias fb8de61a81 Merge branch 'master' into next 2016-08-11 12:48:52 -04:00
Monster Iestyn 1ea0f9ceb8 Merge branch 'new_new_spriteframe_angle' into 'master'
NAMEcLcR sprite angle loading, take 2

HEY LOOK, A NEW SPRITE LUMP LOADING FEATURE (which isn't that new since this merge request description is literally copypasted from the one for public next)

 * NAMEcL refers to a frame which is seen for the entirety of an object's left side. (ie - in 2d mode, facing to the left relative to the camera)
 * NAMEcR refers to a name which is seen for the entirety of an object's right side. (ie - in 2d mode, facing to the right relative to the camera)
 * NAMEcLcR does both sides, duh. I didn't break reflection.
 * Having just a NAMEcL requires you to fill in the opposite side either with NAMEcn where n is 1 and 5-8 OR a NAMEcR OR a NAMEc0
 * Having just a NAMEcR requires you to fill in the opposite side either with NAMEcn where n is 1-5 OR a NAMEcL OR a NAMEc0
 * Switches down the centerline of the object instead of at the ANGLE_202h interval for normal sprites. Has a very small window where you can see a NAMEc1 and NAMEc5 if you only use one of NAMEcL or NAMEcR down one side.
 * The specific symbols selected for this were selected for 1) ease of mental understanding (Left, Right) and 2) not getting in the way of adding support for zdoom's totally bananas 16-way sprite system at a later date if we so choose, which only goes up to G

totally makes sense for stuff like NiGHTS stuff, Axis2D stuff, and maybe if SRB1 survives the chopping block in some shape or form it can take advantage of that too

See merge request !33
2016-08-11 12:41:11 -04:00
Monster Iestyn c79428a178 Merge branch 'opengl-planes' into 'master'
OpenGL planes fix

This branch removes a specific hack in the OpenGL code for detecting if a plane is for the floor or ceiling of a sector. This it turns out fixes ceiling slopes in Boinciel's SUGOI map going missing. Though, It doesn't fix that other glitch with one FOF (must be unrelated).

If you want to test these fixes out properly, make sure working in-level sectors, FOFs AND also polyobjects all still work fine, sloped or not.

See merge request !97
2016-08-11 12:15:08 -04:00
Monster Iestyn ae5844be76 Merge branch 'fof-slope-crash-fix' into 'master'
Fof slope crash fix

This fixes yet another software renderer crash, this time relating to sloped FOFs: sometimes the renderer thinks parts of FOFs where the top and bottom heights are the same height are actually the bottom going through the top (in other words a negative height). This causes problems when drawing normal walls around such FOFs since the game obviously doesn't expect negative heights anywhere along the FOF - before slopes, the game could just flip around the top and bottom heights automatically with no problems. This branch also should fix crashes for all genuine cases of negative FOF heights when slopes are involved, I suppose.

Hopefully this stops FuriousFox's SUGOI map crashing for the time being, all seemed fine when I tested it out myself.

See merge request !96
2016-08-11 12:13:52 -04:00
toasterbabe 742dced437 Updating I_Error to use 4 characters for the spritename only in the same way the other ones do 2016-08-09 13:04:53 +01:00
toasterbabe 4183912c60 Please don't assume indentation carries intent, especially since a break that exclusively follows an I_Error will never run 2016-08-09 13:01:56 +01:00
Alam Ed Arias 6c6cbecb10 I do not think you wanted to break on EVERYTHING 2016-08-08 21:30:20 -04:00
toasterbabe c77b3aa58d Sorted an issue MI discovered (I was basing the flip code off the C0 scenario rather than the Cn one) 2016-08-08 17:24:36 +01:00
toasterbabe 6a070adf4b Making the flag value more obvious. 2016-08-08 14:35:18 +01:00
toasterbabe aa89eadac4 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into new_new_spriteframe_angle 2016-08-08 14:16:20 +01:00
Alam Ed Arias c3690092e1 Merge branch 'public_next' into master 2016-08-07 23:29:01 -04:00
Alam Ed Arias ce129c28c2 Merge branch 'next' into public_next 2016-08-07 23:27:40 -04:00
Alam Ed Arias 774a93c819 Merge branch 'master' into next 2016-08-07 23:23:50 -04:00
Wolfy bbb4bb8a05 Merge branch 'invalid-map-name-test' into 'next'
-warp checking for invalid map names

I've noticed a bunch of new people getting the "Cannot warp to map 0 (out of range)" error when testing their custom maps. On asking what map name they used, it was clear they didn't use a MAPxx name at all. Sadly it was not obvious to them that other kind of map names are not accepted by SRB2, so I thought it best we make that more clear in-game.

SRB2 now gives you the error "Cannot warp to map \[your input\] (invalid map name)" if you used -warp with a param that is neither a MAPxx name or a plain number.

See merge request !99
2016-08-07 16:34:23 -04:00
Wolfy 3fcaf0b351 Merge branch 'findspeciallinefromtag-fix' into 'next'
P_FindSpecialLineFromTag crash fix

This fixes the case where an in-level sector or FOF control sector with a tag of -1 or 65535 (seriously, who does that?) can possibly lead to a crash in this function when searching for heat linedef specials in 1st person. And also the same kind of crash any other sort of weird case where the tag number that function uses for searching is -1 or 65535, I suppose!

See merge request !98
2016-08-07 16:33:53 -04:00
Wolfy 8561a6b413 Merge branch 'sprite-loading-tweaks' into 'master'
Fix R_AddSingleSpriteDef's I_Error messages

Whoops, seems I forgot about this little branch. Basically this fixes how for a character's sprites, a full sprite lump name is displayed instead of just its sprite prefix in the "R_AddSingleSpriteDef: No patches found for [sprite prefix] frame [frame character]" message (unlike when it occurs for non-character sprites), resulting in something like "R_AddSingleSpriteDef: No patches found for PLAYC2C8 frame \^" which does NOT help custom character authors at all as it just confuses them instead. (for the record, the problem would actually with the ^ frame and not the ones displayed after "PLAY")

Oh, and the same problem is also fixed for this similar message: "R_AddSingleSpriteDef: Sprite [sprite prefix] frame [frame character] is missing rotations"

See merge request !95
2016-08-07 16:33:15 -04:00
RedEnchilada 02d3382408 Leave a note to anyone foolish enough to try to fix this 2016-08-07 12:17:31 -05:00
toasterbabe 0a75b8d918 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into new_new_spriteframe_angle 2016-08-07 11:21:53 +01:00
toasterbabe 76e658bf1b Minor re-ordering to optimise this branch. 2016-08-07 00:21:16 +01:00
Monster Iestyn 5b2705ef48 Merge branch 'spr2-freeslots' into 'master'
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
2016-08-04 16:24:37 -04:00
Monster Iestyn 4c4f124611 Detect if -warp's parm is actually a valid map name (MAPxx or plain number), and print an "invalid map name" message if not 2016-07-28 16:07:26 +01:00
Monster Iestyn 2b985bda85 Make sure we detect if start >= numlines so we can deal with that properly
for some apparent reason the compiler didn't like the while loop condition edit on its own (it complained about inline failures for P_MobjReadyToTrigger for some reason), so I had to add that extra bit above the while loop... and it was happy again, huh
2016-07-28 14:57:19 +01:00
Monster Iestyn 2870e19f7f Take out fixedheight-based hacks for checking if floor or ceiling! Use an "isceiling" boolean for that instead
This apparently fixes most of the issues with ceiling slopes in Boinciel's SUGOI map
2016-07-27 19:56:21 +01:00
Monster Iestyn dc765cde2c Fix R_DrawColumnShadowed_8 crash encountered in FuriousFox's map
If you want more specifics, sloped FOFs are to blame it turns out: sometimes the bottom of an FOF wall blocking a segment of an in-level wall column can be considered ABOVE the top part of the FOF there (yikes), and then the dc_y* values go offscreen, and then BOOM
2016-07-24 18:54:01 +01:00
Alam Ed Arias 6b94f286e2 Merge branch 'public_next' into private 2016-07-24 01:08:31 -04:00
Alam Ed Arias ff6440d343 Merge branch 'next' into public_next 2016-07-24 01:08:00 -04:00
Alam Ed Arias 4321757df4 Merge branch 'master' into next 2016-07-24 01:07:25 -04:00
Alam Ed Arias 03ddc1f29a define SRTICT_ALIGN to - if the system is x86/x64 system 2016-07-23 23:26:08 -04:00
Alam Ed Arias ddce305c17 under clang, defined does not means true 2016-07-23 23:14:24 -04:00
Alam Ed Arias 82fad646e7 wad and lumps are unsigned, not signed 2016-07-23 23:02:10 -04:00
Alam Ed Arias ee73416222 appveyor: fixup version 2016-07-22 17:28:00 -04:00
Alam Ed Arias da6a2be075 Merge branch 'next' 2016-07-22 17:22:58 -04:00
Alam Ed Arias 7b88db478c Merge branch 'public_next' into private 2016-07-21 19:22:30 -04:00
Alam Ed Arias 5513e110d1 Merge branch 'next' into public_next 2016-07-21 19:21:49 -04:00
Alam Ed Arias 5c234a817a Merge branch 'master' into next 2016-07-21 18:49:33 -04:00
Alam Ed Arias f6b8b51ac2 Merge branch 'software-fixes' into 'master'
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
2016-07-21 17:45:45 -04:00
Alam Ed Arias df0a90957f Merge branch 'tilted-transparent-flats-fix' into 'master'
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
2016-07-21 17:14:43 -04:00
Alam Ed Arias b02c824da8 Merge branch 'skybox-render-fix' into 'master'
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
2016-07-21 16:58:06 -04:00
Alam Ed Arias 9301344003 Merge branch 'macosx-hacking' into 'master'
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
2016-07-21 15:38:46 -04:00
Alam Ed Arias a9c521031d Merge branch 'gasjets_and_slopes' into 'next'
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
2016-07-21 15:11:49 -04:00
Alam Ed Arias 1a0fcbd8dc Revert "Merge branch 'RemoveINetC' into 'master'"
This reverts commit 8607f5247c, reversing
changes made to 11d76a6562.
2016-07-21 14:42:00 -04:00
Alam Ed Arias 8607f5247c Merge branch 'RemoveINetC' into 'master'
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
2016-07-21 14:15:58 -04:00
Alam Ed Arias c5fe08dcd2 Merge branch 'aatree-refactor' into 'next'
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
2016-07-21 14:13:38 -04: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
toasterbabe 333d8c882e Recreating NAMEcLcR sprite angle loading in internal, as Inu requested. 2016-07-19 00:04:00 +01:00
Monster Iestyn 77a40e9016 Slightly unrelated, but if R_DrawTranslucentSplat_8 is ever going to be used this is probably more efficient (also fixing early colormap application for the last part) 2016-07-17 23:01:07 +01:00