Commit graph

660 commits

Author SHA1 Message Date
Inuyasha ef4aad3655 Merge branch 'monster's-miscellaneous-meddling' into 'master'
Monster's miscellaneous meddling

A miscellaneous assortment of code-cleanup and other changes, plus fixing up SRB2's tangent array so it behaves more as expected (especially on the Lua side).

More specific details of the changes:

(MUST-HAVE CHANGES)
* `finetangent[]` has been entirely redone in the same manner as finesine/finecosine.
* Lua's tan() function shifts `finetangent[]` results by `ANGLE_90` to get what you EXPECT it to return (e.g. `tan(0)` actually returns 0 now). This means finetangent itself doesn't need to change its general arrangment, this only affects Lua specifically.
* Lua's tan() function now also doesn't go out of `finetangent[]`'s bounds at all. Before, `tan(ANGLE_180)` through `tan(ANGLE_MAX)` and such would just give you values unrelated to the array in question, which was clearly a bad thing.

(CAN PROBABLY LIVE WITHOUT?)
* `finecosine`'s definition moved from r_main.c to tables.c.
* Created `P_CheckTimeLimit` for `cv_timelimit`, much like `cv_pointlimit` has `P_CheckPointLimit`. It cleans up `P_UpdateSpecials` a bit at least.
* Some code cleanup relating to translucency maps - these are kind of unimportant, I was about to stop `FF_TRANSMASK` being used everywhere, but this was apparently a bad idea so I backtracked a bit.
* Re-added `_MSC_VER` check around MSVC-specific code in doomtype.h, in case it wasn't defined (and `__OS2__` was). Also left a comment there regarding `__BYTEBOOL__`.
* Fixed an apparent copy+paste goofup in `joyaxis_cons_t[]` for the Wii-specific code.

See merge request !10
2016-01-13 22:22:53 -05:00
Inuyasha 437b0ac692 Merge branch 'reduced_palette' into 'master'
Reduced palette

You guys should know what this is by now. If you don't, you really need to catch up. =P

We should check with toaster and others involved to check this thing is actually ready to go though, the number of changes to the palette itself over the last year has been absurd.

See also http://git.magicalgirl.moe/STJr/SRB2Internal/issues/8

See merge request !13
2016-01-13 21:03:12 -05:00
Inuyasha 08cb91d5f0 Merge branch 'inu-misc' into 'master'
Yeah, whatever, this is changing stuff that was already all my own
anyway, and I already extensively tested it in the *first* place
when I was measuring the amount of time it took.

Honestly this could be merged into public master, but pfft...

See merge request !19
2016-01-12 23:09:25 -05:00
Inuyasha e18f467885 Further optimization of fading code because I'm crazy
The less branches, the better.

Optimization is a bitch, you know.
2016-01-08 08:16:16 -08:00
Inuyasha 1ba005c511 Fixed crash on Deton explosion.
(Detons need deathstates, otherwise they are removed partway through exploding. Not fun.)
2016-01-04 01:34:56 -08:00
RedEnchilada 3e93ec21a1 Make internal slope functions static and remove from header
I hate merges. Why do things keep getting undone?
2016-01-03 18:25:45 -06:00
Inuyasha 537ab87add Merge branch 'dispoffset-changes' into 'master'
Dispoffset changes

Dispoffset now works in OpenGL, and the feature has been optimized so high dispoffset values don't cause sprites to be distorted anymore.

See merge request !12
2016-01-03 18:31:20 -05:00
RedEnchilada 0c6aaf87d5 Merge branch 'next' 2016-01-03 10:35:12 -06:00
RedEnchilada 6929b6fe4b Make internal slope functions static and remove from header 2016-01-03 10:33:45 -06:00
Monster Iestyn 8cad9a6dc8 We can compile the slopes code now, yay! My brain hurts.
Compiling errors fixed in this commit:
* Various cases of mixed declaration and statement code
* Implicit declaration of slope functions (read: you forgot to put "include "p_slopes.h" in MORE than a few places)
* an odd case of a bad fixed_t to float typecase, cause by using P_GetZAt directly inside FIXED_TO_FLOAT
* a few minor cases of bad unsigned-signed comparisons
* no prototypes for some of the new slope functions. For goodness sake Red, this is basic stuff!
2016-01-03 10:30:36 -06:00
Monster Iestyn b043520411 NextLevel for level headers can now take the special strings "Title" "Evaluation" or "Credits" in place of their usual numbers (optionally, that is) 2016-01-03 10:29:53 -06:00
Inuyasha 377ac988d6 Merge branch 'dehacked-changes' into 'master'
Dehacked changes

TITLE, EVALUATION and CREDITS are now valid options for a level header's "NextLevel" parameter. All works fine last I tested this feature.

See merge request !11
2016-01-03 09:36:01 -05:00
Nipples the Enchilada 0a0f16a001 Merge branch 'actions-tweaks' into 'next'
Actions tweaks

This just rewrites the action A_SetTargetsTarget currently, dunno if I'll bother to tweak any more actions in the near future \*shrugs\*

That said, PLEASE check whether the action works properly before accepting the merge. It's been a while since I last did anything with this branch, so I forget entirely whether I tested it or not.

See merge request !27
2015-12-30 14:45:37 -05:00
Monster Iestyn e0e9c7c172 Added missing SHORT macros around these variables, they're needed for big-endian builds to use these properly
...I'm to blame for this particular slipup as it happens, surprise surprise
2015-12-01 22:38:57 +00:00
Monster Iestyn bb9488f2a2 Removed a few old OpenGL-specific hacks that compensated for lack of dispoffset
(I won't touch overlays for now)
2015-11-23 21:04:33 +00:00
Monster Iestyn 30ef257050 dispoffset now works in OpenGL 2015-11-23 17:01:10 +00:00
Monster Iestyn f6eac1a6ac large dispoffset values no longer cause sprites to be distorted
more detailed description: vissprites now store dispoffset in a separate variable from (y)scale, and uses it to influence order between sprites without it affecting the actual drawing of the sprites themselves
2015-11-23 16:39:32 +00:00
Yukita Mayako 2b6e65f122 Added missing comma to COLOR_ENUMS string array after "ROSY".
It's not SKINCOLOR_ROSYSUPER1, after all.
2015-11-09 16:45:35 -05:00
Yukita Mayako ca7151f1c2 Merge branch 'master' of git@git.magicalgirl.moe:STJr/SRB2Internal.git into reduced_palette
Conflicts:
	src/dehacked.c
2015-11-09 14:34:26 -05:00
Monster Iestyn fed463f1d2 NextLevel for level headers can now take the special strings "Title" "Evaluation" or "Credits" in place of their usual numbers (optionally, that is) 2015-11-08 17:50:05 +00:00
wolfy852 5409367a5f Define TRANSPARENTPIXEL as 255 in asm files 2015-11-07 15:32:11 -06:00
wolfy852 1ed5407821 update stuff 2015-11-07 13:56:21 -06:00
Monster Iestyn 77f118dd2f Removed dummied-out Pope XVI code 2015-11-06 14:23:06 +00:00
Monster Iestyn b94fc008ab doomtype.h tweaks
some of the mess in here really bothers me
2015-10-21 16:01:16 +01:00
Monster Iestyn ac24ce234f If this isn't an accidental copy+paste then I'd be very surprised 2015-10-21 15:40:59 +01:00
Monster Iestyn e0deaaf3ff From what I can tell, correcting this one value in finetangent[] shouldn't cause any harm at all, so... 2015-10-21 15:32:50 +01:00
Monster Iestyn 98ad63eb06 Partial undo of what I did last commit to make Inu happy again.
Note: polyobj_t's "translucency" is apparently a SIGNED integer, so in theory it's possible to get polyobj flats to use the "spanfunc = splatfunc" line using negative values. If this is not meant to happen, this should probably be fixed asap
2015-10-12 15:10:43 +01:00
Monster Iestyn 165aec3d34 FF_TRANSSHIFT is meant for transmaps linked to states, not anything else!
I'm surprised how the source code flew in the face of this fact for so long and just used it everywhere, that's just silly.
2015-10-11 22:23:40 +01:00
Monster Iestyn 08c0c7676c Since cv_pointlimit is handled in P_CheckPointLimit, I've just created P_CheckTimeLimit for cv_timelimit.
It helps make P_UpdateSpecials less messy-looking anyway.
2015-10-11 21:01:04 +01:00
Monster Iestyn a9b96a1668 Replaced the old finetangent[] with a new more accurate one I made using a Python script.
Actually uses 0 and 65536 now! (and also INT32_MIN)
2015-10-11 14:05:05 +01:00
Monster Iestyn fdc2c3adcd Fix up lib_finetangent so tan() returns values starting from "0" in Lua (finetangent itself hasn't been touched)
Also fixed how the function went out of the array's bounds for ANGLE_180 and above (or negative angles)
2015-10-10 21:21:16 +01:00
Monster Iestyn d4976d677f Move finecosine[] declaration to where it really belongs in the source code 2015-10-10 20:30:29 +01:00
Alam Ed Arias 79aaa00d14 Merge remote-tracking branch 'private/slopes-compile-fix' into private 2015-10-10 14:20:43 -04:00
Monster Iestyn 368b458eee We can compile the slopes code now, yay! My brain hurts.
Compiling errors fixed in this commit:
* Various cases of mixed declaration and statement code
* Implicit declaration of slope functions (read: you forgot to put "include "p_slopes.h" in MORE than a few places)
* an odd case of a bad fixed_t to float typecase, cause by using P_GetZAt directly inside FIXED_TO_FLOAT
* a few minor cases of bad unsigned-signed comparisons
* no prototypes for some of the new slope functions. For goodness sake Red, this is basic stuff!
2015-10-10 17:57:35 +01:00
Alam Ed Arias 6cde169c58 Merge branch 'public_next' into private 2015-09-26 22:10:59 -04:00
Nipples the Enchilada 93c31b5b72 Merge branch 'angles' into 'next'
FOF slope/ground slope weirdness fix

Solves STJr/SRB2Internal#26 .

See merge request !26
2015-09-26 18:51:34 -04:00
RedEnchilada 773e5fbda6 Fix sloped FOF/ground weirdness ( STJr/SRB2Internal#26 ) 2015-09-24 15:35:55 -05:00
Alam Ed Arias 6ad1086128 Merge branch 'public_next' into master 2015-09-03 15:58:16 -04:00
Alam Ed Arias 3917b02132 Merge branch 'angles' into 'next'
Slopes and stuff

Adds support for slopes, slopes on FOFs, slopes on translucent FOFs, slopes on FOFs with holes in the flat, slope physics, dynamic slopes, vertex slopes, dynamic vertex slopes, and a ham sandwich to the game. Only for software mode right now, though. (OGL still gets the physics and the sandwich.) Some things still need to be done, but for now this can be merged in to be finished later.

Please make sure nothing in the vanilla game breaks before giving the thumbs up for this merge.

Since this doesn't merge automatically, if the code review turns out positive and nobody else has done it, I'll handle the merging.

See merge request !22
2015-09-03 15:57:01 -04:00
Alam Ed Arias eb4de823e9 Merge branch 'public_next' into master 2015-09-03 13:55:29 -04:00
Alam Ed Arias 04c1a507ba Merge remote-tracking branch 'public/hotfix-hook_NetVars' into next 2015-09-03 13:54:12 -04:00
Yukita Mayako 52e2087ee7 Fixed NetVars hook mistakenly assuming index starts from 0. 2015-09-03 13:13:55 -04:00
Alam Ed Arias f43a7e09eb Merge branch 'F-key-menu-hotfix' into 'next'
F key menu hotfix

Fixes the issues shown here: https://mb.srb2.org/showthread.php?t=40754

See merge request !23
2015-09-01 22:58:13 -04:00
Monster Iestyn 775ccde424 Add M_Options(0); to F4/F5/F7 code to prevent them going to Main Menu instead of SP/MP pause menus when the latter should be shown 2015-09-01 22:56:45 -04:00
Monster Iestyn 0f038f9a3b Add M_Options(0); to F4/F5/F7 code to prevent them going to Main Menu instead of SP/MP pause menus when the latter should be shown 2015-09-01 12:45:26 +01:00
RedEnchilada 9155fd6c14 Fix unexpected behavior with colormaps in sloped sectors
To be specific: when a sector had a sloped ceiling and a colormap was
placed above it, the colormap wouldn't fill anything above where the
ceiling height is at the sector's midpoint. This is fixed.
2015-08-24 22:09:19 -05:00
Yukita Mayako 7092a24acd Merge branch 'new-animations' into 'master'
Oops. (Minor animation bugfix I forgot.)

Apparently I pushed this one commit to GitHub instead of SRB2Internal before the branch was merged...

Oops.

See merge request !8
2015-08-22 10:05:02 -04:00
Yukita Mayako 2fb03a7cff Merge branch 'next' of git@git.magicalgirl.moe:STJr/SRB2.git into angles
Conflicts:
	src/p_map.c - Automatically resolved by mergetool
2015-08-22 09:52:11 -04:00
Alam Ed Arias 96c71c68c8 remove NEED_FIXED_VECTOR and fix angelchk testcase 2015-08-21 21:27:20 -04:00
Alam Ed Arias c64e4d58b7 git warning: new blank line at EOF 2015-08-21 20:47:00 -04:00