Commit graph

442 commits

Author SHA1 Message Date
Jaime Ita Passos
2aa9bb59ef Memory management fixes
Date:      Mon Aug 9 15:57:07 2021 -0300
2021-08-09 15:57:35 -03:00
Nev3r
ab06ff011e Merge branch 'colorfret' into 'next'
Respect mobj->color while enemies & bosses flash (resolves #531)

Closes #531

See merge request STJr/SRB2!1513
2021-06-01 02:31:22 -04:00
lachablock
4e5c3566c9 Respect mobj->color while enemies & bosses flash 2021-05-22 16:52:01 +10:00
Sally Coolatta
5d93f86499 Merge branch 'next' into skin-unlocks-sanity 2021-05-08 12:55:46 -04:00
Monster Iestyn
65624bf6c0 Change numadded counter to UINT16 instead of UINT8, to allow for more sprites properly 2021-04-25 19:01:51 +01:00
Sally Coolatta
8278e621fb Removed skin->availability
Locked skins now are a specific unlockable type, instead of being tied to the skin's properties.

This has plagued custom gamedata since 2.2 launch. It's extremely obnoxious having to set aside random numbers as dummy unlockables just to ensure that Amy Fang & Metal are unlocked from the start in a custom map pack.

Other changes made to accommodate this:
 - R_GetSkinAvailabilities is now created from the list of unlockables set to skin type. (1st skin unlockable defined is (1), 2nd skin unlockable defined is (1 << 1), etc...)
- The "Added skin x" print shows up when loading addons but not at all for the base game, because the previous behavior of hiding based on if the skin was locked would now require iterating unlockables, which felt wrong to do during that stage of the loading process
 - I noticed in my test wad that Sonic&Tails would give you Sonic&Sonic out if Tails was locked. I fixed that by making both skins required to show the character select option.

Mods that reserved empty dummy unlockables for Amy Fang and Metal won't have to do anything. Mods that wanted to re-lock them behind different requirements will have to update, but in the future they will not have to be in specific slots. Additionally, now Sonic Tails and Knuckles can also be locked for mods.
2021-04-25 07:18:32 -04:00
sphere
bcd3245b76 Merge branch 'blendmode-revision' into 'next'
Blending changes

See merge request STJr/SRB2!1446
2021-04-11 08:18:12 -04:00
Jaime Ita Passos
eece82c481 Blend modes revision
This changes how blend modes render, and includes fixes.
2021-03-30 17:03:05 -03:00
Jaime Ita Passos
4025a1d517 [Software] A few floorsprite fixes
This fixes the texture of the floorsprite sometimes facing the wrong way, since plane rendering can change the view angle.
2021-03-29 23:04:13 -03:00
Lach
cf42a62b7e Merge branch 'dropdropSHAdow' into 'next'
Papersprite dropshadows no longer askance

Closes #409

See merge request STJr/SRB2!1408
2021-03-14 20:52:25 -04:00
Jaime Ita Passos
07ffe2599c Fix thing scale mismatch in R_DrawVisSprite 2021-02-28 16:23:40 -03:00
toaster
73758f50ff Fix dropshadows of papersprites drifting depending on angle relative to camera. Discovered in Kart internal for the paper item drops and ported back, hence the branch name. 2021-02-19 06:45:28 -05:00
LJ Sonic
09d911a5b6 Revert "Replace all instances of P_AproxDistance with FixedHypot"
This reverts commit 75633bde50.
2021-02-13 17:45:20 +01:00
LJ Sonic
83947d4428 Merge branch 'redundant-hypot' into 'next'
Replace P_AproxDistance with FixedHypot, and replace FixedHypot's algorithm with R_PointToDist2's

See merge request STJr/SRB2!1320
2021-01-25 18:08:25 -05:00
James R
4d6b677765 Revert "Merge branch 'plane-sorting-fix-part-3' into 'next'"
This reverts merge request !1235
2020-12-23 03:02:31 +00:00
James R
75633bde50 Replace all instances of P_AproxDistance with FixedHypot 2020-12-12 14:53:54 -08:00
James R
4ab667c6a0 Merge branch 'spritestuff2-fixes' into 'next'
Some fixes for spritestuff2

See merge request STJr/SRB2!1264
2020-11-25 19:26:49 -05:00
James R
40e954779e Resolve one last conflict in splat sorting
Can't use gz/gzt because there is no transformation to make those work
differently for splats.
2020-11-22 15:12:34 -08:00
Jaime Ita Passos
5293c52bca Remove SHORT macros for referencing patch width/height/offsets 2020-11-22 20:02:47 -03:00
James R
54da9552de Merge remote-tracking branch 'origin/next' into plane-sorting-fix-part-3 2020-11-22 14:41:42 -08:00
Jaime Ita Passos
071ec73389 Some fixes for spritestuff2 2020-11-22 03:47:15 -03:00
Jaime Ita Passos
5e890ee6f8 Merge branch 'next' into spritestuff2 2020-11-19 00:52:43 -03:00
James R
0d97903573 Do not factor height into sprite thickseg sorting 2020-11-05 18:45:52 -08:00
James R
8d63a994f0 Remove unused stuff 2020-11-05 18:45:51 -08:00
James R
81cbf35560 Check that top of sprite is above plane or bottom is below
This fixes slightly raised fofs drawing on top of sprites that should be in
front of them. Previously would check that the bottom of the object was above
the plane. Now also uses sprite offsets like the fof seg sorting does.
2020-11-05 18:45:43 -08:00
Jaime Passos
805818d48e R_DrawSplatSprite -> R_DrawFloorSprite 2020-11-04 21:43:16 -03:00
Jaime Passos
0f9d85694d Implement an "ignore colormaps" sprite rendering flag 2020-10-27 19:54:50 -03:00
Jaime Passos
b03d95c5c6 Bug fixes 2020-10-27 17:02:35 -03:00
Jaime Passos
b872222b50 Implement blend modes 2020-10-27 00:03:41 -03:00
Jaime Passos
a21685812f Rename R_DrawVisSplat to R_DrawSplatSprite, move into r_splats.c 2020-10-19 17:36:29 -03:00
Jaime Passos
dbc149f85a Remove FLOORSPLATS define 2020-10-19 17:33:16 -03:00
Jaime Passos
bf9ed39ec3 Change vis->transmap statement 2020-10-15 14:05:18 -03:00
Jaime Passos
bc3ac7615f Remove unnecessarily duplicated code in R_GetSpriteTranslation 2020-10-15 11:32:21 -03:00
Jaime Passos
3bace37a25 Don't project if rot_y is less than a single fracunit 2020-10-14 21:26:23 -03:00
Jaime Passos
bf8bb383ab Simplify the floor splat clipping code a bit 2020-10-14 21:20:37 -03:00
Jaime Passos
ab526e47cc Implement object-defined floor sprite slopes. 2020-10-14 00:57:13 -03:00
Jaime Passos
a8a66f698a [Software] Use the light at the bottom of the object for splats 2020-10-13 23:14:05 -03:00
Jaime Passos
4b7bfce95e Implement sloped floor sprites 2020-10-13 22:42:07 -03:00
Jaime Passos
4273896311 Implement relative and absolute sprite offsets for objects (mobjs)
Added RF_ABSOLUTEOFFSETS and RF_FLIPOFFSETS
2020-10-13 12:57:36 -03:00
Jaime Passos
87e5d63723 Improve sorting between sprites and floor sprites 2020-10-13 02:24:18 -03:00
Jaime Passos
95d0097df6 Improve splat sorting:
Adjust the sort scale of splats
Do splat sorting in R_CreateDrawNodes if either vissprite is a splat, instead of if both are
2020-10-13 01:45:18 -03:00
Jaime Passos
7dbd34345c Fix splat sorting 2020-10-13 01:09:17 -03:00
Jaime Passos
f2aca01e2b Fix other uninitialized variable warnings 2020-10-13 00:14:27 -03:00
Jaime Passos
831ccccdd6 OpenGL support for splats, fix some shadow draw bugs in Software 2020-10-12 19:53:21 -03:00
Jaime Passos
b620f4835a Support spritexscale and spriteyscale in OpenGL
Fix papersprite scaling with spritexscale and spriteyscale in Software
2020-10-12 17:25:18 -03:00
Jaime Passos
cc97e22e2f Changes to sprite rendering:
- Added render flags (see r_defs.h)
- Implemented floor splats
- Drop shadow sprite rendering through render flags
2020-10-12 00:13:22 -03:00
Jaime Passos
b2f45986ad Add r_patchrotation.h 2020-10-10 18:53:05 -03:00
Jaime Passos
6e5f71dd45 Refactor patch rotation 2020-10-10 18:43:26 -03:00
Jaime Passos
b15bbd505c Merge branch 'next' into patch-stuff-again-2 2020-10-10 17:01:10 -03:00
Hannu Hanhi
4f20a20165 Performance stats 2020-10-10 22:12:34 +03:00