Rename "Break the Capsules" to "Prison Break"

We had this collective consciousness bigbrain moment in VC together, and it can literally only happen in this branch because unlocks.pk3 is the only main-game asset that needs to change for it
Solves the big problem we had with mixing up Item Capsules and ~~Battle Capsules~~ PRISON EGGS
This commit is contained in:
toaster 2023-03-12 20:17:46 +00:00
parent 0b71b2f71f
commit 241475155b
22 changed files with 66 additions and 66 deletions

View file

@ -2286,8 +2286,8 @@ void readunlockable(MYFILE *f, INT32 num)
unlockables[num].type = SECRET_ENCORE;
else if (fastcmp(word2, "TIMEATTACK"))
unlockables[num].type = SECRET_TIMEATTACK;
else if (fastcmp(word2, "BREAKTHECAPSULES"))
unlockables[num].type = SECRET_BREAKTHECAPSULES;
else if (fastcmp(word2, "PRISONBREAK"))
unlockables[num].type = SECRET_PRISONBREAK;
else if (fastcmp(word2, "SPECIALATTACK"))
unlockables[num].type = SECRET_SPECIALATTACK;
else if (fastcmp(word2, "SPBATTACK"))
@ -2394,8 +2394,8 @@ static void readcondition(UINT8 set, UINT32 id, char *word2)
x1 = GDGT_RACE;
else if (fastcmp(params[2], "BATTLE"))
x1 = GDGT_BATTLE;
else if (fastcmp(params[2], "CAPSULE"))
x1 = GDGT_CAPSULES;
else if (fastcmp(params[2], "PRISONS"))
x1 = GDGT_PRISONS;
else if (fastcmp(params[2], "SPECIAL"))
x1 = GDGT_SPECIAL;
else if (fastcmp(params[2], "CUSTOM"))
@ -2557,7 +2557,7 @@ static void readcondition(UINT8 set, UINT32 id, char *word2)
else if ((offset=0) || fastcmp(params[0], "PREFIX_GRANDPRIX")
|| (++offset && fastcmp(params[0], "PREFIX_BONUSROUND"))
|| (++offset && fastcmp(params[0], "PREFIX_TIMEATTACK"))
|| (++offset && fastcmp(params[0], "PREFIX_BREAKTHECAPSULES"))
|| (++offset && fastcmp(params[0], "PREFIX_PRISONBREAK"))
|| (++offset && fastcmp(params[0], "PREFIX_SEALEDSTAR")))
{
//PARAMCHECK(1);

View file

@ -5836,7 +5836,7 @@ const char *const GAMETYPERULE_LIST[] = {
"KARMA",
"ITEMARROWS",
"CAPSULES",
"PRISONS",
"CATCHER",
"ROLLINGSTART",
"SPECIALSTART",

View file

@ -552,7 +552,7 @@ enum GameTypeRules
GTR_ITEMARROWS = 1<<9, // Show item box arrows above players
// Bonus gametype rules
GTR_CAPSULES = 1<<10, // Can enter Break The Capsules mode
GTR_PRISONS = 1<<10, // Can enter Prison Break mode
GTR_CATCHER = 1<<11, // UFO Catcher (only works with GTR_CIRCUIT)
GTR_ROLLINGSTART = 1<<12, // Rolling start (only works with GTR_CIRCUIT)
GTR_SPECIALSTART = 1<<13, // White fade instant start

View file

@ -3274,7 +3274,7 @@ static gametype_t defaultgametypes[] =
{
"Battle",
"GT_BATTLE",
GTR_SPHERES|GTR_BUMPERS|GTR_PAPERITEMS|GTR_POWERSTONES|GTR_KARMA|GTR_ITEMARROWS|GTR_CAPSULES|GTR_BATTLESTARTS|GTR_POINTLIMIT|GTR_TIMELIMIT|GTR_OVERTIME|GTR_CLOSERPLAYERS,
GTR_SPHERES|GTR_BUMPERS|GTR_PAPERITEMS|GTR_POWERSTONES|GTR_KARMA|GTR_ITEMARROWS|GTR_PRISONS|GTR_BATTLESTARTS|GTR_POINTLIMIT|GTR_TIMELIMIT|GTR_OVERTIME|GTR_CLOSERPLAYERS,
TOL_BATTLE,
int_scoreortimeattack,
0,
@ -4150,7 +4150,7 @@ static void G_DoCompleted(void)
if (gametype == GT_RACE)
roundtype = GDGT_RACE;
else if (gametype == GT_BATTLE)
roundtype = (battlecapsules ? GDGT_CAPSULES : GDGT_BATTLE);
roundtype = (battleprisons ? GDGT_PRISONS : GDGT_BATTLE);
else if (gametype == GT_SPECIAL || gametype == GT_VERSUS)
roundtype = GDGT_SPECIAL;
@ -4177,7 +4177,7 @@ static void G_DoCompleted(void)
G_SetGamestate(GS_NULL);
wipegamestate = GS_NULL;
grandprixinfo.rank.capsules += numtargets;
grandprixinfo.rank.prisons += numtargets;
grandprixinfo.rank.position = MAXPLAYERS;
for (i = 0; i < MAXPLAYERS; i++)

View file

@ -2474,8 +2474,8 @@ static void HU_DrawRankings(void)
// draw the current gametype in the lower right
if (grandprixinfo.gp == true)
V_DrawString(4, 188, hilicol|V_SNAPTOBOTTOM|V_SNAPTOLEFT, "Grand Prix");
else if (battlecapsules)
V_DrawString(4, 188, hilicol|V_SNAPTOBOTTOM|V_SNAPTOLEFT, "Capsules");
else if (battleprisons)
V_DrawString(4, 188, hilicol|V_SNAPTOBOTTOM|V_SNAPTOLEFT, "Prisons");
else if (gametype >= 0 && gametype < numgametypes)
V_DrawString(4, 188, hilicol|V_SNAPTOBOTTOM|V_SNAPTOLEFT, gametypes[gametype]->name);
@ -2533,11 +2533,11 @@ static void HU_DrawRankings(void)
}
// Right hand side
if (battlecapsules == true)
if (battleprisons == true)
{
if (numtargets < maptargets)
{
V_DrawCenteredString(256, 8, 0, "CAPSULES");
V_DrawCenteredString(256, 8, 0, "PRISONS");
V_DrawCenteredString(256, 16, hilicol, va("%d", maptargets - numtargets));
}
}

View file

@ -26,7 +26,7 @@
struct battleovertime battleovertime;
// Capsules mode enabled for this map?
boolean battlecapsules = false;
boolean battleprisons = false;
// box respawning in battle mode
INT32 nummapboxes = 0;
@ -38,7 +38,7 @@ UINT8 numtargets = 0; // Capsules busted
INT32 K_StartingBumperCount(void)
{
if (battlecapsules)
if (battleprisons)
return 1; // always 1 hit in Break the Capsules
return cv_kartbumpers.value;
@ -95,7 +95,7 @@ void K_CheckBumpers(void)
UINT8 nobumpers = 0;
UINT8 eliminated = 0;
const boolean singleplayer = (battlecapsules || bossinfo.valid);
const boolean singleplayer = (battleprisons || bossinfo.valid);
if (!(gametyperules & GTR_BUMPERS))
return;
@ -145,7 +145,7 @@ void K_CheckBumpers(void)
if (numingame <= 1)
{
if ((gametyperules & GTR_CAPSULES) && (K_CanChangeRules(true) == true))
if ((gametyperules & GTR_PRISONS) && (K_CanChangeRules(true) == true))
{
// Reset map to turn on battle capsules
if (server)
@ -335,7 +335,7 @@ void K_RunPaperItemSpawners(void)
UINT8 pcount = 0;
INT16 i;
if (battlecapsules)
if (battleprisons)
{
// Gametype uses paper items, but this specific expression doesn't
return;
@ -770,7 +770,7 @@ void K_BattleInit(boolean singleplayercontext)
{
size_t i;
if ((gametyperules & GTR_CAPSULES) && singleplayercontext && !battlecapsules)
if ((gametyperules & GTR_PRISONS) && singleplayercontext && !battleprisons)
{
mapthing_t *mt = mapthings;
for (i = 0; i < nummapthings; i++, mt++)
@ -779,7 +779,7 @@ void K_BattleInit(boolean singleplayercontext)
P_SpawnMapThing(mt);
}
battlecapsules = true;
battleprisons = true;
}
if (gametyperules & GTR_BUMPERS)

View file

@ -18,7 +18,7 @@ extern struct battleovertime
fixed_t x, y, z; ///< Position to center on
} battleovertime;
extern boolean battlecapsules;
extern boolean battleprisons;
extern INT32 nummapboxes, numgotboxes; // keep track of spawned battle mode items
extern UINT8 maptargets, numtargets;

View file

@ -2839,7 +2839,7 @@ static void K_drawKartBumpersOrKarma(void)
V_DrawScaledPatch(fx-2 + (flipflag ? (SHORT(kp_ringstickersplit[1]->width) - 3) : 0), fy, V_HUDTRANS|V_SLIDEIN|splitflags|flipflag, kp_ringstickersplit[0]);
V_DrawScaledPatch(fx+22, fy, V_HUDTRANS|V_SLIDEIN|splitflags, frameslash);
if (battlecapsules)
if (battleprisons)
{
V_DrawMappedPatch(fx+1, fy-2, V_HUDTRANS|V_SLIDEIN|splitflags, kp_rankcapsule, NULL);
@ -2893,7 +2893,7 @@ static void K_drawKartBumpersOrKarma(void)
}
else
{
if (battlecapsules)
if (battleprisons)
{
if (numtargets > 9 && maptargets > 9)
V_DrawMappedPatch(LAPS_X, LAPS_Y, V_HUDTRANS|V_SLIDEIN|splitflags, kp_capsulestickerwide, NULL);
@ -4152,7 +4152,7 @@ static void K_drawBattleFullscreen(void)
if (K_IsPlayerLosing(stplyr))
p = kp_battlelose;
else if (stplyr->position == 1 && (!battlecapsules || numtargets >= maptargets))
else if (stplyr->position == 1 && (!battleprisons || numtargets >= maptargets))
p = kp_battlewin;
V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, scale, splitflags, p, NULL);
@ -4848,7 +4848,7 @@ static void K_DrawGPRankDebugger(void)
V_DrawThinString(0, 30, V_SNAPTOTOP|V_SNAPTOLEFT|V_6WIDTHSPACE|V_ALLOWLOWERCASE,
va("CONTINUES: %d", grandprixinfo.rank.continuesUsed));
V_DrawThinString(0, 40, V_SNAPTOTOP|V_SNAPTOLEFT|V_6WIDTHSPACE|V_ALLOWLOWERCASE,
va("CAPSULES: %d / %d", grandprixinfo.rank.capsules, grandprixinfo.rank.totalCapsules));
va("PRISONS: %d / %d", grandprixinfo.rank.prisons, grandprixinfo.rank.totalPrisons));
V_DrawThinString(0, 50, V_SNAPTOTOP|V_SNAPTOLEFT|V_6WIDTHSPACE|V_ALLOWLOWERCASE,
va("RINGS: %d / %d", grandprixinfo.rank.rings, grandprixinfo.rank.totalRings));
V_DrawThinString(0, 60, V_SNAPTOTOP|V_SNAPTOLEFT|V_6WIDTHSPACE|V_ALLOWLOWERCASE,
@ -4999,7 +4999,7 @@ void K_drawKartHUD(void)
;
else if ((gametyperules & GTR_POWERSTONES))
{
if (!battlecapsules)
if (!battleprisons)
K_drawKartEmeralds();
}
else if (!islonesome)

View file

@ -314,7 +314,7 @@ bool is_player_tracking_target(player_t *player = stplyr)
return false;
}
if (battlecapsules || bossinfo.valid)
if (battleprisons || bossinfo.valid)
{
return false;
}

View file

@ -371,10 +371,10 @@ boolean K_IsPlayerLosing(player_t *player)
if (player->pflags & PF_NOCONTEST)
return true;
if (battlecapsules && numtargets == 0)
if (battleprisons && numtargets == 0)
return true; // Didn't even TRY?
if (battlecapsules || (gametyperules & GTR_BOSS))
if (battleprisons || (gametyperules & GTR_BOSS))
return (player->bumpers <= 0); // anything short of DNF is COOL
if (player->position == 1)
@ -561,7 +561,7 @@ boolean K_TimeAttackRules(void)
return true;
}
if (battlecapsules == true)
if (battleprisons == true)
{
// Break the Capsules always uses Time Attack
// rules, since you can bring 2-4 players in
@ -4362,7 +4362,7 @@ void K_HandleBumperChanges(player_t *player, UINT8 prevBumpers)
}
else if (player->bumpers == 0 && prevBumpers > 0)
{
if (battlecapsules || bossinfo.valid)
if (battleprisons || bossinfo.valid)
{
player->pflags |= (PF_NOCONTEST|PF_ELIMINATED);
}
@ -11681,7 +11681,7 @@ tic_t K_TimeLimitForGametype(void)
// Grand Prix
if (!K_CanChangeRules(true))
{
if (battlecapsules)
if (battleprisons)
{
return 20*TICRATE;
}
@ -11695,7 +11695,7 @@ tic_t K_TimeLimitForGametype(void)
}
// No time limit for Break the Capsules FREE PLAY
if (battlecapsules)
if (battleprisons)
{
return 0;
}
@ -11720,7 +11720,7 @@ UINT32 K_PointLimitForGametype(void)
return cv_pointlimit.value;
}
if (battlecapsules || bossinfo.valid)
if (battleprisons || bossinfo.valid)
{
return 0;
}

View file

@ -4836,7 +4836,7 @@ static void M_DrawChallengeTile(INT16 i, INT16 j, INT32 x, INT32 y, boolean hili
categoryid = '6';
break;
case SECRET_TIMEATTACK:
case SECRET_BREAKTHECAPSULES:
case SECRET_PRISONBREAK:
case SECRET_SPECIALATTACK:
case SECRET_SPBATTACK:
categoryid = '7';
@ -4918,7 +4918,7 @@ static void M_DrawChallengeTile(INT16 i, INT16 j, INT32 x, INT32 y, boolean hili
case SECRET_TIMEATTACK:
iconid = 7;
break;
case SECRET_BREAKTHECAPSULES:
case SECRET_PRISONBREAK:
iconid = 8;
break;
case SECRET_SPECIALATTACK:
@ -5221,7 +5221,7 @@ static void M_DrawChallengePreview(INT32 x, INT32 y)
specialmap = tamapcache;
break;
}
case SECRET_BREAKTHECAPSULES:
case SECRET_PRISONBREAK:
{
static UINT16 btcmapcache = NEXTMAP_INVALID;
if (btcmapcache > nummapheaders)
@ -5769,9 +5769,9 @@ void M_DrawStatistics(void)
strcat(beststr, va("%u Race", gamedata->roundsplayed[GDGT_RACE]));
if (gamedata->roundsplayed[GDGT_CAPSULES] > 0)
if (gamedata->roundsplayed[GDGT_PRISONS] > 0)
{
strcat(beststr, va(", %u Capsule", gamedata->roundsplayed[GDGT_CAPSULES]));
strcat(beststr, va(", %u Prisons", gamedata->roundsplayed[GDGT_PRISONS]));
}
strcat(beststr, va(", %u Battle", gamedata->roundsplayed[GDGT_BATTLE]));

View file

@ -516,7 +516,7 @@ void K_CeremonyDrawer(void)
case 5:
{
V_DrawString(x, y, V_ALLOWLOWERCASE,
va("CAPSULES: %d / %d", podiumData.rank.capsules, podiumData.rank.totalCapsules)
va("PRISONS: %d / %d", podiumData.rank.prisons, podiumData.rank.totalPrisons)
);
break;
}

View file

@ -338,7 +338,7 @@ void K_InitGrandPrixRank(gpRank_t *rankData)
continue;
}
rankData->totalCapsules += RankCapsules_CountFromMap(virt);
rankData->totalPrisons += RankCapsules_CountFromMap(virt);
vres_Free(virt);
}
}
@ -363,9 +363,9 @@ gp_rank_e K_CalculateGPGrade(gpRank_t *rankData)
const INT32 positionWeight = 150;
const INT32 pointsWeight = 100;
const INT32 lapsWeight = 100;
const INT32 capsulesWeight = 100;
const INT32 prisonsWeight = 100;
const INT32 ringsWeight = 50;
const INT32 total = positionWeight + pointsWeight + lapsWeight + capsulesWeight + ringsWeight;
const INT32 total = positionWeight + pointsWeight + lapsWeight + prisonsWeight + ringsWeight;
const INT32 continuesPenalty = 20;
INT32 ours = 0;
@ -388,9 +388,9 @@ gp_rank_e K_CalculateGPGrade(gpRank_t *rankData)
ours += (rankData->laps * lapsWeight) / rankData->totalLaps;
}
if (rankData->totalCapsules > 0)
if (rankData->totalPrisons > 0)
{
ours += (rankData->capsules * capsulesWeight) / rankData->totalCapsules;
ours += (rankData->prisons * prisonsWeight) / rankData->totalPrisons;
}
if (rankData->totalRings > 0)

View file

@ -35,8 +35,8 @@ struct gpRank_t
UINT32 continuesUsed;
UINT32 capsules;
UINT32 totalCapsules;
UINT32 prisons;
UINT32 totalPrisons;
UINT32 rings;
UINT32 totalRings;

View file

@ -1240,7 +1240,7 @@ void K_FillItemRouletteData(const player_t *player, itemroulette_t *const roulet
kartitems_t *presetlist = K_KartItemReelTimeAttack;
// If the objective is not to go fast, it's to cause serious damage.
if (gametyperules & GTR_CAPSULES)
if (gametyperules & GTR_PRISONS)
{
presetlist = K_KartItemReelBreakTheCapsules;
}

View file

@ -27,7 +27,7 @@
#include "k_kart.h" // K_IsPLayerLosing
#include "k_grandprix.h" // grandprixinfo
#include "k_battle.h" // battlecapsules
#include "k_battle.h" // battleprisons
#include "k_specialstage.h" // specialstageinfo
#include "k_podium.h"
#include "k_pwrlv.h"
@ -786,8 +786,8 @@ boolean M_CheckCondition(condition_t *cn, player_t *player)
return ((grandprixinfo.gp == true) && (grandprixinfo.eventmode == GPEVENT_BONUS));
case UCRP_PREFIX_TIMEATTACK:
return (modeattacking != ATTACKING_NONE);
case UCRP_PREFIX_BREAKTHECAPSULES:
return ((gametyperules & GTR_CAPSULES) && battlecapsules);
case UCRP_PREFIX_PRISONBREAK:
return ((gametyperules & GTR_PRISONS) && battleprisons);
case UCRP_PREFIX_SEALEDSTAR:
return (specialstageinfo.valid == true);
@ -833,7 +833,7 @@ boolean M_CheckCondition(condition_t *cn, player_t *player)
&& M_NotFreePlay(player)
&& !K_IsPlayerLosing(player));
case UCRP_FINISHALLCAPSULES:
return (battlecapsules
return (battleprisons
&& !(player->pflags & PF_NOCONTEST)
//&& M_NotFreePlay(player)
&& numtargets >= maptargets);
@ -1004,7 +1004,7 @@ static const char *M_GetConditionString(condition_t *cn)
case GDGT_RACE:
work = " Race";
break;
case GDGT_CAPSULES:
case GDGT_PRISONS:
work = " Capsule";
break;
case GDGT_BATTLE:
@ -1245,8 +1245,8 @@ static const char *M_GetConditionString(condition_t *cn)
if (!M_SecretUnlocked(SECRET_TIMEATTACK, true))
return NULL;
return "TIME ATTACK:";
case UCRP_PREFIX_BREAKTHECAPSULES:
return "BREAK THE CAPSULES:";
case UCRP_PREFIX_PRISONBREAK:
return "PRISON BREAK:";
case UCRP_PREFIX_SEALEDSTAR:
if (!gamedata->everseenspecial)
return NULL;

View file

@ -66,7 +66,7 @@ typedef enum
UCRP_PREFIX_GRANDPRIX = UCRP_REQUIRESPLAYING, // GRAND PRIX:
UCRP_PREFIX_BONUSROUND, // BONUS ROUND:
UCRP_PREFIX_TIMEATTACK, // TIME ATTACK:
UCRP_PREFIX_BREAKTHECAPSULES, // BREAK THE CAPSULES:
UCRP_PREFIX_PRISONBREAK, // PRISON BREAK:
UCRP_PREFIX_SEALEDSTAR, // SEALED STAR:
UCRP_PREFIX_ISMAP, // name of [map]:
@ -188,7 +188,7 @@ typedef enum
// Menu restrictions
SECRET_TIMEATTACK, // Permit Time attack
SECRET_BREAKTHECAPSULES, // Permit SP Capsule attack
SECRET_PRISONBREAK, // Permit SP Prison attack
SECRET_SPECIALATTACK, // Permit Special attack (You're blue now!)
SECRET_SPBATTACK, // Permit SPB mode of Time attack
@ -234,7 +234,7 @@ typedef enum
typedef enum {
GDGT_RACE,
GDGT_BATTLE,
GDGT_CAPSULES,
GDGT_PRISONS,
GDGT_SPECIAL,
GDGT_CUSTOM,
GDGT_MAX

View file

@ -12,7 +12,7 @@ menuitem_t PLAY_GamemodesMenu[] =
{IT_STRING | IT_CALL, "Battle", "It's last kart standing in this free-for-all!",
"MENIMG00", {.routine = M_LevelSelectInit}, 0, GT_BATTLE},
{IT_STRING | IT_CALL, "Capsules", "Bust up all of the capsules in record time!",
{IT_STRING | IT_CALL, "Prisons", "Bust up all of the Prison Eggs in record time!",
NULL, {.routine = M_LevelSelectInit}, 1, GT_BATTLE},
{IT_STRING | IT_CALL, "Special", "Strike your target and secure the prize!",
@ -42,7 +42,7 @@ void M_SetupGametypeMenu(INT32 choice)
{
boolean anyunlocked = false;
if (M_SecretUnlocked(SECRET_BREAKTHECAPSULES, true))
if (M_SecretUnlocked(SECRET_PRISONBREAK, true))
{
// Re-add Capsules
PLAY_GamemodesMenu[2].status = IT_STRING | IT_CALL;

View file

@ -808,7 +808,7 @@ void P_CheckPointLimit(void)
if (!(gametyperules & GTR_POINTLIMIT))
return;
if (battlecapsules)
if (battleprisons)
return;
// pointlimit is nonzero, check if it's been reached by this player

View file

@ -9446,7 +9446,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
{
if (gametyperules & GTR_PAPERITEMS)
{
if (battlecapsules == true)
if (battleprisons == true)
{
;
}

View file

@ -4999,7 +4999,7 @@ static void P_NetArchiveMisc(savebuffer_t *save, boolean resending)
// SRB2kart
WRITEINT32(save->p, numgotboxes);
WRITEUINT8(save->p, numtargets);
WRITEUINT8(save->p, battlecapsules);
WRITEUINT8(save->p, battleprisons);
WRITEUINT8(save->p, gamespeed);
WRITEUINT8(save->p, numlaps);
@ -5168,7 +5168,7 @@ static inline boolean P_NetUnArchiveMisc(savebuffer_t *save, boolean reloading)
// SRB2kart
numgotboxes = READINT32(save->p);
numtargets = READUINT8(save->p);
battlecapsules = (boolean)READUINT8(save->p);
battleprisons = (boolean)READUINT8(save->p);
gamespeed = READUINT8(save->p);
numlaps = READUINT8(save->p);

View file

@ -7040,7 +7040,7 @@ static void P_InitLevelSettings(void)
nummaprings = 0;
nummapboxes = numgotboxes = 0;
maptargets = numtargets = 0;
battlecapsules = false;
battleprisons = false;
// emerald hunt
hunt1 = hunt2 = hunt3 = NULL;