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.
- Empty `demo.titlename` case
- Don't try to save demo of name `.lmp`
- Doesn't fall back to anything, because emptying out the name field can be reasonably treated as not wanting to save
- `demo.titlename` consists only of invalid characters
- Don't try to save demo of name `-.lmp`
- Falls back to the default demo title, because the user clearly wanted to save and just happened to provide invalid text
- V_SLIDEIN: For (G_IsTitleCardAvailable == false)/(versus at map start == true) contexts, use timeinmap instead of leveltime
- Don't reset timeinmap when reloading gamestate, so it's more functionally equivalent to lt_ticker
These two changes also fix the hypothetical issue of titlecard-less custom gametypes having weird HUD state on late netgame join.
Timeinmap is exclusively used for HUD, as is st_fadein. timeinmap also doesn't increment under g_fastforward, therefore the best candidate to tie together
- 1P
- "-Watching-" in thin font
- Player name in free play font
- 2P
- Player name in free play font, transparent
- 4P
- Unchanged (player name in thin font, transparent)
- Remove V_HUDTRANS (Tally makes it fully transparent)
- Embed button codes instead of drawing them separately (fixes minor alignment issues)
- Fade in over 1 second (visual flair)
- When a nextmapoverride is in play, do not insert the just-played map into the GP Rank
- Put all the behaviour that determines which Round icon to show in exactly one places
Also, fix a bug where it would show the skin realname for a spectating player's tally instead of the ROUND text.
- Gametypes have "GPpic" and "GPpicMini" parameters
- These are shown in contexts where a Round Number would be shown in GP, but an eventmode is under way.
- Instead of having different rules to show up on the pause menu, titlecard, and tally/intermission...
- Pause Menu Roundqueue, Tally, and Intermission have all been aligned to the same rules.
- As long as the titlecard is standard, it will show the GP Pic per those rules. (GTR_SPECIALSTART and GTR_BOSS still have their unique behaviour here)
- Avoid iterating displayplayers to find view number and
prefer R_GetViewNumber.
- Iterate over all matching displayplayers if necessary,
instead of stopping at the first match.
- V_HUDTRANS does not fade if combined with V_SLIDEIN
(since sliding elements are not supposed to fade).
- If not V_SPLITSCREEN, uses most opaque fade value among
splitscreen players (since Tally will fade back out for
specific players).
TODO: This is steenky.
Essentially immediately tint the geometry and players the latest possible place it is safe to do so, with the magic of the software-exclusive fade.
This would ideally be handled with a shader so that GL and any future hwr2-native renderer can get in on the action too.
(This commit does not compile. Sound test and tunes
command code needs to be ported after this.)
This is a big one. Here's the rundown:
The old music system was very direct, much of the time
just a proxy to the real sound API in i_sound.h.
You could change the music on command, but there wasn't
a consistent way to prevent some music from playing over
others. P_RestoreMusic is one example of needing to
address this problem. The jingles system was intended as
another solution. Furthermore, sound test (Stereo) has its
own needs.
I am removing all of that. Music handling in general is
now a very deliberate system, kind of similar to jingles.
In the new system, "tunes" are registered. The tune stores
info such as whether it should loop or fade out. Most of
the configuration is intended to be initialized only ONCE.
Tunes can be mapped to an actual music lump. They can be
remapped at any time too.
Tunes are also configured with a priority number. This
determines which tune is heard, if multiple are supposed
to be playing at a time. You can even tell a tune how long
it should play, so it's unnecessary to track this with
bespoke timers.
Content of commit was originally written by Sal, but as a monolithic commit. The author of this commit is chunking it up for easier review.
Simple inversion on the face of things, but with a long tail of consequences, including 19 changed files.
Forced uppercase has been applied in a handful of locations where it was aesthetically imperative. Most menus will follow in another commit, so that that may be reverted if we change the default menu font.