Commit graph

45 commits

Author SHA1 Message Date
Eidolon
0dc337c9a5 Fix lots of code for clang-cl compatibility 2025-09-17 17:24:32 -05:00
toaster
4bcf7591af r_things.cpp: Fix highresscale for custom skins interacting badly with Linkdraw on the player (bubble shield, etc) 2025-09-07 21:15:40 +01:00
Eidolon
7febf53ec0 Merge public master 2025-08-23 11:34:18 -05:00
Chearii
19fdf19eb4 Add baked offset parameters 2025-08-23 11:20:14 -05:00
Oni
c2cafcdbfb Merge branch 'hitlagjitter-interp' into 'master'
Interpolate hitlag jitters

See merge request KartKrew/RingRacers!112
2025-08-23 00:24:54 +00:00
toaster
66c19015d5 Add even more missing duel hazards to the visibility exception list 2025-08-19 13:29:40 +01:00
toaster
f35d207c7f R_ThingVisible: Add missing entries/cleanup for sanity
- MT_EXPLODE is spawned by MT_RANDOMITEM on certain types of pop-in
- MT_DUELBOMB and MT_MINERADIUS are both Duel hazard visuals that were missing
- MT_FOLLOWER is added to match MT_PLAYER
- Add comments to make clear why/how we're dividing this stuff
2025-08-18 20:01:31 +01:00
Eidolon
892a6b8620 Merge public master 2025-08-12 16:49:14 -05:00
Eidolon
255570cfca Dynamically allocate skins
This avoids an issue where the skins array takes up a fixed, but large
amount of memory at runtime. On x86_64 linux, that array is roughly 80
megabytes in memory, most of which is unused when the game is unmodded.
Instead, we treat `skins` as a dynamically resizing array, and it is an
array-of-pointers into separate allocated `skin_t`.

This is based on Lactozilla's skin limit MR for SRB2, but I've rewritten
it because RR has diverged quite a bit.

This was verified to check every access of `skins` by using clangd's
find-all-references function. However, I have only tested plain skins,
not Lua addons, so that could afford some extra checking.
2025-08-12 15:33:00 -05:00
Antonio Martinez
077a3750b0 More drawpickups exclusions for snapshotmaps 2025-05-22 11:39:39 -04:00
luigi budd
2d8c10a694 Interpolate hitlag jitters 2025-05-10 21:33:06 +00:00
Eidolon
e4fc3cc5c2 Fix conditionals on rendermode to allow for more modes 2025-03-12 21:50:37 -05:00
Eidolon
cb7f437e60 Merge public master 2025-02-13 15:48:11 -06:00
Eidolon
a4d304a1f5 Update copyright years to 2025 2025-02-13 15:32:26 -06:00
Sally Coolatta
685a125b02 Try preventing players during snapshotmaps
- Try to force spectator.
- Since that doesn't seem to always work, also simply don't draw `MT_PLAYER` when not using `drawpickups`.
2024-07-26 22:59:49 -04:00
Sally Coolatta
6b87b586d2 "snapshotmaps" command
Takes two screenshots for a list of maps that have an "Alternate View Point" thing with tag 0 -- one intended for level select pictures and another for Discord Rich Presence. If no view point exists, the map is skipped.
2024-07-21 08:54:49 -04:00
bitten2up
cfacbd91be Fix implicit casts of int expecting 4-byte width
This fixes the issue with certain compilers that have int set to
different sizes by either explicitly casting or setting templates
manually
2024-05-03 17:53:53 +00:00
Sally Coolatta
7dfa597c7d SRB2 -> DRRR copyright in src, acs, android folder
Be consistent with toaster's recent changes to copyright
2024-04-05 02:08:23 -04:00
Lach
d2a53a0e64 Adjust Adventure Air Boosters for 3D models 2024-04-04 20:41:21 +11:00
James R
368bc1f634 Software: krangle directional lighting in 3P/4P splitscreen 2024-03-14 00:06:52 -07:00
Lach
8d7cc11346 Typo correction: Lightning -> Lighting 2024-03-09 19:25:43 +11:00
Lach
dd52fb7620 Disable directional lighting on Ark Arrow models 2024-03-09 17:37:54 +11:00
AJ Martinez
e0e387138f Fix signpost crashes and potential colormap fuckery 2024-03-06 15:49:43 -07:00
toaster
c299831737 Fade out characters you haven't unlocked yet in Time Attack demos exclusively
- Objects
- Minimap
All other HUD items need to be done manually, but the lives icon doesn't show up in time attack so this minimum should be fine
2024-03-05 13:33:24 -08:00
James R
c6bdf4eae3 Remove RANGECHECK, replace with devmode prints
- All code that would I_Error behind RANGECHECK, simply
  return
- Add debug prints under devmode render
2024-03-03 17:31:33 -08:00
James R
89c7e31c14 R_DrawVisSprite: comment out GAME WOULD HAVE CRASHED warning
This only meant anything to me
2024-03-03 17:27:09 -08:00
James R
27b4013c18 R_DrawColumn_Template: fix non-po2 column drawing
- Fix for efd017085
- To preserve tutti-frutti fix, offset drawing with
  texheight, but detect po2 with sourcelength
2024-02-09 19:46:45 -08:00
James R
42146c5ea2 R_AddPrecipitationSprites: fix use of th after freed
R_ProjectPrecipitationSprite may free th
2024-02-08 18:37:03 -08:00
James R
d2a22a6960 R_DrawMaskedColumn: do not draw zero length column
- Column would be zero length if there are no visible
  pixels in it.
- Trying to draw such a column results in a negative
  heightmask in R_DrawColumnTemplate and a probable read
  out of bounds.
2024-02-05 19:04:23 -08:00
James R
efd0170856 R_DrawMaskedColumn: set texheight to column length
- In R_DrawColumnTemplate, texheight is used to switch
  between a non-PO2 rasterizer and a more efficient PO2
  rasterizer.
- There is bounds checking on the non-PO2 version (in the
  form of sourcelength) but not on the PO2 version.
- texheight was set to the sprite patch height, which may
  be taller than the column (sourcelength), leading to a
  read out of bounds.
2024-02-05 19:04:23 -08:00
Eidolon
f4b4c664c4 Clamp lindex during vissprite light calculation
Mitigates against negative or very large xscale values causing lindex
to evaluate < 0, preventing a potential colormap indexing-related crash.
2024-01-30 17:02:17 -06:00
Eidolon
23b565cec5 Drop papersprite draws that are too wide
This prevents an arithmetic overflow when evaluating xscale, resulting
in a negative xscale.
2024-01-30 17:01:09 -06:00
Sal
9382031337 OpenGL sprite+model directional light 2024-01-17 12:05:12 -08:00
Oni
2c7af6e283 Merge branch 'overtime-in-skybox' into 'master'
Fix Overtime Barrier lasers appearing in skybox

Closes #881

See merge request KartKrew/Kart!1804
2024-01-13 23:09:06 +00:00
Eidolon
26017c4fdd Clamp patch column post drawing bounds
Prevents segfaults when drawing patches in certain configurations
2024-01-12 18:32:06 -06:00
James R
decf430714 Vissprites: set dc.texheight
Fixes power-of-2 detection in R_DrawColumnTemplate.
2024-01-11 02:16:01 -08:00
James R
fbb6db7167 Add RF_HIDEINSKYBOX, stop rendering object in skybox 2024-01-09 22:04:58 -08:00
James R
f43094f795 R_ProjectBoundingBox: do not use linkdraw for renderhitbox
Hitbox was not rendering for linkdraw sprites. Don't know
why, but removing this doesn't seem to introduce any
regressions!
2023-11-28 06:33:47 -08:00
Oni
94a593487b Merge branch 'fix-reducevfx' into 'master'
Fix `reducevfx` mkaing some VFX visible, when they shouldn't be

See merge request KartKrew/Kart!1622
2023-11-18 07:11:25 +00:00
James R
600aec3449 renderhitbox: shown MF_PAPERCOLLISION correctly 2023-11-15 14:48:53 -08:00
James R
5547ad5966 Add RF_REDUCEVFX, if reducevfx option is turned on, hide object for everyone except owner 2023-11-13 23:49:33 -08:00
James R
61cad641bb Invincible player punts hazardous/solid things, unless MF_ELEMENTAL
If player is in one of these states:

- Invincibility
- Grow (K_IsBigger)
- Flame Shield dash
- Over 200% speed

And the other object:

- Does not have MF_DONTPUNT

Then, touching a solid object:

- Punts the object, unless the object has MF_ELEMENTAL
- Fizzles the object, if the object has MF_ELEMENTAL

Or, when an object damages the player:

- That object is punted, unless it has MF_ELEMENTAL
- The object fizzles, if it has MF_ELEMENTAL

Punting means:

- A copy of the object is made
- Both the player and copy receive 5 tics of hitlag
- The copy is thrust away from the player at a minimum of
  60 FU, or 2x either the player's or object's momentum,
  whichever is ultimately greater
- The copy despawns after 2 seconds
- The copy flickers constantly, while thrust away

Fizzling means:

- The object disappears completely
- A puff of smoke is spawned in place of the object
- No hitlag is applied to the player

Both punting and fizzling:

- Hide the original object (intangible and invisible)
- The original object reppears after 30 seconds
- For 2 seconds before reappearing, the object flickers
  back in, but is still intangible
2023-11-13 22:18:35 -08:00
Eidolon
68a8f2b274 Multithread software drawing 2023-10-14 15:26:52 -05:00
Eidolon
0f3ede7fed Always clamp texturecolumn in sprite draw 2023-09-24 14:39:12 -05:00
Eidolon
1ffc7d7c82 r_things.c -> r_things.cpp 2023-09-24 14:30:41 -05:00
Renamed from src/r_things.c (Browse further)