Commit graph

20197 commits

Author SHA1 Message Date
James R
86b8757aee devmode render: display skybox portal, visplane and drawseg counts on HUD
- Skybox portal count moved from console print to HUD
- Displays visplane count and drawseg count
2024-12-29 16:10:12 -05:00
Oni
ac2b3651ae Merge branch 'fix-column-fix' into 'master'
R_DrawColumn_Template: fix non-po2 column drawing

Closes #1033

See merge request KartKrew/Kart!1913
2024-12-29 15:58:35 -05:00
James R.
6191c392e5 Merge branch 'r-draw-column-minor-optimization' into 'master'
R_DrawColumnTemplate: minor optimization for non-power-of-2 textures

See merge request KartKrew/Kart!1854
2024-12-29 15:57:30 -05:00
Oni
5c48744842 Merge branch 'templated-drawing' into 'master'
Use C++ templates for DrawColumn/Span

See merge request KartKrew/Kart!1728
2024-12-29 15:56:33 -05:00
James R
917b549f46 Vissprites: set dc.texheight
Fixes power-of-2 detection in R_DrawColumnTemplate.
2024-12-29 15:52:35 -05:00
NepDisk
976c08d4df Fix vissprite crash 2024-12-29 15:30:50 -05:00
Sally Coolatta
397f79fcbf Use C++ templates for DrawColumn/Span
Two reasons:
- Makes it more straight-forward to add brightmaps to the non-power-of-two rendering functions.
- Made it easier to split off brightmap rendering. Hopefully improves performance, but I haven't thoroughly tested this.
2024-12-29 15:19:24 -05:00
Sal
e33fa49d5a Merge branch 'memory-tweaks' into 'master'
Hanicef allocator changes, simplified memcpy and fixed alignment

See merge request KartKrew/Kart!1530
2024-12-29 15:14:36 -05:00
Eidolon
ece92bbbc9 Convert m_misc.c to .cpp 2024-12-29 15:11:39 -05:00
James R
ac6ca8ae27 R_GenerateBlendTables: allocate copy of palette for use in thread
The palette can be freed while this thread is still
running, which means the thread would end up reading from
freed memory.
2024-12-29 14:51:25 -05:00
NepDisk
2a50e4693a Fix noencore map not getting used. 2024-12-29 14:39:06 -05:00
Eidolon
95b98700ae Add encoremap to textures-as-flats 2024-12-29 14:37:35 -05:00
James R
2a4caa9fe6 R_RasterizeFloorSplat: fix encore remap 2024-12-29 14:36:22 -05:00
James R
d062173bfc TERRAIN: add 'remap' boolean, toggles ENCOREMAP/TWEAKMAP
- Software* + OpenGL support
- *Not supported: R_DrawColumnShadowed_8
  - This has something to do with walls and FOF lights.
    However, I don't see an easy code solution and I don't
    know how to even test this.
2024-12-29 14:31:53 -05:00
toaster
db427af153 HWR_ProjectSprite: Fix messed up encore remap check (resolves #1224) 2024-12-29 14:20:05 -05:00
James R.
08e1dd870e Merge branch 'fix-map-plane-crash' into 'master'
Fix some R_MapPlane crashes in splitscreen; debugrender_visplanes and debugrender_portal; some multithreading crashes

Closes #1032 and #1021

See merge request KartKrew/Kart!1997
2024-12-29 14:15:32 -05:00
NepDisk
4fd99ef3ff Multithreaded Software rendering 2024-12-29 14:14:28 -05:00
Eidolon
fc7e04305b r_things.c -> r_things.cpp 2024-12-29 13:41:57 -05:00
James R
8bd5ca8974 Clean up code duplication around RANGECHECK in r_things.c 2024-12-29 13:40:11 -05:00
NepDisk
e138e8ad52 i_system.c -> cpp 2024-12-29 13:19:05 -05:00
NepDisk
08e30ed2cb Use thirdparty span
thirdparty libs prob shouldn't be included in src
Fix for make later.
2024-12-29 10:26:37 -05:00
NepDisk
9c01e10cde Add SPMC queue + thread pool job executor
This is by Eidolon
2024-12-29 09:27:11 -05:00
James R
d8dcb81b99 CMakeLists.txt: use libfmt from thirdparty/fmt
Now compiles on Ubuntu 22.04, which only has libfmt 8.
I don't know which exact version of libfmt we need but the
one in thirdparty works.

This version of libfmt is header-only.
2024-12-29 09:25:34 -05:00
AJ Martinez
c6f71adf56 License compliance for libwebm, libyuv, libvpx, libxmp, fmt, imgui, tcbrindle span 2024-12-29 09:19:50 -05:00
Eidolon
c42271c72e Add per-frame linear memory allocator 2024-12-29 09:13:37 -05:00
Eidolon
09d661c331 Convert d_main.cpp 2024-12-29 09:05:17 -05:00
NepDisk
b7b9fdabae Fix transparency issues 2024-12-28 09:03:39 -05:00
NepDisk
3b0e62e495 Clean up R_RenderMaskedSegLoop 2024-12-28 08:41:56 -05:00
James R
76aa677901 debugfinishline: highlight deathpits and instakill planes 2024-12-28 08:03:14 -05:00
James R
23cb7b7fa1 Let debugfinishline highlight Respawn Lines too
- Finish Lines now render with black & yellow instead of
  red & white
- Respawn Lines render with red & white
2024-12-28 08:00:46 -05:00
James R
312c4234b0 Add specialized drawing loop for debugfinishline
- Cache DBGLINE texture
- Draw this texture at horizon (player's eye level)
- Draw this texture at max brightness
- Do not slope skew this texture
- Use R_DrawColumn_Flat_8 to colorize the this texture
2024-12-28 07:58:41 -05:00
James R
92ca47e9c5 Add debugfinishline, highlight finish line linedefs and black fill solid walls
- Highlight is drawn across the screen at the horizon
  (player's eye level).
- Highlight alternates between red and white for 35 tics
  each.
2024-12-28 07:53:45 -05:00
NepDisk
c68b60a67a Fix direction dot and color 2024-12-27 14:57:48 -05:00
James R
3db50f6b6b Draw MMAPDOT in front of players' facing angles on the minimap 2024-12-27 13:19:39 -05:00
James R
85ce609374 Show waypoints on the minimap, if debugwaypoints is enabled
- Uses in level waypoint colors:
  - Green for player's next waypoint
  - Pink for shortcuts
  - Gray for disabled waypoints
  - Yellow for ego orb
  - Blue for ordinary waypoints
- The player's next waypoint appears slightly larger
2024-12-27 12:23:26 -05:00
NepDisk
6b01a279c9 Port r_main to CPP 2024-12-27 12:16:36 -05:00
James R
47f21b1402 debugrender_visplanes: highlight borders of visplanes 2024-12-27 11:55:07 -05:00
James R
637fe772f4 Add debugrender_portal command
- Fills portals with red
- Draws portals over planes and masked
2024-12-27 11:53:22 -05:00
James R
0f3a8f669b Add cv_debugrender_spriteclip, toggle sprite clipping
This cvar can be used to reveal which sprites are
technically drawn but clipped completely by level
geometry.
2024-12-27 11:52:46 -05:00
James R
179608829b Add the debugrender_highlight command, highlight specific rendering in flat colors
Software mode only.

The command is used like this:

debugrender_highlight planes sprites
debugrender_highlight pl spr
debugrender_highlight none

(Abbreviations work.)

Supported rendering to flag:

planes      - sector floor/ceiling
fofplanes   - FOF top/bottom
fofsides    - FOF sides
midtextures - pegged midtexture
walls       - sector upper/lower texture, one-sided linedefs
sprites     - sprites
sky         - skybox
2024-12-27 11:52:16 -05:00
James R
54d99f59bc Add cv_debugrender_contrast, adjusts contrast of level geometry
debugrender_contrast -1.0 to 1.0, default 0.0 (no change).
Higher values add more contrast (darkens the level), lower
values add less (brighten). Does not affect thing drawing.
Software mode only.

Adds r_debug.cpp
2024-12-27 11:48:49 -05:00
NepDisk
605b32a7cc Making Following rocks on binary work like kart v1 2024-12-27 00:52:18 -05:00
Eidolon
496fced43c Add SRB2_ASSERT, srb2::NotNull<T>
Add SRB2_ASSERT, superceding I_Assert

This assertion macro always expands to a call of srb2::do_assert, which
is overloaded with two templates: one which applies if the provided
Level is less than or equal to the SRB2_ASSERTION_LEVEL, and one which
is a no-op. When optimizations are enabled, this will verifiably remove
the evaluation of the expression in all cases, instead of evaluating the
expression and doing nothing with it.

Add srb2::NotNull wrapper utility

This is meant to be used in places where pointers are used as
parameters. It can be used with any pointer-like type, not just raw
pointers. During construction of NotNull, the pointer will be asserted
not-null in debug and paranoia builds, and in release optimizations with
no assertions, the code decays gracefully to standard pointer-passing.
2024-12-26 11:22:22 -05:00
Eidolon
a4ce6d2d07 Add Tracy client library and build preset 2024-12-26 11:09:48 -05:00
James R
23b03f6ea2 Convert r_segs.c to r_segs.cpp 2024-12-26 08:46:21 -05:00
toaster
30754dfa41 Merge branch 'raised-sector-culling' into 'master'
Automatic level culling for raised floors / lowered ceilings

See merge request KartKrew/Kart!1145
2024-12-26 08:34:44 -05:00
toaster
041bc893aa Merge branch 'fix-portal-slime-trails' into 'master'
Fix line-based portal slimetrails

See merge request KartKrew/Kart!1139
2024-12-26 08:34:28 -05:00
Oni
462a603f33 Merge branch 'hanicef-fps-counter' into 'master'
Fix inaccuracies in FPS counter

See merge request KartKrew/Kart!1456
2024-12-26 08:29:54 -05:00
Eidolon
b4f9fcb37b r_plane.c -> r_plane.cpp 2024-12-26 08:20:36 -05:00
NepDisk
4394122ac2 Don't play pop twice 2024-12-25 23:39:58 -05:00