Change speedo_cons_t depending on if required lumps are found
This commit is contained in:
1 parent
41c8988c90
commit
307b348dfa
3 files changed
+29
-5
No files matched your search
+25
-4
@@ -69,6 +69,7 @@
|
||||
#include "filesrch.h" // refreshdirmenu, pathisdirectory
|
||||
#include "d_protocol.h"
|
||||
#include "m_perfstats.h"
|
||||
#include "k_kart.h"
|
||||
|
||||
#include "lua_script.h"
|
||||
|
||||
@@ -1447,6 +1448,11 @@ void D_SRB2Main(void)
|
||||
|
||||
#endif //ifndef DEVELOP
|
||||
|
||||
// Possible value that changes depending on whether required files for speedometer are found or not
|
||||
CV_PossibleValue_t speedo_cons_temp[NUMSPEEDOSTUFF] = {{1, "Default"}, {0, NULL}, {0, NULL}, {0, NULL}, {0, NULL}, {0, NULL}};
|
||||
unsigned last_speedo_i = 0;
|
||||
#define PUSHSPEEDO(id, name) { ++last_speedo_i; speedo_cons_temp[last_speedo_i].value = id; speedo_cons_temp[last_speedo_i].strvalue = name; CONS_Printf("[speedostuff] Added %s!\n", name); }
|
||||
|
||||
if (found_extra_kart || found_extra2_kart) // found the funny, add it in!
|
||||
{
|
||||
// HAYA: These are seperated for a reason lmao
|
||||
@@ -1457,15 +1463,21 @@ void D_SRB2Main(void)
|
||||
|
||||
// now check for extra speedometer stuff
|
||||
if (W_CheckMultipleLumps("SP_SMSTC", "K_TRNULL", "SP_MKMH", "SP_MMPH", "SP_MFRAC", "SP_MPERC", NULL))
|
||||
{
|
||||
xtra_speedo = true;
|
||||
|
||||
PUSHSPEEDO(2, "Small");
|
||||
}
|
||||
|
||||
if (W_CheckMultipleLumps("SC_SMSTC", NULL))
|
||||
xtra_speedo_clr = true;
|
||||
|
||||
// now check for achii speedometer stuff
|
||||
if (W_CheckMultipleLumps("SP_AMSTC", "K_TRNULL", "SP_AKMH", "SP_AMPH", "SP_AFRAC", "SP_APERC", NULL))
|
||||
{
|
||||
achi_speedo = true;
|
||||
|
||||
PUSHSPEEDO(3, "Achii");
|
||||
}
|
||||
|
||||
if (W_CheckMultipleLumps("SC_AMSTC", "K_TRNULL", "SC_AKMH", "SC_AMPH", "SC_AFRAC", "SC_APERC", NULL))
|
||||
achi_speedo_clr = true;
|
||||
|
||||
@@ -1486,8 +1498,11 @@ void D_SRB2Main(void)
|
||||
if (W_CheckMultipleLumps("K_KZSP1", "K_KZSP2", "K_KZSP3", "K_KZSP4", "K_KZSP5", \
|
||||
"K_KZSP6", "K_KZSP7", "K_KZSP8", "K_KZSP9", "K_KZSP10", "K_KZSP11", "K_KZSP12", \
|
||||
"K_KZSP13", "K_KZSP14", "K_KZSP15", "K_KZSP16", "K_KZSP17", "K_KZSP18", "K_KZSP19", \
|
||||
"K_KZSP20", "K_KZSP21", "K_KZSP22", "K_KZSP23", "K_KZSP24", "K_KZSP25", NULL))
|
||||
"K_KZSP20", "K_KZSP21", "K_KZSP22", "K_KZSP23", "K_KZSP24", "K_KZSP25", NULL))
|
||||
{
|
||||
kartzspeedo = true;
|
||||
PUSHSPEEDO(4, "P-Meter");
|
||||
}
|
||||
|
||||
// stat display for extended player setup
|
||||
if (W_CheckMultipleLumps("K_STATNB", "K_STATN1", "K_STATN2", "K_STATN3", "K_STATN4", \
|
||||
@@ -1497,7 +1512,7 @@ void D_SRB2Main(void)
|
||||
// Nametag stuffs
|
||||
if (W_CheckMultipleLumps("NTLINE", "NTLINEV", "NTSP", "NTWH", NULL))
|
||||
nametaggfx = true;
|
||||
|
||||
|
||||
if (W_CheckMultipleLumps("K_DGAU","K_DCAU","K_DGSU","K_DCSU", NULL))
|
||||
driftgaugegfx = true;
|
||||
}
|
||||
@@ -1509,12 +1524,18 @@ void D_SRB2Main(void)
|
||||
|
||||
// 80x11 speedometer crap
|
||||
if (W_CheckMultipleLumps("SP_SM3TC", NULL))
|
||||
{
|
||||
xtra_speedo3 = true;
|
||||
PUSHSPEEDO(5, "Extra");
|
||||
}
|
||||
|
||||
if (W_CheckMultipleLumps("SC_SM3TC", NULL))
|
||||
xtra_speedo_clr3 = true;
|
||||
}
|
||||
|
||||
#undef PUSHSPEEDO
|
||||
memcpy(speedo_cons_t, speedo_cons_temp, sizeof(speedo_cons_t));
|
||||
|
||||
//
|
||||
// search for maps
|
||||
//
|
||||
|
||||
+1
-1
@@ -74,7 +74,7 @@ IMPL_HUD_OFFSET(stat); // Stats
|
||||
consvar_t cv_showstats = {"showstats", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_showinput = {"showinput", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
static CV_PossibleValue_t speedo_cons_t[] = {{1, "Default"}, {2, "Small"}, {3, "Achii"}, {4, "P-Meter"}, {5, "Extra"}, {0, NULL}};
|
||||
CV_PossibleValue_t speedo_cons_t[NUMSPEEDOSTUFF];
|
||||
consvar_t cv_newspeedometer = {"newspeedometer", "Default", CV_SAVE, speedo_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
//hardcode saltyhop mhhm
|
||||
|
||||
@@ -32,6 +32,9 @@ extern consvar_t cv_stat_xoffset;
|
||||
extern consvar_t cv_stat_yoffset;
|
||||
extern consvar_t cv_showstats;
|
||||
|
||||
#define NUMSPEEDOSTUFF 6
|
||||
extern CV_PossibleValue_t speedo_cons_t[NUMSPEEDOSTUFF];
|
||||
|
||||
boolean K_IsPlayerLosing(player_t *player);
|
||||
boolean K_IsPlayerWanted(player_t *player);
|
||||
void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid);
|
||||
|
||||
Reference in new issue
Block a user