Commit graph

22859 commits

Author SHA1 Message Date
toaster
6108aa3dd6 Spawn shards on UFO Catcher glass damage
Involves some code adapted from monitor.c ... I couldn't just expose it via k_object.h because the clean entrypoint was JUST too specific to Monitors
2023-04-07 22:36:32 +01:00
toaster
03049db837 UFO Catchet glass ball
Preliminary offset, no effects, but closer to complete visually.
2023-04-07 21:01:51 +01:00
toaster
8a3d225790 UFO Catcher can now carry Emeralds other than the Green Chaos Emerald
- Uses P_GetNextEmerald to determine the associated emerald. Earlier work paying dividends!
- Color selected matching Cup Select screen
- New states which can be used in other contexts
    - S_SUPEREMERALD1 and S_SUPEREMERALD2
    - S_SUPEREMERALD_UNDER
2023-04-07 19:32:46 +01:00
toaster
1f018f8d27 k_hud.c: Consistently use TC_DEFAULT instead of 0 for R_GetTranslationColormap 2023-04-07 18:03:29 +01:00
toaster
7abb2ce162 K_drawKartMinimap: Add progression meter variation
- Uses a lot of existing apparatus, just leveraged to draw horizontally instead of a full map.
- Currently only functional in Sealed Star contexts, due to K_GetCircuitLength having no clean alternative for sprint tracks.
    - Tracks Catcher/Emerald.
- K_drawKartProgressionMinimapIcon and K_getKartProgressionMinimapDistance
    - Abstracts the progress of converting distance to finish into a position on the bar.
    - Sibling function of K_drawKartMinimapIcon
        - The author of this commit wanted to make it an alternate outcome of this function, which it shares a lot of similarity with, but doing waypoint traversal in HUD for objects that don't independently track their distance would absolutely tank performance.
        - Tidying up in the main function permitted less minimap state to be used in these.
2023-04-07 18:01:50 +01:00
James R
ee55215929 Merge branch 'dedup-render-view-functions' into 'master'
Cut down on duplicated code in R_RenderPlayerView, HWR_RenderPlayerView, HWR_RenderSkyboxView

See merge request KartKrew/Kart!1148
2023-04-07 07:56:50 +00:00
toaster
e82082fd06 K_UpdateDistanceFromFinishLine: Do not destroy distancetofinish value if the player NO CONTESTed 2023-04-07 00:55:04 +01:00
toaster
0ac2541eb9 k_drawKartTImestamp: Clean up SPB Attack distance bar
- Use a minimap-like graphic for the background area
    - The goofy name comes from a delightfully awful development conversation
- Make the entire thing snap to the screen's bottom and slide in
- Fix a potential sqrt of a negative/zero value
2023-04-07 00:49:06 +01:00
toaster
ba3e6765ef K_DrawKartMinimap: Bugfixes to NO CONTEST X
- Fix Race NO CONTEST X not being colormapped
- Fix non-local players not being NO CONTEST X-ified
2023-04-07 00:39:30 +01:00
toaster
4b90a8d8bf Hyudoro: Fix an exploit where a player in first can touch their hyudotro while in first on a weirdly shaped map. 2023-04-06 21:17:01 +01:00
toaster
a6ecb25ed5 hyudoro_set_held_item_from_player
- Handles putting an object into the hyuu's inventory.
- Permits Sink conversion for items which are a little too powerful to give to someone who was JUST in first place.
    - For now, the item to convert is an SPB.
2023-04-06 21:04:38 +01:00
toaster
046ff49134 Update PROFILEVER handling to account for Rumble support 2023-04-06 20:09:42 +01:00
toaster
5349b45a09 Revert "Ignore OS key repeats for game controls"
This reverts commit 2131973ecce45690bb82ddc80a2dee2107f8362f.
2023-04-06 20:02:13 +01:00
toaster
04f371bbb4 Also permit tertiary and ... quadridly(?) gamecontrol binds for chat open, which had been silently broken for years. 2023-04-06 20:02:13 +01:00
toaster
2d175c6094 Permit tertiary and ... quadridly(?) gamecontrol binds for console open/close, which had been silently broken for years. 2023-04-06 20:02:12 +01:00
toaster
ed3ed6f189 M_UpdateMenuCMD: Enable access to screenshots/etc based on player inputs
Returns early if any of these have been added this tic
2023-04-06 20:02:12 +01:00
toaster
44bd11f95d Update new PROFILEVER to 4 to account for public/private key-related changes 2023-04-06 20:02:12 +01:00
James R
e0f999fcd7 Ignore OS key repeats for game controls 2023-04-06 20:02:12 +01:00
James R
9ca196cb89 Reset input upon exiting bind menu
While rebininding your controls:

- Do not take a screenshot if you press whichever button
  it was bound to before
- Try not to let a held button press buffer back into the
  controls menu
2023-04-06 20:02:12 +01:00
James R
80421da5b3 Replace hardcoded keys for screenshot etc with bindable controls
Renames M_ScreenshotResponder to M_ScreenshotTicker. No
longer eats events. As a side effect, these controls
cannot be used with the console open.
2023-04-06 20:02:11 +01:00
James R
d9faef58cb Add game control for lossless video recording, set default keys for gc_screenshot, etc
Renames gc_startgif to gc_startmovie.

Default controls:

- gc_screenshot - F8
- gc_startmovie - F9
- gc_startlossless - F10

Bumps PROFILEVER to 3, safely migrates existing profiles.
2023-04-06 20:02:11 +01:00
toaster
6b2558c43e Merge branch 'hardcode-assist' into 'master'
Lua info string assist

See merge request KartKrew/Kart!1127
2023-04-06 19:01:00 +00:00
Sally Coolatta
010fc344df Add equivalent of "Each Time" triggers for ACS 2023-04-06 18:05:05 +01:00
toaster
bbf2fc0b5f Merge branch 'tutorial-access' into 'master'
Tutorial access

See merge request KartKrew/Kart!1102
2023-04-06 17:02:59 +00:00
toaster
217e116bcd Merge branch 'raised-sector-culling' into 'master'
Automatic level culling for raised floors / lowered ceilings

See merge request KartKrew/Kart!1145
2023-04-06 14:42:56 +00:00
James R
bced5ecbc5 Render precip through blockmap instead of during BSP
There can be very many precipmobjs in a sector. During BSP
rendering, for each sector reached by BSP (the entire
visible level at least), all the precipmobjs would be
iterated and their distance from the camera calculated, to
determine whether they are within draw distance.

The issue with the old approach is that there really are
too many precipmobjs in each sector. By iterating the
blockmap within a certain range instead, precipmobjs
out of view are not iterated at all, saving some time.

Caveat: drawdist_precip is no longer respected as an
exact value, since it must round to the precision of the
blockmap.

List of potentially scary changes:

- Removes snext/sprev for precipmobj_t
- Removes preciplist for sector_t

- Adds bnext/bprev for precipmobj_t
  - mobj_t and precipmobj_t field offsets are symmetrical

- Modified P_SetPrecipitationThingPosition and P_SetThingPosition
  - The syntax in these functions is kind of wacky
2023-04-06 05:41:06 -07:00
James R
8955f2ead0 R_RenderPlayerView, HWR_RenderPlayerView, HWR_RenderSkyboxView: cut down on duplicated code 2023-04-06 04:47:14 -07:00
James R
5be3a6c574 R_ClipVisSprite: add SC_CULL, completely exclude sprite from sorting if it is fully clipped
The avoids wasting time sorting and drawing sprites that
are completely obscured by segs / FOFs.
2023-04-06 01:19:22 -07:00
James R
1a2dc9635b R_SortVisSprites: refactor linked list handling
What a mess! It's pretty obvious how the list is supposed
to be laid out but the old code was gross.
2023-04-06 01:19:20 -07:00
James R
7b8a564f69 Cull BSP behind a raised floor or lowered ceiling that covers the entire screen
This can effectively award the performance of a thok
barrier automatically, for walls that completely fill the
screen vertically. (Not pegged midtextures.)
2023-04-05 15:05:32 +01:00
toaster
dccd70129a Merge branch 'fix-portal-slime-trails' into 'master'
Fix line-based portal slimetrails

See merge request KartKrew/Kart!1139
2023-04-05 13:00:02 +00:00
toaster
3d5e59b986 Merge branch 'r-bsp-cpp' into 'master'
Convert r_bsp.c to C++, light refactoring

See merge request KartKrew/Kart!1144
2023-04-05 12:58:26 +00:00
toaster
d6a0f79ed9 R_CrunchWallSegment: New function name in I_Error message 2023-04-05 13:27:26 +01:00
toaster
a97f53874e Merge branch 'misc-sanitize' into 'master'
Misc fixes for memory errors revealed by -fsanitize=address

See merge request KartKrew/Kart!1143
2023-04-05 11:40:45 +00:00
toaster
0ac1768ee6 Merge branch 'new-voting' into 'master'
Split voting screen to a new file

See merge request KartKrew/Kart!1141
2023-04-05 11:28:52 +00:00
James R
d55b1b194a r_bsp.cpp: merge R_ClipSolidWallSegment and R_ClipPassWallSegment into one templated function
Prep for creating a third variant. Control flow is largely
the same between these two leveraging if constexpr seems
appropriate.

Also splits the crunch goto label away into a new function
called R_CrunchWallSegment.
2023-04-05 00:09:24 -07:00
James R
ccd5f3bfc4 Convert r_bsp.c to r_bsp.cpp 2023-04-04 23:58:58 -07:00
James R
b92bf69ce5 R_RasterizeFloorSplat: set ds_brightmap to NULL
Previously did not set ds_brightmap, so it could sneak in
from a previous span renderer.
2023-04-04 22:15:47 -07:00
James R
f087d6d865 ST_drawDebugInfo: fix displayplayers access out of bounds on startup
On startup, the cvar is not registered yet so the value
went negative subtracting from zero.
2023-04-04 22:10:44 -07:00
James R
e5d51d5a31 R_RenderSegLoop: fix FINETANGENT sometimes going out of bounds 2023-04-04 22:06:32 -07:00
James R
32ed5fe4ae Newsnapshotfile: increase array size to fit webm extension 2023-04-04 22:04:09 -07:00
James R
a469cebef7 M_DrawPause: fix iterating beyond bounds of menuitems 2023-04-04 22:01:42 -07:00
Eidolon
91a6bcf8be Merge branch 'shader-postproc' into 'master'
Shader-based postimg effects

See merge request KartKrew/Kart!1138
2023-04-04 03:37:43 +00:00
Sally Coolatta
15f60a1f14 Split thing voting screen to a new file 2023-04-03 20:57:31 -04:00
Eidolon
86dd34d807 Merge branch 'pad-rumble' into 'master'
Gamepad rumble

See merge request KartKrew/Kart!1098
2023-04-03 21:15:34 +00:00
toaster
6e819e1506 rumble2 rumble3 rumble4 typo 2023-04-03 10:37:03 +01:00
James R
4e79b4ead2 Set portal clipping in R_RenderSegLoop
Previously, line-based portals accessed global
ceilingclip/floorclip before the current seg was rendered.
This means clipping for such portals would be based on
whichever seg happened to render before. Additionally,
ceilingclip/floorclip have more to do with clipping the
visplanes than the height of the wall between (for
instance, using these values doesn't work for two-sided
lines that create a "window" between the planes). The
correct approach that should always work is using the
midtexture's height from inside of R_RenderSegLoop.
2023-04-03 01:12:26 -07:00
James R
20692de47a Replace portalline boolean with g_portal pointer to current portal 2023-04-03 01:11:57 -07:00
Eidolon
356e3317df hwr2: Do postimg in hardware
Depends on updated shaders
2023-04-02 19:46:21 -05:00
toaster
534209b519 Extras Menu adjustment (again)
- Uncomment extras_tutorial again
- Put Tutorial second after Addons, so Challenges and Statistics are next to each other again
2023-04-03 00:28:38 +01:00