- Bits 5 and 6 define the button state
- 0xB0 - unpressed (neutral state)
- 0xA0 - animating between pressed and unpressed
- 0X90 - pressed down
- Bits 1 - 4 define the button type
- 0x00 - up
- 0x01 - down
- 0x02 - right
- 0x03 - left
- 0x07 - R shoulder
- 0x08 - L shoulder
- 0x09 - start
- 0x0A - A
- 0x0B - B
- 0x0C - C
- 0x0D - X
- 0x0E - Y
- 0x0F - Z
- Button offsets and dimensions tweaked to my own taste
Makes the drawer more complicated, but the benefit for most circumstances is significant.
In non-splitscreen contexts, pushes V_SLIDEIN|V_SNAPTOBOTTOM HUD elements upwards when the Dialogue is open.
- 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).
- V_TitleCardStringWidth no longer has the special case
for punctuation, moved to this function instead.
- Handles both leading and trailing punctuation, and even
spaces.
toaster-assisted, thank-you-toaster
Punctuation, like ellipsis, normally offsets the centered
position of text. But this looks subjectively weird. By
not counting it, punctuation is basically allowed to
extend further off to the sides.
The difference looks like:
CENTER
||
\/
||
OLD: | TOO LATE... |
||
NEW: | TOO LATE... |
||
/\
||
CENTER
- No need to call CV_RegisterVar
- Cvar definitions live in only one file, easier to locate
- Organized into sections -- netvars, cheats, etc.
- Use builder pattern to initialize cvars
- Still need to extern if you want to read the cvar value
- The function is back to producing zone-allocated memory copies, like its precursor V_WordWrap
- The author of this commit got rid of that dependency originally because it seemed like a fair part of the API, and meant static buffers could be used in certain circumstances, but it was necessary to revert for the following change.
- Newlines can now be inserted mid-word, treating the width provided as ironclad except in the case of single characters wider than the region.
- This will be necessary for future work with the in-game chat.
- Reserves 8 characters at first, then Z_Reallocs double that every time it runs out.
Moves WordWrap to the font/V_GetFontSpecification system.
Much healthier long-term for our purposes, including the possibility of changing fonts for various contexts freely.
Reduces quantity of copypasted code between V_StringWidthScaled and V_DrawStringScaled to far more manageable "this is an inner loop and cannot be abstracted" levels.
Guarantees consistency in handling across existing and future functions.
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.
Adds the additional font. This requires a little cleanup before we can use it as the primary menu font, but worth at least putting this in the relevant places for later.
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.
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.
- V_CharacterValid
- Makes checks for valid character drawing consistent and cleaner
- If a case isn't being forced, characters that can have case applied but don't exist will attempt to draw their other case.
- V_DrawCharacterScaled
- Saner core function that doesn't overload the character provided
- Previous terrible is supported for now via backwards-compatible shim function
- Catcher comes down to grab your selection. (Needs per-player arrows, as discussed last night.)
- Catcher has more accurate rainbow cycle. Just looks a bit cleaner.
- Vote thumbnails now have outlines & dims, instead of transparency.
- Put voting roulette code into its own struct.
- Sped up voting roulette. (although it's not visible currently)
- Made modify vote stricter (kick hacked clients trying to do funky stuff)
- Added VOTE_TIME_WAIT_FOR_VOTE define. If enabled, voting timer will only start when any player gives a vote. Currently disable because it'd be exploitable without mid-game vote joining.