Commit graph

69 commits

Author SHA1 Message Date
Eidolon
f75564371d Merge public master 2024-05-03 12:55:15 -05: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
Oni
fb9aeb3466 Merge branch 'trick-panel-controls' into 'master'
Accel press to trick

See merge request KartKrew/Kart!2332
2024-05-02 05:25:37 +00:00
AJ Martinez
c53bd19db0 Add dpad button graphic, trick reminder on failed trick 2024-05-01 01:23:09 -07:00
Eidolon
53caa21b55 Turn off water ripples when reducevfx is on
A number of people have said they have sensory issues caused by the
ripple effects from water and heat. This turns off those effects
when reducevfx is on.

It may be a better idea for this to be a separate option, but it's
a starting point we can build upon later.
2024-04-30 23:13:58 -05:00
toaster
1765e270d1 V_DrawCustomFadeScreen fallback behaviour for Legacy GL 2024-04-11 22:12:21 +01:00
toaster
7f6de407f1 Copyright update: Add Kart Krew (2024) in general for high-traffic inherited sourcefiles 2024-04-02 17:42:38 +01:00
James R
6efa35549b Refactor: separate parts of V_DrawCustomFadeScreen into reusable functions 2024-03-18 02:42:21 -07:00
James R
50339b68f5 Fix offsets for buttons in text drawing
- 1px higher with Menu font
- 2px higher with Console font
- L/R 1 px higher in general
- Fix horizontal spacing
2024-03-11 23:05:04 -07:00
toaster
3ea81d612d Fix anti-offset behaviour for non-FRACUNIT params to V_DrawStringScaled
Specifically fixes netgame chat, which was temporarily unreadable
2024-03-06 17:35:59 +00:00
AJ Martinez
deb5bfdafa Merge branch 'game-would-have-crashed' into 'master'
Remove GAME WOULD HAVE CRASHED console message, remove `RANGECHECK`

See merge request KartKrew/Kart!2002
2024-03-05 05:42:42 +00:00
James R
9a7af6c592 srb2::Draw: add fonts kRollingNum and kRollingNum4P 2024-03-04 01:42:29 -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
f917fbd199 Ignore patch X offset when drawing fonts
We don't typically use offsets for font graphics anyway.
But I had to add offsets to the console font specifically,
because the console doesn't render text with the normal
drawing functions.
2024-03-02 20:41:28 -08:00
Oni
bc80233f1f Merge branch 'vote-level-names' into 'master'
Vote level names

See merge request KartKrew/Kart!1873
2024-01-28 23:29:44 +00:00
Sally Coolatta
a7df7aa637 Add Medium Font
Monospaced in-between of Console & Thin
2024-01-27 20:38:52 -05:00
James R
510c82ca6d srb2::Draw: inherit global cliprect by default
- Let srb2::Draw be mixed seamlessly with C-style
  V_SetClipRect
2024-01-26 15:12:46 -08:00
James R
ff0a088b04 V_DrawFill (HWR2): add transparency support 2024-01-26 14:30:56 -08:00
James R
3a8a7f3cf5 Add thin timer font 2024-01-22 16:42:30 -08:00
James R
0e4222ae99 String drawing: add support for button character codes
- 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
2024-01-16 05:19:36 -08:00
James R
0d07b83896 String drawing: fix width calculation not accounting for string dance character code 2024-01-16 05:12:12 -08:00
James R
a1e4479f5d String drawing: remove support for transparency character codes
- Frees up 5-7 bit range when 8th bit is set
2024-01-16 05:03:58 -08:00
James R
6d929b6be9 V_GetFontSpecification: bunch menu font 2023-12-29 17:03:54 -08:00
toaster
d0117bc222 Bottom-mounted Dialogue
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.
2023-12-01 16:44:11 +00:00
James R.
7b3010c93d Fix many instances of splitscreen view number if there are duplicate displayplayers
- 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.
2023-10-03 21:28:33 -07:00
Eidolon
f62cf5fc83 Tracy Instrument I_FinishUpdate, software display 2023-09-18 16:18:38 -05:00
James R.
afeba341c0 Remove translucenthud cvar, let V_HUDTRANS fade in like V_SLIDEIN
- 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).
2023-09-11 18:30:40 -07:00
James R.
653db93022 V_AdjustXYWithSnap: refactor V_SLIDEIN, separate timer calculation, fix interpolation
- Move timer calculation to ST_CalculateFadeIn, cache in
  st_fadein
- Fix interpolation by using rendertimefrac instead of
  renderdeltatics
2023-09-11 18:22:29 -07:00
Sal
0675a4e527 Tally screen 2023-09-09 05:27:55 +00:00
Eidolon
78ccaf361b hwr2: upscale chosen resolution to desktop res 2023-09-01 15:30:04 -05:00
Eidolon
6f580606cd hwr2: Remove pass infrastructure
It's not worth trying to force the engine to conform to deferred
drawing.
2023-09-01 15:30:04 -05:00
James R
2e748636d7 Create V_CenteredTitleCardStringOffset
- 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
2023-08-27 15:06:51 -07:00
James R
2328ceb4bc V_TitleCardStringWidth: don't count punctuation, in order to help centering
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
2023-08-26 21:39:18 +01:00
James R
4f60d046ba V_DrawTitleCardString, V_TitleCardStringWidth: add 4P font support 2023-08-26 21:39:18 +01:00
James R
88cb0dda22 V_DrawFill: clip with cliprect 2023-08-25 17:24:13 -07:00
James R
6c0b042eed Refactor cvar definitions completely, move everything to cvars.cpp
- 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
2023-08-25 17:22:40 -07:00
Sally Coolatta
019546e846 Add server join splash
Just wanted to give literally any possibility of seeing the server contact as a client
2023-08-25 14:42:01 -04:00
toaster
e3d0662c7d Remove even a mention of the slur that once sat here 2023-07-19 21:23:27 +01:00
toaster
9b51c9c7fe V_GetHWConsBackColor: Fix for RR's console color list
Also, don't be such a weenie that you say slurs in your code comments
2023-07-18 19:52:14 +01:00
toaster
4b5612954f Scrunch up generic font by default
EXTREMELY popular, has positive effects across the entire game
Doesn't apply to console
2023-07-12 09:00:30 +01:00
toaster
e3ee8f9afa V_LevelNameHeight: Don't use strlen for possibly every iteration depending on optimisation level 2023-07-12 09:00:30 +01:00
toaster
9e4e996a5e V_ScaledWordWrap API changes
- 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.
2023-07-12 09:00:30 +01:00
toaster
4675a9b059 Fix an issue where newlines could potentially double-up when faced with whitespace 2023-07-12 09:00:30 +01:00
toaster
c5dc430b50 V_6WIDTHSPACE no longer a pitfall for using V_DrawThinString
The bunched text behaviour is now the primary mode of operation for TINY_FONT.
2023-07-12 09:00:29 +01:00
toaster
445929fac9 Whitespace at the end of a line should NOT be counted when getting V_StringScaledWidth
Second guessed this change over lunch
2023-07-12 09:00:29 +01:00
toaster
277f7c51a3 V_ScaledWordWrap
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.
2023-07-12 09:00:29 +01:00
toaster
fb0fa9ac53 V_StringScaledWidth fixes
- Don't calculate a cy that's not actually needed
- Ignore colorcodes
- Update `right` when space characters are printed, too
2023-07-12 09:00:29 +01:00
toaster
fd4c1aeec3 fontspec_t, V_GetFontSpecification
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.
2023-07-12 09:00:29 +01:00
toaster
86784ae91a Add Menu Font (without using it anywhere)
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.
2023-07-12 09:00:29 +01:00
toaster
a536f884ce V_ALLOWLOWERCASE --> V_FORCEUPPERCASE
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.
2023-07-12 09:00:29 +01:00