Merge branch 'podium-difficulty' into 'master'

Show difficulty on GP results screen

See merge request kart-krew-dev/ring-racers-internal!2573
This commit is contained in:
Oni VelocitOni 2025-06-04 02:04:34 +00:00
commit a5588683af

View file

@ -87,6 +87,7 @@ static struct podiumData_s
boolean fastForward;
char header[64];
char difficulty[64];
void Init(void);
void NextLevel(void);
@ -258,6 +259,27 @@ void podiumData_s::Init(void)
);
}
switch(grandprixinfo.gamespeed)
{
case KARTSPEED_EASY:
snprintf(difficulty, sizeof difficulty, "Relaxed");
break;
case KARTSPEED_NORMAL:
snprintf(difficulty, sizeof difficulty, "Intense");
break;
case KARTSPEED_HARD:
snprintf(difficulty, sizeof difficulty, "Vicious");
break;
default:
snprintf(difficulty, sizeof difficulty, "?");
}
if (grandprixinfo.masterbots)
snprintf(difficulty, sizeof difficulty, "Master");
if (cv_4thgear.value || cv_levelskull.value)
snprintf(difficulty, sizeof difficulty, "Extra");
header[sizeof header - 1] = '\0';
displayLevels = 0;
@ -504,6 +526,12 @@ void podiumData_s::Draw(void)
.colormap(bestHuman->skin, static_cast<skincolornum_t>(bestHuman->skincolor))
.patch(faceprefix[bestHuman->skin][FACE_WANTED]);
drawer_winner
.xy(16, 28)
.align(srb2::Draw::Align::kCenter)
.font(srb2::Draw::Font::kMenu)
.text(difficulty);
drawer_winner
.xy(44, 31)
.align(srb2::Draw::Align::kCenter)