Commit graph

522 commits

Author SHA1 Message Date
toaster
23f479f365 Intermission - DUEL mode
Show players' appearances on intermissions with less than or equal to 2 players, in port priority order, to mimic Sonic 3 Competition.

Also shows player letter and profile name in Match Race, to really drive the reference home.
2023-07-26 14:31:50 +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
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
toaster
e235f29dfe Sounds for Roundqueue Board, which is what I've decided I'm calling the thing at the bottom of Intermission under roundqueue conditions now
- Landing sound when doing a hop (uses a Knuckles Chaotix sound, maybe temporary)
- Meter fill sound when checking Rank for Sealed Star
- Stopping early when Rank is too low (same sound as Landing, potentially temporary if someone gets inspired)
2023-06-09 18:39:00 +01:00
toaster
36191fa4db Y_PlayerStandingsDrawer: Add slide in from bottom of screen for Pause
In the process makes all y coordinates in the function relative to a base y, so it's less fragile to future maintenance.
2023-06-07 17:46:20 +01:00
toaster
6ae7f1f64f Y_PlayerStandingsDrawer: Fix showing invalid data increase text on tab rankings after an SP intermission 2023-06-07 17:46:20 +01:00
toaster
4dfa74796a Merge branch 'podium-music' into 'master'
Podium Music + rank fixes

See merge request KartKrew/Kart!1270
2023-06-05 14:41:42 +00:00
toaster
3c505e2676 K_UpdateGPRank
- The previous location for updating grandprixinfo.rank.position and grandprixinfo.rank.skin was too early.
    - K_GetPodiumPosition checks player->score
    - Y_StartIntermission calls Y_CalculateMatchData
    - Y_CalculateMatchData checks K_CalculateGPGrade... which uses invalid position info to determine grade!
    - Y_CalculateMatchData updates player score
- To this end, rearrange Y_CalculateMatchData to accomodate.
    - Calls K_UpdateGPRank.
    - Then, calls K_CalculateGPGrade.
- Also called after G_UpdateVisited if no intermission occours, for general consistency.
- In addition, adjust so earlier players have port priority for skin saved to gamedata.
2023-06-03 14:11:14 +01:00
toaster
0bec8317f3 Y_DetermineIntermissionType: Make this function the sole authority on whether an intermission occours or not.
A return to cleanliness in G_DoCompleted.
2023-06-02 20:51:48 +01:00
toaster
569ec11624 Y_PlayerStandingsDrawer: Show the points increase(/decrease)
Shows in the same position as ping.
Also, pushes the results slightly closer together horizontally if ping/increase is visible.
2023-05-17 15:40:08 +01:00
toaster
6711887179 Y_IntermissionDrawer: Improved header string handling
- Center generalised text without the "got through round" backing
- For spectators observing a Round Queue, show "ROUND (n)" at the top instead of the more generalised fallback strings
2023-05-15 17:47:39 +01:00
toaster
33bec3c99c Y_IntermissionDrawer: Draw the foreground border on widescreen resolutions
Also changes the position of the Replay Save message to not get cut off
2023-05-15 17:41:29 +01:00
toaster
de22fc8ff1 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into profile-restrictions
# Conflicts:
#	src/hu_stuff.c
#	src/y_inter.c
2023-05-12 13:42:50 +01:00
toaster
9179e6fd86 Since intermission is bordered, don't do widescreen accomodation for the Standings xoffset slide 2023-05-11 23:12:57 +01:00
toaster
39682a241d Y_PlayerStandingsDrawer: Set a minimum y height to prevent overlap with the header text 2023-05-11 23:08:26 +01:00
toaster
c9b438d50d Show Round Queue on Pause menu
Also includes secret support for widescreen.
I was planning to put this on tab rankings, which doesn't have borders.
Pause menu does, but it would be a waste to strip it back out again.
2023-05-11 22:44:09 +01:00
toaster
c1eb01c03d Ping for Y_PlayerStandingsDrawer
TODO: CPU indicator
2023-05-11 21:39:06 +01:00
toaster
7081e98d9b Y_PlayerStandingsDrawer: Abstract y_data_t inputs
In the process, fix a longstanding interp bug where the jitter on tally increase would be for only one rendered frame, not one full tic.
2023-05-11 18:09:57 +01:00
toaster
efa849c8cc Y_PlayerStandingsDrawer: Make player index referencing in loop cleaner 2023-05-11 16:46:03 +01:00
toaster
c712cd7452 Prepare value string for intermission screen once, rather than every rendered frame
("RETIRED.", "0:24:13", "27", "1004", "----", etc)
2023-05-11 16:37:06 +01:00
toaster
77aa563a74 Depointerify several properties on y_data
- character is written directly
- color is written directly
- no more duplication of the player_names pointer
2023-05-11 16:36:03 +01:00
toaster
d581389c9c Y_PlayerStandingsDrawer: All local splitscreen players are now highlighted on the results screen
- Uses function pointers to highlight display players instead in demo playback
- Was previously doing this to avoid all players being highlighted in local splitscreen, but this is now relevant there too thanks to bots
2023-05-11 14:44:27 +01:00
toaster
0757d39930 Slight cleanup after extraction
Fixes Lua being able to hide the timer in the corner
2023-05-11 14:32:41 +01:00
toaster
7ddbd23f98 Y_PlayerStandingsDrawer
*Also* reduces how absolutely monolithic Y_IntermissionDrawer is.
2023-05-11 14:24:49 +01:00
toaster
0a7e8d9bf3 Y_RoundQueueDrawer
Reduces how absolutely monolithic Y_IntermissionDrawer is.
2023-05-11 14:08:09 +01:00
toaster
e3c3a8c80a Sliding of the progression bar
- On the last non-rank-restricted round in the queue, if the final entry is visible (you've been to it before OR you're just about to go to it for the first time), slide over before the bar fills up.
- Adds one second to the timer to give it extra breathing room
2023-05-10 20:40:01 +01:00
toaster
174b58c043 Pixel perfect progression bar filling
- Final line now ALSO uses ClipRect
- Reduce existing overreliance on ClipRect. A little overdraw is fine to prevent gaps
2023-05-10 14:42:59 +01:00
toaster
d0daa09637 Interpolation of the Player Pin when moving to new round
- Known hack: A one-frame offset if R_UsingFrameInterpolation() returns true
    - This permits the Sealed Star rank progression bar fill to reach the end.
    - It also allows us to match possible sound cue events between interp and non-interp frames.
2023-05-10 14:42:59 +01:00
toaster
cc4dbe48cf Adjust timing of player pin hop impact 2023-05-10 14:42:58 +01:00
toaster
db5734b64d On second thoughts, do not make the one-round roundqueue start in the upward position
This is so the two-round roundqueue condition where the second round is a Sealed Star will not give the game away early, or be discontinuous
2023-05-10 14:42:58 +01:00
toaster
b4a1b7daf3 Fix horizontal page scroll for cases where player results are centered 2023-05-10 14:42:58 +01:00
toaster
f42192f21d data.mainplayer
Instead of using whiteplayer (which isn't handled in splitscreen)
- Get the highest-ranked non-spectator player who's local (or display if demo.playback)
- Show an alternate arrow (currently not in assets) if
    - no player was found
    - OR the player becomes a spectator
    - OR has otherwise invalid properties
- Use SKINCOLOR_WHITE (and its invcolor) for associated colormaps in this case
2023-05-10 14:42:58 +01:00
toaster
0c63b76364 Funny little parabola for player pin on progression bar when progressing to new round 2023-05-10 14:42:57 +01:00
toaster
5a20a4756f Judder on incomplete fill for rank-based progression to Sealed Star
- Cleaner handling of player arrow position through addition rather than overwrite
- Cleaner inputs to FixedDiv
2023-05-10 14:42:57 +01:00
toaster
9fca550ab6 Line meter fill animation for grade at the end of the race rounds in GP
TODO:
- Interpolation
- Sounds
2023-05-10 14:42:57 +01:00
toaster
9352b3ef07 Make the one-round case of the roundqueue more visually interesting 2023-05-10 14:42:57 +01:00
toaster
679e901e5f Fix not having a background ramp upwards when the first entry in the round queue is on the "upper level" of the zigzag 2023-05-10 14:42:57 +01:00
toaster
b63246ccaf Fix erroneous case if there wasn't a special stage in the cup but gamedata->everseenspecial was true 2023-05-10 14:42:57 +01:00
toaster
4cb639307c Roundqueue rank-restricted entry special case visual
- Show if you've ever visited a Special Stage
- Show if you're on the final non-Special Stage cup round and you're on pace to enter
- A horizontal line to the Prize option, which has its own unique bump around it.
    - Frustratingly has to be done inside the loop, due to overlap and order of operation issues.
2023-05-10 14:42:56 +01:00
toaster
a333b265b4 Clean up material that is no longer necessary to keep around 2023-05-10 14:42:56 +01:00
toaster
0d9f8076f8 Re-add Auto gamespeed scramble text (temporary height) 2023-05-10 14:42:56 +01:00
toaster
f4f52ede32 New consistent between-round countdowns using SmallNums
- Intermission
    - Unlike before, shows in all contexts, not just netgame/netreplay
- Voting
    - Replaces currently extant counter
2023-05-10 14:42:56 +01:00
toaster
84a2a94b28 Reimplement bottom progression bar
- Actually accomodates variable-length cups/roundqueues
- Uses player skin and color for position indicator instead of iterating through results
TODO: Make the Sealed Star entry a special case
2023-05-10 14:42:56 +01:00
toaster
208f7d3b81 Improve header text handling
- Text on the header
    - If they won, show [skin realname] GOT THROUGH ROUND
        - This branch was showing this previously but inexplicably only had the skin realname when in GP
    - If they retired, show NO CONTEST...
    - Else, show spectator non-participation text
        - if GT_VERSUS, show Boss name
        - if battleprisons, "PRISON BREAK"
        - else, "[gametype name] STAGE"
            - Matches S1/S2 "SPECIAL STAGE" non-completion text
- Scrolls with the page
    - Second page text always reads "TOTAL RANKINGS"
2023-05-10 14:42:55 +01:00
toaster
4ffb5f2e10 Improvements to background handling
- Don't draw Lua HUD hook behind the background
- Flip background in Encore mode
- Only animate scrolling elements when not paused or P_AutoPause
- Don't clobber the (TC_DEFAULT, SKINCOLOR_YELLOW) cache, instead use (TC_RAINBOW, SKINCOLOR_INTERMISSION) directly
- Clearer variable name for background colormap (color to bgcolor)
2023-05-10 14:42:55 +01:00
toaster
2ca9f1aee5 Rename and rearrange the difficult-to-interpret patch variable names for the GP bottom progression visual
`rrmrk1` is now `level_dot[BPP_DONE]`, for example.
BPP is short for "Bottom Progression Patch"

This is a necessary prerequisite to making the roundqueue visuals dynamic, but that is not yet the case
2023-05-10 14:42:55 +01:00
toaster
aa925be7c5 Reimplement player result data
- A series of bars with stuff on them.
    - Player position num
    - Player character + color (via minimap icon)
        - Uses MINIDEAD if a bot NO CONTESTs
    - Player name (Aqua text instead of white if you're the main player)
    - Player TIME/SCORE/RANK/PWR depending on context
        - NO CONTEST now reads "RETIRED."
            - More economical use of more limited space
            - Gives failure a slightly different flavor to the previous entry in the series
- Re-implements the slide when switching from TIME/SCORE to RANK/PWR
- These are automatically spaced in varying degrees to try and use as much or as little space as possible, given the bars are fixed width.
    - 1 to 3 players: Center-aligned column of result bars
    - 4 to 6 players: Two columns of result bars, 1 extra pixel of vertical spacing
    - 7 to 10 players: Two columns of result bars
    - 11 to 16 players: Two columns of result bars, 1 less pixel of vertical spacing

TODO:
- "LAGLESS" host name-and-shame, which the revamped screen was not designed around
- Adjusting position of other entries on the screen to accomodate higher quantities of players
- Adjust spacing of other graphics on the screen to prevent overlap
2023-05-10 14:42:55 +01:00
toaster
06c4a898e2 First steps at reimplementing functionality
- Re-add demo save HUD
- Re-add skip for drawing 3D scene required since Twodee
- Re-add Lua-controlled HUD disabling
- Cleanup for 0 instead of NULL in pointer field of patch drawer macros
- Cleanup for more extra tabs than the browser session of someone with ADHD
2023-05-10 14:42:55 +01:00
toaster
ae7830b9ab Compilation fixes
- grandprixinfo.roundnum --> roundqueue.roundnum
- comment out unused patch
2023-05-10 14:42:54 +01:00
wolfy852
7712074b29 Make line colors reflect progress 2023-05-10 14:42:54 +01:00