Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
bradharding committed Dec 2, 2024
1 parent 7ea6b90 commit 1f74aef
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/c_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,6 @@ consolecmd_t consolecmds[] =
CMD_CHEAT(idspispopd, false),
CCMD(if, "", "", null_func1, if_func2, true, IFCMDFORMAT,
"Executes a string of " BOLDITALICS("commands") " if a " BOLDITALICS("CVAR") " equals a " BOLDITALICS("value") "."),
CMD_CHEAT(ijwtbha, false),
CVAR_BOOL(infighting, "", "", bool_cvars_func1, bool_cvars_func2, CF_NONE, BOOLVALUEALIAS,
"Toggles infighting amongst monsters once you die."),
CCMD(infiniteammo, "", "", game_ccmd_func1, infiniteammo_func2, true, "[" BOLD("on") "|" BOLD("off") "]",
Expand Down Expand Up @@ -955,6 +954,7 @@ consolecmd_t consolecmds[] =
"Restarts the current map."),
CCMD(resurrect, "", "", resurrect_func1, resurrect_func2, true, RESURRECTCMDFORMAT,
"Resurrects the " BOLD("player") ", " BOLD("all") " monsters, or a type of " BOLDITALICS("monster") "."),
CMD_CHEAT(ryhan, false),
CVAR_INT(s_channels, "", "", int_cvars_func1, int_cvars_func2, CF_NONE, NOVALUEALIAS,
"The number of sound effects that can be played at the same time (" BOLD("8") " to " BOLD("64") ")."),
CVAR_BOOL(s_lowermenumusic, "", "", bool_cvars_func1, bool_cvars_func2, CF_NONE, BOOLVALUEALIAS,
Expand Down
15 changes: 15 additions & 0 deletions src/p_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ enum
MCMD_INTERMUSIC,
MCMD_INTERTEXT,
MCMD_INTERTEXTSECRET,
MCMD_LABEL,
MCMD_LEVELNAME,
MCMD_LEVELPIC,
MCMD_LIQUID,
Expand Down Expand Up @@ -142,6 +143,7 @@ typedef struct
int intermusic;
char intertext[1024];
char intertextsecret[1024];
char label[9];
int liquid[NUMLIQUIDS];
int mapinepisode;
int music;
Expand Down Expand Up @@ -277,6 +279,7 @@ static char *mapcmdnames[] =
"INTERMUSIC",
"INTERTEXT",
"INTERTEXTSECRET",
"LABEL",
"LEVELNAME",
"LEVELPIC",
"LIQUID",
Expand Down Expand Up @@ -330,6 +333,7 @@ static int mapcmdids[] =
MCMD_INTERMUSIC,
MCMD_INTERTEXT,
MCMD_INTERTEXTSECRET,
MCMD_LABEL,
MCMD_LEVELNAME,
MCMD_LEVELPIC,
MCMD_LIQUID,
Expand Down Expand Up @@ -3402,6 +3406,7 @@ static void P_InitMapInfo(void)
mapinfo[i][j].intermusic = 0;
mapinfo[i][j].intertext[0] = '\0';
mapinfo[i][j].intertextsecret[0] = '\0';
mapinfo[i][j].label[0] = '\0';

for (int k = 0; k < NUMLIQUIDS; k++)
{
Expand Down Expand Up @@ -3847,6 +3852,11 @@ static bool P_ParseMapInfo(const char *scriptname)
info->intermusic = W_CheckNumForName(sc_String);
break;

case MCMD_LABEL:
SC_MustGetString();
M_StringCopy(info->label, sc_String, sizeof(info->label));
break;

case MCMD_INTERTEXTSECRET:
{
char buffer[1024] = "";
Expand Down Expand Up @@ -4230,6 +4240,11 @@ char *P_GetInterSecretText(const int ep, const int map)
return mapinfo[ep][map].intertextsecret;
}

char *P_GetLabel(const int ep, const int map)
{
return mapinfo[ep][map].label;
}

bool P_GetMapEndBunny(const int ep, const int map)
{
return mapinfo[ep][map].endbunny;
Expand Down
1 change: 1 addition & 0 deletions src/p_setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ char *P_GetInterBackrop(const int ep, const int map);
int P_GetInterMusic(const int ep, const int map);
char *P_GetInterText(const int ep, const int map);
char *P_GetInterSecretText(const int ep, const int map);
char *P_GetLabel(const int ep, const int map);
bool P_GetMapEndBunny(const int ep, const int map);
bool P_GetMapEndCast(const int ep, const int map);
bool P_GetMapEndGame(const int ep, const int map);
Expand Down
2 changes: 1 addition & 1 deletion src/r_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ void R_ClearClipSegs(void)
static void R_RecalcLineFlags(line_t *line)
{
bool twosided = line->flags & ML_TWOSIDED;
int c;
int c;

line->r_validcount = gametime;

Expand Down
2 changes: 1 addition & 1 deletion src/st_stuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ cheatseq_t cheat_clev = CHEAT("idclev", 0, false);
cheatseq_t cheat_clev_xy = CHEAT("idclev", 2, false);
cheatseq_t cheat_mypos = CHEAT("idmypos", 0, false);
cheatseq_t cheat_amap = CHEAT("iddt", 0, false);
cheatseq_t cheat_buddha = CHEAT("ijwtbha", 0, false);
cheatseq_t cheat_buddha = CHEAT("ryhan", 0, false);

cheatseq_t cheat_powerup[7] =
{
Expand Down

0 comments on commit 1f74aef

Please sign in to comment.