From d5d0647ae6b858030fde139e30990c83c25c0c8f Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Sat, 4 Mar 2023 16:27:22 -0500 Subject: [PATCH] Remove difficulty as a ranking requirement Was a cute idea, but removing it since it's not something you can 100% guarantee every time, which was the same reasoning for getting rid of times getting damaged / dealing damage from the requirements. --- src/g_game.c | 7 +------ src/k_hud.c | 4 +--- src/k_podium.c | 15 ++++----------- src/k_rank.c | 32 +++++++------------------------- src/k_rank.h | 3 --- 5 files changed, 13 insertions(+), 48 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index 22760c3e0..aae7d02a3 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -4129,7 +4129,6 @@ static void G_DoCompleted(void) wipegamestate = GS_NULL; g_gpRank.position = MAXPLAYERS; - g_gpRank.difficulty = 0; for (i = 0; i < MAXPLAYERS; i++) { @@ -4157,11 +4156,7 @@ static void G_DoCompleted(void) G_PlayerFinishLevel(i); // take away cards and stuff - if (players[i].bot) - { - g_gpRank.difficulty = max(g_gpRank.difficulty, players[i].botvars.difficulty); - } - else + if (players[i].bot == false) { g_gpRank.position = min(g_gpRank.position, K_GetPodiumPosition(&players[i])); } diff --git a/src/k_hud.c b/src/k_hud.c index db1464ceb..630baca43 100644 --- a/src/k_hud.c +++ b/src/k_hud.c @@ -4833,8 +4833,6 @@ static void K_DrawGPRankDebugger(void) V_DrawThinString(0, 50, V_SNAPTOTOP|V_SNAPTOLEFT|V_6WIDTHSPACE|V_ALLOWLOWERCASE, va("RINGS: %d / %d", g_gpRank.rings, g_gpRank.totalRings)); V_DrawThinString(0, 60, V_SNAPTOTOP|V_SNAPTOLEFT|V_6WIDTHSPACE|V_ALLOWLOWERCASE, - va("DIFFICULTY: %d / %d", g_gpRank.difficulty, g_gpRank.difficultyTarget)); - V_DrawThinString(0, 70, V_SNAPTOTOP|V_SNAPTOLEFT|V_6WIDTHSPACE|V_ALLOWLOWERCASE, va("EMERALD: %s", (g_gpRank.specialWon == true) ? "YES" : "NO")); switch (grade) @@ -4848,7 +4846,7 @@ static void K_DrawGPRankDebugger(void) default: { break; } } - V_DrawThinString(0, 90, V_SNAPTOTOP|V_SNAPTOLEFT|V_6WIDTHSPACE|V_ALLOWLOWERCASE|V_YELLOWMAP, + V_DrawThinString(0, 80, V_SNAPTOTOP|V_SNAPTOLEFT|V_6WIDTHSPACE|V_ALLOWLOWERCASE|V_YELLOWMAP, va(" ** FINAL GRADE: %c", gradeChar)); } diff --git a/src/k_podium.c b/src/k_podium.c index 2e610db1b..cf8c3cc85 100644 --- a/src/k_podium.c +++ b/src/k_podium.c @@ -57,7 +57,7 @@ static struct podiumData_s UINT8 fade; } podiumData; -#define PODIUM_STATES (10) // TODO: enum when this actually gets made +#define PODIUM_STATES (9) // TODO: enum when this actually gets made /*-------------------------------------------------- boolean K_PodiumSequence(void) @@ -470,29 +470,22 @@ void K_CeremonyDrawer(void) break; } case 7: - { - V_DrawString(x, y, V_ALLOWLOWERCASE, - va("DIFFICULTY: %d / %d", podiumData.rankData.difficulty, podiumData.rankData.difficultyTarget) - ); - break; - } - case 8: { V_DrawString(x, y, V_ALLOWLOWERCASE, va("EMERALD: %s", (podiumData.rankData.specialWon == true) ? "YES" : "NO") ); break; } - case 9: + case 8: { V_DrawString(x, y + 10, V_YELLOWMAP|V_ALLOWLOWERCASE, va(" ** FINAL GRADE: %c", gradeChar) ); break; } - case 10: + case 9: { - V_DrawRightAlignedThinString(BASEVIDWIDTH - 2, BASEVIDHEIGHT - 10, V_SNAPTOBOTTOM|V_SNAPTORIGHT|V_6WIDTHSPACE|V_ALLOWLOWERCASE, + V_DrawThinString(2, BASEVIDHEIGHT - 10, V_SNAPTOBOTTOM|V_SNAPTOLEFT|V_6WIDTHSPACE|V_ALLOWLOWERCASE, "Press some button type deal to continue" ); break; diff --git a/src/k_rank.c b/src/k_rank.c index 08bf19c80..369b940e1 100644 --- a/src/k_rank.c +++ b/src/k_rank.c @@ -68,18 +68,6 @@ void K_InitGrandPrixRank(gpRank_t *rankData) rankData->totalRings = grandprixinfo.cup->numlevels * numHumans * 20; - if (grandprixinfo.masterbots == true) - { - rankData->difficultyTarget = MAXBOTDIFFICULTY; - } - else - { - rankData->difficultyTarget = min( - MAXBOTDIFFICULTY, - K_BotStartingDifficulty(grandprixinfo.gamespeed) + ((grandprixinfo.cup->numlevels + 1) / 2) - ); - } - for (i = 0; i < grandprixinfo.cup->numlevels; i++) { const INT32 cupLevelNum = grandprixinfo.cup->cachedlevels[i]; @@ -114,14 +102,13 @@ gp_rank_e K_CalculateGPGrade(gpRank_t *rankData) gp_rank_e retGrade = GRADE_E; - const INT32 positionWeight = 1500; - const INT32 pointsWeight = 1000; - const INT32 lapsWeight = 1000; - const INT32 capsulesWeight = 1000; - const INT32 ringsWeight = 500; - const INT32 difficultyWeight = 200; - const INT32 total = positionWeight + pointsWeight + lapsWeight + capsulesWeight + ringsWeight + difficultyWeight; - const INT32 continuesPenalty = 200; + const INT32 positionWeight = 150; + const INT32 pointsWeight = 100; + const INT32 lapsWeight = 100; + const INT32 capsulesWeight = 100; + const INT32 ringsWeight = 50; + const INT32 total = positionWeight + pointsWeight + lapsWeight + capsulesWeight + ringsWeight; + const INT32 continuesPenalty = 20; INT32 ours = 0; fixed_t percent = 0; @@ -153,11 +140,6 @@ gp_rank_e K_CalculateGPGrade(gpRank_t *rankData) ours += (rankData->rings * ringsWeight) / rankData->totalRings; } - if (rankData->difficultyTarget > 0) - { - ours += (rankData->difficulty * difficultyWeight) / rankData->difficultyTarget; - } - ours -= rankData->continuesUsed * continuesPenalty; percent = FixedDiv(ours, total); diff --git a/src/k_rank.h b/src/k_rank.h index b86744c7e..093bb178e 100644 --- a/src/k_rank.h +++ b/src/k_rank.h @@ -41,9 +41,6 @@ struct gpRank_t UINT32 rings; UINT32 totalRings; - UINT8 difficulty; - UINT8 difficultyTarget; - boolean specialWon; };