Commit graph

1068 commits

Author SHA1 Message Date
Alam Ed Arias
57091261d9 MSVC: fixed up MSVC project 2016-05-21 23:53:04 -04:00
Alam Ed Arias
032313260a Merge branch 'public_next' into master 2016-05-20 17:58:57 -04:00
Alam Ed Arias
9550f9626b r_opengl.dll: UPX and static link libgcc 2016-05-20 17:36:46 -04:00
Alam Ed Arias
ff5587d1d5 Merge branch 'master' into next 2016-05-19 18:03:56 -04:00
Monster Iestyn
c846b0ab23 Aren't some of these things already added later in sdl/Makefiles.cfg?
* -lSDL2_mixer is already added to SDL_LDFLAGS by default, unless NOMIXER=1 is set
* -DSDLMAIN should also be added to OPTS by default for MINGW=1 builds, unless NOSDLMAIN=1 is set
2016-05-19 16:51:05 +01:00
Alam Ed Arias
e2a5783521 Merge branch 'master' into next 2016-05-19 01:39:45 -04:00
Alam Ed Arias
6aa1aeb838 build: include own copy of SDL2main 2016-05-18 22:25:06 -04:00
Alam Ed Arias
ef488d2b03 MSVC: link to SDL2main, then SDL2 2016-05-18 21:41:27 -04:00
Alam Ed Arias
7193df7f75 MSVC: turn off SAFESEH for SDL release builds 2016-05-18 21:28:53 -04:00
Alam Ed Arias
ab9f2ea831 MSVC: fixup Debug build linked 2016-05-18 21:11:30 -04:00
Alam Ed Arias
7058baed44 Merge branch 'master' into next 2016-05-18 20:07:27 -04:00
Alam Ed Arias
205d16e3af added unsaved project changed 2016-05-18 20:05:24 -04:00
Alam Ed Arias
a4b0f89caf MSVC: fixedup SDL2 build 2016-05-18 20:01:50 -04:00
Alam Ed Arias
bbf9f5adc8 Makefile: use built-in SDL2 and SDL2_mixer for Mingw32 and Mingw64 2016-05-18 16:54:55 -04:00
Monster Iestyn
b4cf7fbc97 Fix player 1 and player 2 affecting whether the other can see skyboxes or not 2016-05-18 18:20:56 +01:00
Monster Iestyn
1e50691e08 Remove extern for unused "oncontinuescreen" variable 2016-05-18 17:41:11 +01:00
Inuyasha
ab7af594d9 Merge branch 'nights-hotfix' into 'next'
NiGHTS hotfix

Fixes the following issues relating to playing as NiGHTS Super Sonic that apparently popped up between 2.1.14 and next (mostly due to the changes to SRB2's trig stuff it seems):
* Super Sonic drifts to the side at some angles around an axis, and is unable to go directly upwards or downwards as a result
* Drilling to the side when on the ground causes the drill sound to constantly restart
* CEZS's start not actually being lined up properly with the first axis means the player is not able to go backwards along the track (because the player is not actually aligned with the track properly, preventing you from touching the attached line transfer)
* trying to hug some walls such as the tall wall before the library section of CEZS allows Super Sonic to go through them

These fixes needs proper testing before this branch can be merged in, in case they accidentally break other things as a result or something.

See merge request !71
2016-05-18 07:09:05 -04:00
Alam Ed Arias
5aa48cf7ca fixed up old VS 2010 project to work with VS 2015, tested with FMOD/DirectX 2016-05-18 01:35:35 -04:00
Inuyasha
f07585191b copyright dates/statements updated and such
(no actual SLOC changes)
2016-05-17 17:42:11 -07:00
Monster Iestyn
e3dac00aa9 If player is at wrong distance from axis, correct x/y position in a similar fashion to how momentum is set for homing attacks. Don't use trig here for most cases since that just re-introduces the side drift issue and friends all over again.
This fixes the CEZS issue where the player start is not actually on the track, preventing the player from going backwards until they hit a wall.
2016-05-16 19:00:34 +01:00
Monster Iestyn
ea1cac8e24 Fix NiGHTS drill constantly starting if you're moving sideways on ground
Also disabled normal mobj friction from NiGHTS and tweaked bouncing code just in case?
2016-05-15 22:09:22 +01:00
Monster Iestyn
89ce257248 Fix all the NiGHTS issues in one fell swoop (assuming they are fixed, that is, lol)
Basically I kind of worked around any potential trig inaccuracies by not using the player position directly for setting momx/momy. This way, if player->angle_pos == player->old_angle_pos, momx/momy are zero
2016-05-14 23:57:56 +01:00
Monster Iestyn
f579a12d2c Fix up more Lua error messages to be more meaningful (and work properly, in some cases) 2016-05-14 23:52:40 +01:00
Monster Iestyn
947e8c56ec Removed redundant momx/momy assignment from NiGHTS movement code.
Specifically, the being-hit code, where P_NightsTransferPoints is called afterwards anyway
2016-05-14 22:52:12 +01:00
Alam Ed Arias
dff64b854a remove blank lines at EOF of new files 2016-05-13 00:12:51 -04:00
Inuyasha
a595f2369c fix infinite bounce rings 2016-05-12 13:52:41 -07:00
Monster Iestyn
00516e5e9f Update comment stating visplane_t size in bytes 2016-05-12 18:02:44 +01:00
Inuyasha
3235351b99 And now Lua yells at you for doing what I just fixed 2016-05-11 14:33:50 -07:00
Inuyasha
fbce35d27e cast P_Random(Key/Range) PRNG calls to INT64 to preserve old behavior
(it's still technically "undefined" behavior anyway)
2016-05-11 13:54:40 -07:00
Alam Ed Arias
a529dca69f SDL: in the SDL 2.0 interface code, we use a fake surface as our vidsurface, so we should be freeing it 2016-05-10 18:20:14 -04:00
Monster Iestyn
70a72baabc Revert texturepresent size increase, check for negative top/mid/bottom texture values so as to not go out of bounds the other way 2016-05-10 20:19:42 +01:00
Alam Ed Arias
d89890ff85 tables: slipts the loops tables into diff files 2016-05-10 10:54:59 -04:00
Alam Ed Arias
be0c062c5b Precache: fix off by one, making the precache code write into memory it should not be touching 2016-05-09 20:10:14 -04:00
Inuyasha
a9be5ba867 fixed memory issues Alam running valgrind found 2016-05-08 20:34:43 -07:00
Alam Ed Arias
398dbed4ed Merge branch 'public_next' into master 2016-05-07 11:35:05 -04:00
Inuyasha
987f65fde8 Merge branch 'demo-replay-fixes' into 'next'
Demo replay fixes

Changes made/bugs fixed in this branch:
* Replay camera is now controllable when climbing (https://mb.srb2.org/showthread.php?t=38668), and in waterslides
* localangle (read: the angle between you and the camera, I think) now doesn't change during demo replays in most situations, unless the player is in analog mode. Exceptions include zoomtubes and NiGHTS super
* Replay camera now doesn't act silly if the player is in analog mode (assuming you also recorded it in that mode to begin with, anyway)

See merge request !66
2016-05-07 06:17:39 -04:00
Nipples the Enchilada
fe20a35aee Disable camera rotate buttons if you aren't viewing yourself
They don't affect what you're viewing anyway and cause cam_rotate to get
messed up.
2016-05-07 04:51:54 -04:00
Inuyasha
1c81f192d8 it isn't settled until you add in the deprecation warning 2016-05-06 21:52:00 -07:00
wolfy852
5e50a51386 [2.1.15] Restore backwards compatibility for tan()
DO NOT MERGE THIS INTO THE INTERNAL REPO. This is a temporary 2.1.15 only fix. This commit allows an optional boolean for tan(), which when true will automatically shift angles by ANGLE_90.
2016-05-06 17:48:28 -05:00
Monster Iestyn
01debc27a2 Merge branch 'public_next' 2016-05-06 18:06:18 +01:00
Inuyasha
604ae7d072 move variable fetching from Lua out of min/max macros 2016-05-05 19:23:46 -07:00
toasterbabe
a0766fa1ec One line through selfish methods. Probably works in both Next and Internal. 2016-05-05 20:11:11 -05:00
Monster Iestyn
c8cdded81e Multiply downwards thrust on slopes by the actual "gravity" variable. Also account for mobj scale (it affects gravity added in P_CheckGravity, so it makes sense here). 2016-05-05 18:19:06 +01: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
cd877fea1f Merge branch 'next' of http://git.magicalgirl.moe/STJr/SRB2 into pub_next 2016-05-05 02:32:29 -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
Wolfy
0549ac270b Merge branch 'toast_credits' into 'next'
One more name in the credits

I probably messed up by making toast_credits based on master instead of next. If that's blocking, just delete this branch and I'll re-do it. It's a single line, though - shouldn't exactly matter so much.

Could probably stand to be merged into Internal as well, since I hadn't actually worked on any textures when we'd updated the credits there.

See merge request !69
2016-05-04 16:25:16 -04:00
toasterbabe
a4a5ac161f One line through selfish methods. Probably works in both Next and Internal. 2016-05-04 20:14:24 +01:00
Inuyasha
bd935a6a5c that should be skin2, not skin 2016-05-04 05:45:18 -07:00
Inuyasha
93a9b0cc84 update patch stuff again.
please don't make me do this again.
2016-05-04 05:43:05 -07:00
Inuyasha
652ddfef9a invalid skins when starting a local game no longer break
see https://mb.srb2.org/showthread.php?t=41370
2016-05-04 03:23:29 -07:00
Inuyasha
460620ff8a Merge branch 'gl-slopes' into 'next'
OpenGL slopes

Exactly what it says on the tin, obviously.

See merge request !68
2016-05-03 19:39:38 -04:00
Monster Iestyn
2954a43ce0 Merge branch 'next' into demo-replay-fixes 2016-05-03 15:29:57 +01: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
300275534f Merge branch 'next' into demo-replay-fixes 2016-05-03 15:10:30 +01:00
Inuyasha
8adacf7c32 update to use 2.1.15 assets 2016-05-03 06:02:52 -07:00
Inuyasha
782f6e9330 dupx and dupy are important for Lua too 2016-05-02 22:25:00 -07:00
Monster Iestyn
f0bea2cebf Merge branch 'next' into gl-slopes 2016-05-02 22:51:51 +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
Monster Iestyn
b5afc70cc8 Hack to fix DSZ2 left route waterslide: apply Red's step up changes only to slopes
that is, I believe slopes are why he added this code anyway *shrugs*
2016-05-02 17:04:28 +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
Inuyasha
bb9098b532 Merge branch 'portal-fix' into 'next'
Fix portal and plane/sky interaction

More portal-related fixes:
* Fixes rendering issue 4 from issue #21 (Slope planes render with wrong height values when visportals are visible on-screen)
* Fixes sky rendering through portals, so that the sky you see through each portal is what you'd expect to see if you were actually there. Easiest way to see what I mean is through sky 22's planet, in a map with portals at 90 degrees to the other sides respectively (the example map on the wiki for ld40, for instance).

See merge request !65
2016-05-01 22:03:37 -04:00
Monster Iestyn
2ddde83601 General improvements to Lua error messages for out-of-bounds stuff.
The idea is for the layman Lua user to understand better what range of values to use for mobj types, states, sfxs, player #s etc. Additionally, mobjinfo/states/sfxinfo/hudinfo tables all now have actual bound checks when accessing/editing them. Yikes, why didn't they have any before?!
2016-05-01 22:14:42 +01:00
wolfy852
a077be85cf Merge branch 'next' of http://git.magicalgirl.moe/STJr/SRB2 into next 2016-04-30 15:00:04 -05:00
wolfy852
969a254cb6 Remove the super float from non-Sonic characters
Should fix conflicts with Lua-scripted jump spin abilities.
2016-04-30 14:59:51 -05:00
Alam Ed Arias
be63e6b860 Merge branch 'public_next' into private 2016-04-30 11:51:55 -04:00
Alam Ed Arias
26f78de3b4 Merge branch 'master' into next 2016-04-30 11:45:11 -04:00
Sean Ryder
0eb41b4450 Flip fade mask Y coordinates
For some reason every texture and flat loaded into GL is vertically flipped
2016-04-30 13:40:00 +01:00
wolfy852
6fcb6d27fe Fix Lua not having access to timeshit
Fixes http://mb.srb2.org/showthread.php?t=41403. Not sure why nobody noticed this earlier.
2016-04-30 03:19:00 -05:00
Sean Ryder
d2d73f085d Change internal formats of screen fade texture to RGB
Don't think either of them need RGBA
2016-04-29 20:56:46 +01:00
Sean Ryder
55a1de899c The fade masks textures should use an alpha format
So they don't get effected by the texture format set by the screen depth
GL_RGB5_A1 from 16-bit was removing all alpha from the texture
2016-04-29 18:58:20 +01:00
Monster Iestyn
770fa6f924 Disable 16bpp drawing code since nothing of it is currently used anyway 2016-04-29 18:32:03 +01:00
Monster Iestyn
8fd8f2c316 Disable "splats" command unless WALLSPLATS is enabled
apparently it was never used for what exists of floor splats' code, huh
2016-04-29 18:01:05 +01:00
Inuyasha
8e753c1886 compilation fix for DEBUGRANDOM 2016-04-27 17:17:35 -07:00
Alam Ed Arias
fbd9cb73c3 Merge branch 'public_next' into private 2016-04-27 16:54:37 -04:00
Monster Iestyn
ac3de70c93 Merge branch 'slope-fixes' into 'next'
Slope fixes

This branch fixes the following slope-related physics and rendering bugs:

* Rings in multiplayer stages respawning inside slopes (even despite being able to spawn ABOVE them on map load)
* Player starts spawning players inside slopes
* Elemental flame trails not appearing if a player spindashes UP a slope; see issue #21
* Dying players "jumping" off slopes to the side if they were previously standing on one
* Some issues with FOF slope rendering
* Various issues with sprites displaying through walls adjacent to slopes

Other features added:
* Objectplace now supports slopes (this is Inuyasha's doing)
* Automap in DEVMODE now supports slopes (my doing)

Just making this merge request now rather than later, ~~in case I decide not to make any more fixes for the time being~~ (this branch doesn't seem to want to die lol), and so we can get these merged in as soon as the code's all been checked over.

See merge request !50
2016-04-26 17:21:27 -04: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
Inuyasha
b288d8a399 Merge branch 'bp_random2' into 'next'
xorshift* PRNG

This needs testing to ensure I didn't mess anything up switching function names around.

Our PRNG sucks. This is probably obvious. I wish I had known better at the time I implemented it, but oh well.

The replacement is an xorshift* PRNG variant with period 2^32 - 1 (meaning that the PRNG state will loop after four billion calls ... that's not likely to happen), versus the old PRNG's period of about 2^22 (?). The output is also much more random and less predictable; the old PRNG would fall into a predictable loop of output after about 4000 numbers were generated, which isn't much.

The PRNG here also outputs numbers as fixed point from [0,1) (that's 0 to FRACUNIT-1, in other words) instead of single bytes at a time. This makes it much easier to calculate things for, say, P_RandomRange and P_RandomKey. A new macro, P_RandomChance(p), is now in use that returns true _p_ percent of the time, where _p_ is a fixed_t probability from 0 (0%) to FRACUNIT (100%).

This doesn't affect netgames at all; the code for seed saving and restoring is identical (aside from a check to prevent seed being set to 0, which breaks xorshift PRNGs). Demos break, but A: _duh_ and B: they're already broken by all the changes to physics to accommodate slopes.

P_Random is deprecated in Lua, as the function was renamed to P_RandomByte. Aside from that, nothing special.

See merge request !64
2016-04-24 18:03:13 -04:00
Monster Iestyn
b8cc36dfd1 P_LookForEnemies should not change the player's angle until the target has been decided
This fixes a quirk with Shadow with chaos control sometimes throwing the player in the wrong direction
2016-04-22 22:28:00 +01:00
Monster Iestyn
d53801c85c Disable the corona-related consvars unless ALAM_LIGHTING macro is enabled 2016-04-21 18:50:30 +01:00
Monster Iestyn
009616e6ac Merge branch 'next' into gl-slopes 2016-04-20 20:47:47 +01:00
Monster Iestyn
ab2cadd372 Merge branch 'next' into slope-fixes 2016-04-20 20:47:11 +01:00
Monster Iestyn
ae491f1b8c Merge branch 'next' into skybox-hotfix 2016-04-20 20:46:43 +01:00
Monster Iestyn
96d329ad49 Merge branch 'next' into portal-fix 2016-04-20 20:46:13 +01:00
Monster Iestyn
dcf1ccb950 Merge branch 'next' into demo-replay-fixes 2016-04-20 20:45:43 +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
8d7edbff1a Merge branch 'next' into gl-slopes 2016-04-20 18:21:49 +01:00
Monster Iestyn
c833f3845f Merge branch 'next' into bp_random2 2016-04-20 18:18:28 +01:00
Monster Iestyn
e05951e213 Merge branch 'next' into slope-fixes 2016-04-20 18:17:14 +01:00
Monster Iestyn
d47ccb0859 Merge branch 'next' into skybox-hotfix 2016-04-20 18:16:46 +01:00
Monster Iestyn
42b281f06c Merge branch 'next' into portal-fix 2016-04-20 18:16:16 +01:00
Monster Iestyn
60ec0ff294 Merge branch 'next' into demo-replay-fixes 2016-04-20 18:15:36 +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
Inuyasha
a26989c903 brevity is a virtue or something like that 2016-04-18 21:59:33 -07:00
Inuyasha
18d5d64a4d error conditions for Lua fixed point math 2016-04-18 14:50:15 -07:00