Commit graph

20169 commits

Author SHA1 Message Date
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
James R.
4e48fbd140 R_GenerateTextureBrightmap: install bounds checking on patch columnofs
- Warn if reading past end of patch data (corrupt lump or
  incorrect format).
2024-12-25 23:32:42 -05:00
James R
5a6ddbd110 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.
2024-12-25 22:46:54 -05:00
NepDisk
33035ea488 Make r_bsp CPlusPlus 2024-12-25 22:46:22 -05:00
NepDisk
2dd08d435f Remove debug print 2024-12-25 21:41:49 -05:00
NepDisk
1dda8c1b6d Actual fix making the game properly record and see ghosts in menu and game
It also adds a new little thing to the name to show what gamemode its in!
2024-12-25 21:36:52 -05:00
NepDisk
aef779ef24 Fix ingame ghosts 2024-12-25 18:56:37 -05:00
NepDisk
561018c26c Fix ta demos not writing
This doesn't fix them not showing up during TA but one step at a time
2024-12-25 17:50:43 -05:00
James R
4a2b18b981 Line sweep polyobject sides
Gremlin III vanquished for Balloon Park elephants.
2024-12-25 13:32:23 -05:00
James R
5cb20f5480 P_TryMove: sweep collided lines to find nearest normal 2024-12-25 13:30:59 -05:00
James R
b50d34e8b5 Add srb2::sweep, AABB line sweep algorithms 2024-12-25 13:21:23 -05:00
James R
c2949ae031 Add srb2::math, fixed-point, vector, line and slope formula classes
- srb2::math::Fixed
  - Operator overloads for FixedMul and FixedDiv
  - Implicit conversion between fixed_t, Fixed and
    floating-point types
- srb2::math::Vec2
  - Template to any type
  - Operator overloads for arithmetic operations
  - Convertible between different types
- srb2::math::LineSegment
  - Template to any type
  - Holds two Vec2 instances
  - Sorting methods and vertical/horizontal test
- srb2::math::LineEquation
  - Slope formula from LineSegment
  - y method to find y from x
  - Intersect algorithm
  - Fixed-point specialization to avoid overflows
- srb2::math::LineEquationX
  - Inherits LineEquation
  - x method to find x from y
2024-12-25 13:03:50 -05:00
NepDisk
cf313e1673 Fix erronous use of ML_BLOCKPLAYERS in P_Setup.c 2024-12-20 13:40:16 -05:00
James R
7e9e259da3 Replays: reserve 1 KB of space at end of buffer as a safeguard
This should avoid buffer overruns in the middle of
recording. There is already code that checks for buffer
size around ticcmd and ghost data write. Demo header is
still unsafe with many WAD filenames written, for example.

Ghost data and ticcmd should not come close to reaching
into this extra space. At the time of writing, ghost data
can write up to 102 bytes and ticcmd 20 bytes, per player.
2024-12-20 13:20:38 -05:00
Eidolon
f9c231a77c Defer ghost deallocation til FreeGhosts
Fixes KartKrew/Kart#824

The for-loop attempts to read `g` after the object it points to has
already been freed by Z_Free. Instead, we add a new `done` field, and
mark it when hitting the end of the demo, and skip ghosts in the ghost
list which have it set.
2024-12-20 12:53:45 -05:00
James R
061c98a7d2 G_WriteAllGhostTics: check buffer size after each player's ghost data
Instead of checking it after ALL player ghost data. This
is less likely to write past the end of the demo buffer.
2024-12-20 12:46:34 -05:00
NepDisk
eac15b8542 Display gamespeed regardless of gamemode and make itembreaker uses normal speed
Since battle speed is a thing now, this makes sense
2024-12-19 12:36:25 -05:00
NepDisk
52a02c40e5 Fix music file names for titlescreen and credits 2024-12-18 00:41:44 -05:00
NepDisk
389acf3020 Fix Item Breaker timelimit 2024-12-18 00:35:13 -05:00
NepDisk
f996d869db misc fixes
Fix time limit, disable mobjscramble, fix paranoia compile, clean up refernces code, fix driftdust negative refernces
2024-12-17 23:53:51 -05:00
NepDisk
3622b78b3e Readd SPB karma modes, remove every hit rewarding bumpers, allow flashtics again 2024-12-17 17:57:47 -05:00
NepDisk
8dcaba2d43 Basic work to restore the wanted system 2024-12-17 10:54:22 -05:00
NepDisk
a5b76597eb Remove Shpereboxes 2024-12-17 10:29:53 -05:00
NepDisk
7bdf9633bc Remove emeralds from battle 2024-12-17 10:13:09 -05:00
NepDisk
e1720e7b3a Remove overtime stuff 2024-12-17 00:47:36 -05:00
NepDisk
4b1324da69 Remove Battle capsule stuff and turn it into Item Breaker
You have to smash every itembox in a map as fast as you can. When you mash you get a pogospring and waiting gives a sneaker
2024-12-17 00:24:20 -05:00
NepDisk
1e678f660f Remove TESTERS and HOSTTESTES and use v1 assets where applicable 2024-12-16 14:23:14 -05:00
NepDisk
9dee047420 Minor fixes 2024-12-09 17:21:46 -05:00
NepDisk
33e0954002 Revert 'Remove FIN'
This reverts commit d970747c85.
2024-12-09 17:21:46 -05:00