mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-04-13 13:51:01 +00:00
Merge branch 'master' of https://git.magicalgirl.moe/KartKrew/Kart.git into addons_menu
# Conflicts: # src/m_menu.c
This commit is contained in:
commit
6cc7f97d8a
63 changed files with 3463 additions and 2059 deletions
|
@ -28,6 +28,7 @@
|
|||
#include "byteptr.h"
|
||||
#include "p_saveg.h"
|
||||
#include "g_game.h" // for player_names
|
||||
#include "m_cond.h" // for encore mode
|
||||
#include "d_netcmd.h"
|
||||
#include "hu_stuff.h"
|
||||
#include "p_setup.h"
|
||||
|
@ -63,9 +64,6 @@ CV_PossibleValue_t CV_Unsigned[] = {{0, "MIN"}, {999999999, "MAX"}, {0, NULL}};
|
|||
CV_PossibleValue_t CV_Natural[] = {{1, "MIN"}, {999999999, "MAX"}, {0, NULL}};
|
||||
|
||||
//SRB2kart
|
||||
CV_PossibleValue_t karthud_cons_t[] = {
|
||||
{0, "Off"}, {1, "Default"}, {2, "SNES"}, {3, "MK64"},
|
||||
{0, NULL}};
|
||||
CV_PossibleValue_t kartspeed_cons_t[] = {
|
||||
{0, "Easy"}, {1, "Normal"}, {2, "Hard"},
|
||||
{0, NULL}};
|
||||
|
@ -1373,6 +1371,12 @@ static void CV_SetCVar(consvar_t *var, const char *value, boolean stealth)
|
|||
return;
|
||||
}
|
||||
|
||||
if (var == &cv_kartencore && !M_SecretUnlocked(SECRET_ENCORE))
|
||||
{
|
||||
CONS_Printf(M_GetText("You haven't unlocked Encore Mode yet!\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
// Only add to netcmd buffer if in a netgame, otherwise, just change it.
|
||||
if (netgame || multiplayer)
|
||||
{
|
||||
|
@ -1475,14 +1479,12 @@ void CV_AddValue(consvar_t *var, INT32 increment)
|
|||
{
|
||||
if(increment > 0) // Going up!
|
||||
{
|
||||
newvalue++;
|
||||
if (newvalue == NUMMAPS)
|
||||
newvalue = 0;
|
||||
if (++newvalue == NUMMAPS)
|
||||
newvalue = -1;
|
||||
}
|
||||
else // Going down!
|
||||
{
|
||||
newvalue--;
|
||||
if (newvalue == -1)
|
||||
if (--newvalue == -2)
|
||||
newvalue = NUMMAPS-1;
|
||||
}
|
||||
|
||||
|
|
|
@ -127,7 +127,6 @@ extern CV_PossibleValue_t CV_Unsigned[];
|
|||
extern CV_PossibleValue_t CV_Natural[];
|
||||
|
||||
// SRB2kart
|
||||
extern CV_PossibleValue_t karthud_cons_t[];
|
||||
extern CV_PossibleValue_t kartspeed_cons_t[];
|
||||
|
||||
// register a variable for use at the console
|
||||
|
|
|
@ -151,6 +151,13 @@ static CV_PossibleValue_t menuhighlight_cons_t[] =
|
|||
{V_GRAYMAP, "Always gray"},
|
||||
{V_ORANGEMAP, "Always orange"},
|
||||
{V_SKYMAP, "Always sky-blue"},
|
||||
{V_GOLDMAP, "Always gold"},
|
||||
{V_LAVENDERMAP, "Always lavender"},
|
||||
{V_TEAMAP, "Always tea-green"},
|
||||
{V_STEELMAP, "Always steel"},
|
||||
{V_PINKMAP, "Always pink"},
|
||||
{V_TEALMAP, "Always teal"},
|
||||
{V_PEACHMAP, "Always peach"},
|
||||
{0, NULL}
|
||||
};
|
||||
consvar_t cons_menuhighlight = {"menuhighlight", "Game type", CV_SAVE, menuhighlight_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
@ -240,11 +247,6 @@ static void CONS_Bind_f(void)
|
|||
// CONSOLE SETUP
|
||||
//======================================================================
|
||||
|
||||
// Font colormap colors
|
||||
// TODO: This could probably be improved somehow...
|
||||
// These colormaps are 99% identical, with just a few changed bytes
|
||||
UINT8 *yellowmap, *purplemap, *greenmap, *bluemap, *graymap, *redmap, *orangemap, *skymap;
|
||||
|
||||
// Console BG color
|
||||
UINT8 *consolebgmap = NULL;
|
||||
|
||||
|
@ -285,37 +287,57 @@ static void CONS_backcolor_Change(void)
|
|||
CON_SetupBackColormap();
|
||||
}
|
||||
|
||||
// Font colormap colors
|
||||
// TODO: This could probably be improved somehow...
|
||||
// These colormaps are 99% identical, with just a few changed bytes
|
||||
UINT8 *yellowmap, *purplemap, *greenmap, *bluemap, *graymap, *redmap, *orangemap,\
|
||||
*skymap, *goldmap, *lavendermap, *teamap, *steelmap, *pinkmap, *tealmap, *peachmap;
|
||||
|
||||
static void CON_SetupColormaps(void)
|
||||
{
|
||||
INT32 i;
|
||||
UINT8 *memorysrc = (UINT8 *)Z_Malloc((256*8), PU_STATIC, NULL);
|
||||
UINT8 *memorysrc = (UINT8 *)Z_Malloc((256*15), PU_STATIC, NULL);
|
||||
|
||||
purplemap = memorysrc;
|
||||
yellowmap = (purplemap+256);
|
||||
greenmap = (yellowmap+256);
|
||||
bluemap = (greenmap+256);
|
||||
redmap = (bluemap+256);
|
||||
graymap = (redmap+256);
|
||||
orangemap = (graymap+256);
|
||||
skymap = (orangemap+256);
|
||||
purplemap = memorysrc;
|
||||
yellowmap = (purplemap+256);
|
||||
greenmap = (yellowmap+256);
|
||||
bluemap = (greenmap+256);
|
||||
redmap = (bluemap+256);
|
||||
graymap = (redmap+256);
|
||||
orangemap = (graymap+256);
|
||||
skymap = (orangemap+256);
|
||||
lavendermap = (skymap+256);
|
||||
goldmap = (lavendermap+256);
|
||||
teamap = (goldmap+256);
|
||||
steelmap = (teamap+256);
|
||||
pinkmap = (steelmap+256);
|
||||
tealmap = (pinkmap+256);
|
||||
peachmap = (tealmap+256);
|
||||
|
||||
// setup the other colormaps, for console text
|
||||
|
||||
// these don't need to be aligned, unless you convert the
|
||||
// V_DrawMappedPatch() into optimised asm.
|
||||
|
||||
for (i = 0; i < (256*8); i++, ++memorysrc)
|
||||
for (i = 0; i < (256*15); i++, ++memorysrc)
|
||||
*memorysrc = (UINT8)(i & 0xFF); // remap each color to itself...
|
||||
|
||||
// SRB2Kart: Different console font, new colors
|
||||
purplemap[120] = (UINT8)194;
|
||||
yellowmap[120] = (UINT8)103;
|
||||
greenmap[120] = (UINT8)162;
|
||||
bluemap[120] = (UINT8)228;
|
||||
graymap[120] = (UINT8)10;
|
||||
redmap[120] = (UINT8)126; // battle
|
||||
orangemap[120] = (UINT8)85; // record attack
|
||||
skymap[120] = (UINT8)214; // race
|
||||
purplemap[120] = (UINT8)194;
|
||||
yellowmap[120] = (UINT8)103;
|
||||
greenmap[120] = (UINT8)162;
|
||||
bluemap[120] = (UINT8)228;
|
||||
redmap[120] = (UINT8)126; // battle
|
||||
graymap[120] = (UINT8)10;
|
||||
orangemap[120] = (UINT8)85; // record attack
|
||||
skymap[120] = (UINT8)214; // race
|
||||
lavendermap[120] = (UINT8)248;
|
||||
goldmap[120] = (UINT8)114;
|
||||
teamap[120] = (UINT8)177;
|
||||
steelmap[120] = (UINT8)201;
|
||||
pinkmap[120] = (UINT8)124;
|
||||
tealmap[120] = (UINT8)220;
|
||||
peachmap[120] = (UINT8)69; // nice
|
||||
|
||||
// Init back colormap
|
||||
CON_SetupBackColormap();
|
||||
|
|
|
@ -38,7 +38,8 @@ extern UINT32 con_scalefactor; // console text scale factor
|
|||
|
||||
extern consvar_t cons_backcolor, cons_menuhighlight;
|
||||
|
||||
extern UINT8 *yellowmap, *purplemap, *greenmap, *bluemap, *graymap, *redmap, *orangemap, *skymap;
|
||||
extern UINT8 *yellowmap, *purplemap, *greenmap, *bluemap, *graymap, *redmap, *orangemap,\
|
||||
*skymap, *goldmap, *lavendermap, *teamap, *steelmap, *pinkmap, *tealmap, *peachmap;
|
||||
|
||||
// Console bg color (auto updated to match)
|
||||
extern UINT8 *consolebgmap;
|
||||
|
|
|
@ -4758,7 +4758,7 @@ void TryRunTics(tic_t realtics)
|
|||
{
|
||||
COM_BufExecute();
|
||||
if (mapchangepending)
|
||||
D_MapChange(-1, 0, ultimatemode, false, 2, false, fromlevelselect); // finish the map change
|
||||
D_MapChange(-1, 0, encoremode, false, 2, false, fromlevelselect); // finish the map change
|
||||
}
|
||||
|
||||
NetUpdate();
|
||||
|
|
|
@ -323,7 +323,7 @@ static void D_Display(void)
|
|||
if (wipegamestate == GS_LEVEL && rendermode != render_none)
|
||||
{
|
||||
V_SetPaletteLump("PLAYPAL"); // Reset the palette
|
||||
R_ReInitColormaps(0);
|
||||
R_ReInitColormaps(0, LUMPERROR);
|
||||
}
|
||||
|
||||
F_WipeStartScreen();
|
||||
|
@ -1496,7 +1496,7 @@ void D_SRB2Main(void)
|
|||
else if (!dedicated && M_MapLocked(pstartmap))
|
||||
I_Error("You need to unlock this level before you can warp to it!\n");
|
||||
else
|
||||
D_MapChange(pstartmap, gametype, ultimatemode, true, 0, false, false);
|
||||
D_MapChange(pstartmap, gametype, (boolean)cv_kartencore.value, true, 0, false, false);
|
||||
}
|
||||
}
|
||||
else if (M_CheckParm("-skipintro"))
|
||||
|
|
|
@ -113,7 +113,7 @@ static void SoundTest_OnChange(void);
|
|||
static void BaseNumLaps_OnChange(void);
|
||||
static void KartFrantic_OnChange(void);
|
||||
static void KartSpeed_OnChange(void);
|
||||
static void KartMirror_OnChange(void);
|
||||
static void KartEncore_OnChange(void);
|
||||
static void KartComeback_OnChange(void);
|
||||
static void KartEliminateLast_OnChange(void);
|
||||
|
||||
|
@ -248,7 +248,7 @@ consvar_t cv_competitionboxes = {"competitionboxes", "Random", CV_NETVAR|CV_CHEA
|
|||
#ifdef SEENAMES
|
||||
static CV_PossibleValue_t seenames_cons_t[] = {{0, "Off"}, {1, "Colorless"}, {2, "Team"}, {3, "Ally/Foe"}, {0, NULL}};
|
||||
consvar_t cv_seenames = {"seenames", "Off", CV_SAVE, seenames_cons_t, 0, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_allowseenames = {"allowseenames", "Yes", CV_NETVAR, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_allowseenames = {"allowseenames", "No", CV_NETVAR, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
#endif
|
||||
|
||||
// these are just meant to be saved to the config
|
||||
|
@ -336,13 +336,15 @@ consvar_t cv_shrink = {"shrink", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NUL
|
|||
consvar_t cv_thundershield = {"thundershield", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_hyudoro = {"hyudoro", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_pogospring = {"pogospring", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_kitchensink = {"kitchensink", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_triplesneaker = {"triplesneaker", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_triplebanana = {"triplebanana", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_decabanana = {"decabanana", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_tripleorbinaut = {"tripleorbinaut", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_quadorbinaut = {"quadorbinaut", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_dualjawz = {"dualjawz", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_karthud = {"karthud", "Default", CV_SAVE|CV_CALL, karthud_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
static CV_PossibleValue_t kartminimap_cons_t[] = {{0, "MIN"}, {10, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_kartminimap = {"kartminimap", "4", CV_SAVE, kartminimap_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_kartcheck = {"kartcheck", "Yes", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
@ -353,7 +355,9 @@ static CV_PossibleValue_t kartbumpers_cons_t[] = {{1, "MIN"}, {12, "MAX"}, {0, N
|
|||
consvar_t cv_kartbumpers = {"kartbumpers", "3", CV_NETVAR|CV_CHEAT, kartbumpers_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_kartfrantic = {"kartfrantic", "Off", CV_NETVAR|CV_CHEAT|CV_CALL|CV_NOINIT, CV_OnOff, KartFrantic_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_kartcomeback = {"kartcomeback", "On", CV_NETVAR|CV_CHEAT|CV_CALL|CV_NOINIT, CV_OnOff, KartComeback_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_kartmirror = {"kartmirror", "Off", CV_NETVAR|CV_CHEAT|CV_CALL|CV_NOINIT, CV_OnOff, KartMirror_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_kartencore = {"kartencore", "Off", CV_NETVAR|CV_CALL|CV_NOINIT, CV_OnOff, KartEncore_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
static CV_PossibleValue_t kartvoterulechanges_cons_t[] = {{0, "Never"}, {1, "Sometimes"}, {2, "Frequent"}, {3, "Always"}, {0, NULL}};
|
||||
consvar_t cv_kartvoterulechanges = {"kartvoterulechanges", "Sometimes", CV_NETVAR, kartvoterulechanges_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
static CV_PossibleValue_t kartspeedometer_cons_t[] = {{0, "Off"}, {1, "Kilometers"}, {2, "Miles"}, {3, "Fracunits"}, {0, NULL}};
|
||||
consvar_t cv_kartspeedometer = {"kartdisplayspeed", "Off", CV_SAVE, kartspeedometer_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; // use tics in display
|
||||
static CV_PossibleValue_t kartvoices_cons_t[] = {{0, "Never"}, {1, "Tasteful"}, {2, "Meme"}, {0, NULL}};
|
||||
|
@ -366,8 +370,10 @@ static CV_PossibleValue_t kartdebugitem_cons_t[] = {{-1, "MIN"}, {NUMKARTITEMS-1
|
|||
consvar_t cv_kartdebugitem = {"kartdebugitem", "0", CV_NETVAR|CV_CHEAT, kartdebugitem_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
static CV_PossibleValue_t kartdebugamount_cons_t[] = {{1, "MIN"}, {255, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_kartdebugamount = {"kartdebugamount", "1", CV_NETVAR|CV_CHEAT, kartdebugamount_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_kartdebugcheckpoint = {"kartdebugcheckpoint", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_kartdebugshrink = {"kartdebugshrink", "Off", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_kartdebugdistribution = {"kartdebugdistribution", "Off", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_kartdebugcheckpoint = {"kartdebugcheckpoint", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
static CV_PossibleValue_t votetime_cons_t[] = {{10, "MIN"}, {3600, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_votetime = {"votetime", "20", CV_NETVAR, votetime_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
@ -379,7 +385,7 @@ consvar_t cv_gravity = {"gravity", "0.8", CV_RESTRICT|CV_FLOAT|CV_CALL, NULL, Gr
|
|||
consvar_t cv_soundtest = {"soundtest", "0", CV_CALL, NULL, SoundTest_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
static CV_PossibleValue_t minitimelimit_cons_t[] = {{15, "MIN"}, {9999, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_countdowntime = {"countdowntime", "60", CV_NETVAR|CV_CHEAT, minitimelimit_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_countdowntime = {"countdowntime", "30", CV_NETVAR|CV_CHEAT, minitimelimit_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_touchtag = {"touchtag", "Off", CV_NETVAR, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_hidetime = {"hidetime", "30", CV_NETVAR|CV_CALL, minitimelimit_cons_t, Hidetime_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
@ -447,6 +453,7 @@ consvar_t cv_sleep = {"cpusleep", "-1", CV_SAVE, sleeping_cons_t, NULL, -1, NULL
|
|||
|
||||
INT16 gametype = GT_RACE; // SRB2kart
|
||||
boolean forceresetplayers = false;
|
||||
boolean deferencoremode = false;
|
||||
UINT8 splitscreen = 0;
|
||||
boolean circuitmap = true; // SRB2kart
|
||||
INT32 adminplayers[MAXPLAYERS];
|
||||
|
@ -1881,7 +1888,7 @@ INT32 mapchangepending = 0;
|
|||
*
|
||||
* \param mapnum Map number to change to.
|
||||
* \param gametype Gametype to switch to.
|
||||
* \param pultmode Is this 'Ultimate Mode'?
|
||||
* \param pencoremode Is this 'Encore Mode'?
|
||||
* \param resetplayers 1 to reset player scores and lives and such, 0 not to.
|
||||
* \param delay Determines how the function will be executed: 0 to do
|
||||
* it all right now (must not be done from a menu), 1 to
|
||||
|
@ -1890,18 +1897,16 @@ INT32 mapchangepending = 0;
|
|||
* \sa D_GameTypeChanged, Command_Map_f
|
||||
* \author Graue <graue@oceanbase.org>
|
||||
*/
|
||||
void D_MapChange(INT32 mapnum, INT32 newgametype, boolean pultmode, boolean resetplayers, INT32 delay, boolean skipprecutscene, boolean FLS)
|
||||
void D_MapChange(INT32 mapnum, INT32 newgametype, boolean pencoremode, boolean resetplayers, INT32 delay, boolean skipprecutscene, boolean FLS)
|
||||
{
|
||||
static char buf[2+MAX_WADPATH+1+4];
|
||||
static char *buf_p = buf;
|
||||
|
||||
forceresetplayers = false;
|
||||
|
||||
// The supplied data are assumed to be good.
|
||||
I_Assert(delay >= 0 && delay <= 2);
|
||||
|
||||
CONS_Debug(DBG_GAMELOGIC, "Map change: mapnum=%d gametype=%d ultmode=%d resetplayers=%d delay=%d skipprecutscene=%d\n",
|
||||
mapnum, newgametype, pultmode, resetplayers, delay, skipprecutscene);
|
||||
CONS_Debug(DBG_GAMELOGIC, "Map change: mapnum=%d gametype=%d encoremode=%d resetplayers=%d delay=%d skipprecutscene=%d\n",
|
||||
mapnum, newgametype, pencoremode, resetplayers, delay, skipprecutscene);
|
||||
|
||||
if (netgame || multiplayer)
|
||||
FLS = false;
|
||||
|
@ -1914,7 +1919,7 @@ void D_MapChange(INT32 mapnum, INT32 newgametype, boolean pultmode, boolean rese
|
|||
I_Assert(W_CheckNumForName(mapname) != LUMPERROR);
|
||||
|
||||
buf_p = buf;
|
||||
if (pultmode)
|
||||
if (pencoremode)
|
||||
flags |= 1;
|
||||
if (!resetplayers)
|
||||
flags |= 1<<1;
|
||||
|
@ -1982,8 +1987,12 @@ void D_SetupVote(void)
|
|||
INT32 i;
|
||||
UINT8 secondgt = G_SometimesGetDifferentGametype();
|
||||
|
||||
WRITEUINT8(p, gametype);
|
||||
if (cv_kartencore.value && G_RaceGametype())
|
||||
WRITEUINT8(p, (gametype|0x80));
|
||||
else
|
||||
WRITEUINT8(p, gametype);
|
||||
WRITEUINT8(p, secondgt);
|
||||
secondgt &= ~0x80;
|
||||
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
|
@ -2118,10 +2127,6 @@ static void Command_Map_f(void)
|
|||
return;
|
||||
}
|
||||
|
||||
// Ultimate Mode only in SP via menu
|
||||
if (netgame || multiplayer)
|
||||
ultimatemode = false;
|
||||
|
||||
// new gametype value
|
||||
// use current one by default
|
||||
i = COM_CheckParm("-gametype");
|
||||
|
@ -2186,7 +2191,7 @@ static void Command_Map_f(void)
|
|||
}
|
||||
|
||||
fromlevelselect = false;
|
||||
D_MapChange(newmapnum, newgametype, false, newresetplayers, 0, false, false);
|
||||
D_MapChange(newmapnum, newgametype, (boolean)cv_kartencore.value, newresetplayers, 0, false, false);
|
||||
}
|
||||
|
||||
/** Receives a map command and changes the map.
|
||||
|
@ -2202,6 +2207,9 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
|
|||
UINT8 flags;
|
||||
INT32 resetplayer = 1, lastgametype;
|
||||
UINT8 skipprecutscene, FLS;
|
||||
boolean pencoremode;
|
||||
|
||||
forceresetplayers = deferencoremode = false;
|
||||
|
||||
if (playernum != serverplayer && !IsPlayerAdmin(playernum))
|
||||
{
|
||||
|
@ -2222,9 +2230,7 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
|
|||
|
||||
flags = READUINT8(*cp);
|
||||
|
||||
ultimatemode = ((flags & 1) != 0);
|
||||
if (netgame || multiplayer)
|
||||
ultimatemode = false;
|
||||
pencoremode = ((flags & 1) != 0);
|
||||
|
||||
resetplayer = ((flags & (1<<1)) == 0);
|
||||
|
||||
|
@ -2234,6 +2240,9 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
|
|||
if (gametype != lastgametype)
|
||||
D_GameTypeChanged(lastgametype); // emulate consvar_t behavior for gametype
|
||||
|
||||
if (!G_RaceGametype())
|
||||
pencoremode = false;
|
||||
|
||||
skipprecutscene = ((flags & (1<<2)) != 0);
|
||||
|
||||
FLS = ((flags & (1<<3)) != 0);
|
||||
|
@ -2265,7 +2274,7 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
|
|||
LUAh_MapChange();
|
||||
#endif
|
||||
|
||||
G_InitNew(ultimatemode, mapname, resetplayer, skipprecutscene);
|
||||
G_InitNew(pencoremode, mapname, resetplayer, skipprecutscene);
|
||||
if (demoplayback && !timingdemo)
|
||||
precache = true;
|
||||
CON_ToggleOff();
|
||||
|
@ -5235,17 +5244,14 @@ static void KartSpeed_OnChange(void)
|
|||
}
|
||||
}
|
||||
|
||||
static void KartMirror_OnChange(void)
|
||||
static void KartEncore_OnChange(void)
|
||||
{
|
||||
if (G_RaceGametype())
|
||||
{
|
||||
if ((boolean)cv_kartmirror.value != mirrormode && gamestate == GS_LEVEL /*&& leveltime > starttime*/)
|
||||
CONS_Printf(M_GetText("Mirrored tracks will be turned %s next round.\n"), cv_kartmirror.value ? M_GetText("on") : M_GetText("off"));
|
||||
if ((boolean)cv_kartencore.value != encoremode && gamestate == GS_LEVEL /*&& leveltime > starttime*/)
|
||||
CONS_Printf(M_GetText("Encore Mode will be turned %s next round.\n"), cv_kartencore.value ? M_GetText("on") : M_GetText("off"));
|
||||
else
|
||||
{
|
||||
CONS_Printf(M_GetText("Mirrored tracks has been turned %s.\n"), cv_kartmirror.value ? M_GetText("on") : M_GetText("off"));
|
||||
mirrormode = (boolean)cv_kartmirror.value;
|
||||
}
|
||||
CONS_Printf(M_GetText("Encore Mode has been turned %s.\n"), cv_kartencore.value ? M_GetText("on") : M_GetText("off"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -112,11 +112,11 @@ extern consvar_t cv_recycler;*/
|
|||
extern consvar_t cv_sneaker, cv_rocketsneaker, cv_invincibility, cv_banana;
|
||||
extern consvar_t cv_eggmanmonitor, cv_orbinaut, cv_jawz, cv_mine;
|
||||
extern consvar_t cv_ballhog, cv_selfpropelledbomb, cv_grow, cv_shrink;
|
||||
extern consvar_t cv_thundershield, cv_hyudoro, cv_pogospring;
|
||||
extern consvar_t cv_thundershield, cv_hyudoro, cv_pogospring, cv_kitchensink;
|
||||
|
||||
extern consvar_t cv_triplesneaker, cv_triplebanana, cv_tripleorbinaut, cv_dualjawz;
|
||||
extern consvar_t cv_triplesneaker, cv_triplebanana, cv_decabanana;
|
||||
extern consvar_t cv_tripleorbinaut, cv_quadorbinaut, cv_dualjawz;
|
||||
|
||||
extern consvar_t cv_karthud;
|
||||
extern consvar_t cv_kartminimap;
|
||||
extern consvar_t cv_kartcheck;
|
||||
extern consvar_t cv_kartinvinsfx;
|
||||
|
@ -124,7 +124,8 @@ extern consvar_t cv_kartspeed;
|
|||
extern consvar_t cv_kartbumpers;
|
||||
extern consvar_t cv_kartfrantic;
|
||||
extern consvar_t cv_kartcomeback;
|
||||
extern consvar_t cv_kartmirror;
|
||||
extern consvar_t cv_kartencore;
|
||||
extern consvar_t cv_kartvoterulechanges;
|
||||
extern consvar_t cv_kartspeedometer;
|
||||
extern consvar_t cv_kartvoices;
|
||||
|
||||
|
@ -132,7 +133,8 @@ extern consvar_t cv_karteliminatelast;
|
|||
|
||||
extern consvar_t cv_votetime;
|
||||
|
||||
extern consvar_t cv_kartdebugitem, cv_kartdebugamount, cv_kartdebugcheckpoint, cv_kartdebugshrink;
|
||||
extern consvar_t cv_kartdebugitem, cv_kartdebugamount, cv_kartdebugshrink, cv_kartdebugdistribution;
|
||||
extern consvar_t cv_kartdebugcheckpoint;
|
||||
|
||||
extern consvar_t cv_itemfinder;
|
||||
|
||||
|
@ -251,7 +253,7 @@ void D_SendPlayerConfig(void);
|
|||
void Command_ExitGame_f(void);
|
||||
void Command_Retry_f(void);
|
||||
void D_GameTypeChanged(INT32 lastgametype); // not a real _OnChange function anymore
|
||||
void D_MapChange(INT32 pmapnum, INT32 pgametype, boolean pultmode, boolean presetplayers, INT32 pdelay, boolean pskipprecutscene, boolean pfromlevelselect);
|
||||
void D_MapChange(INT32 pmapnum, INT32 pgametype, boolean pencoremode, boolean presetplayers, INT32 pdelay, boolean pskipprecutscene, boolean pfromlevelselect);
|
||||
void D_SetupVote(void);
|
||||
void D_ModifyClientVote(SINT8 voted, UINT8 splitplayer);
|
||||
void D_PickVote(void);
|
||||
|
|
|
@ -276,6 +276,7 @@ typedef enum
|
|||
k_waypoint, // Waypoints.
|
||||
k_starpostwp, // Temporarily stores player waypoint for... some reason. Used when respawning and finishing.
|
||||
k_respawn, // Timer for the DEZ laser respawn effect
|
||||
k_dropdash, // Charge up for respawn Drop Dash
|
||||
|
||||
k_throwdir, // Held dir of controls; 1 = forward, 0 = none, -1 = backward (was "player->heldDir")
|
||||
k_lapanimation, // Used to show the lap start wing logo animation
|
||||
|
@ -291,12 +292,19 @@ typedef enum
|
|||
k_driftend, // Drift has ended, used to adjust character angle after drift
|
||||
k_driftcharge, // Charge your drift so you can release a burst of speed
|
||||
k_driftboost, // Boost you get from drifting
|
||||
k_boostcharge, // Charge-up for boosting at the start of the race, or when dropping from respawn
|
||||
k_boostcharge, // Charge-up for boosting at the start of the race
|
||||
k_startboost, // Boost you get from start of race or respawn drop dash
|
||||
k_jmp, // In Mario Kart, letting go of the jump button stops the drift
|
||||
k_offroad, // In Super Mario Kart, going offroad has lee-way of about 1 second before you start losing speed
|
||||
k_pogospring, // Pogo spring bounce effect
|
||||
k_brakestop, // Wait until you've made a complete stop for a few tics before letting brake go in reverse.
|
||||
k_waterskip, // Water skipping counter
|
||||
k_dashpadcooldown, // Separate the vanilla SA-style dash pads from using pw_flashing
|
||||
k_boostpower, // Base boost value, for offroad
|
||||
k_speedboost, // Boost value smoothing for max speed
|
||||
k_accelboost, // Boost value smoothing for acceleration
|
||||
k_boostcam, // Camera push forward on boost
|
||||
k_destboostcam, // Ditto
|
||||
|
||||
k_itemroulette, // Used for the roulette when deciding what item to give you (was "pw_kartitem")
|
||||
k_roulettetype, // Used for the roulette, for deciding type (currently only used for Battle, to give you better items from Karma items)
|
||||
|
@ -321,7 +329,8 @@ typedef enum
|
|||
k_eggmanheld, // Eggman monitor held, separate from k_itemheld so it doesn't stop you from getting items
|
||||
k_eggmanexplode, // Fake item recieved, explode in a few seconds
|
||||
k_eggmanblame, // Fake item recieved, who set this fake
|
||||
k_bananadrag, // After a second of holding a banana behind you, you start to slow down
|
||||
k_lastjawztarget, // Last person you target with jawz, for playing the target switch sfx
|
||||
k_bananadrag, // After a second of holding a banana behind you, you start to slow down
|
||||
k_spinouttimer, // Spin-out from a banana peel or oil slick (was "pw_bananacam")
|
||||
k_wipeoutslow, // Timer before you slowdown when getting wiped out
|
||||
k_justbumped, // Prevent players from endlessly bumping into each other
|
||||
|
|
185
src/dehacked.c
185
src/dehacked.c
|
@ -1221,6 +1221,8 @@ static void readlevelheader(MYFILE *f, INT32 num)
|
|||
mapheaderinfo[num-1]->countdown = (INT16)i;
|
||||
else if (fastcmp(word, "PALETTE"))
|
||||
mapheaderinfo[num-1]->palette = (UINT16)i;
|
||||
else if (fastcmp(word, "ENCOREPAL"))
|
||||
mapheaderinfo[num-1]->encorepal = (UINT16)i;
|
||||
else if (fastcmp(word, "NUMLAPS"))
|
||||
mapheaderinfo[num-1]->numlaps = (UINT8)i;
|
||||
else if (fastcmp(word, "UNLOCKABLE"))
|
||||
|
@ -2384,8 +2386,8 @@ static void readunlockable(MYFILE *f, INT32 num)
|
|||
else if (fastcmp(word, "OBJECTIVE"))
|
||||
deh_strlcpy(unlockables[num].objective, word2,
|
||||
sizeof (unlockables[num].objective), va("Unlockable %d: objective", num));
|
||||
else if (fastcmp(word, "HEIGHT"))
|
||||
unlockables[num].height = (UINT16)i;
|
||||
else if (fastcmp(word, "SHOWCONDITIONSET"))
|
||||
unlockables[num].showconditionset = (UINT8)i;
|
||||
else if (fastcmp(word, "CONDITIONSET"))
|
||||
unlockables[num].conditionset = (UINT8)i;
|
||||
else if (fastcmp(word, "NOCECHO"))
|
||||
|
@ -2416,6 +2418,8 @@ static void readunlockable(MYFILE *f, INT32 num)
|
|||
unlockables[num].type = SECRET_WARP;
|
||||
else if (fastcmp(word2, "SOUNDTEST"))
|
||||
unlockables[num].type = SECRET_SOUNDTEST;
|
||||
else if (fastcmp(word2, "ENCORE"))
|
||||
unlockables[num].type = SECRET_ENCORE;
|
||||
else
|
||||
unlockables[num].type = (INT16)i;
|
||||
}
|
||||
|
@ -6234,12 +6238,12 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
//}
|
||||
|
||||
// Drift Sparks
|
||||
"S_DRIFTSPARK1",
|
||||
"S_DRIFTSPARK2",
|
||||
"S_DRIFTSPARK3",
|
||||
"S_DRIFTSPARK4",
|
||||
"S_DRIFTSPARK5",
|
||||
"S_DRIFTSPARK6",
|
||||
"S_DRIFTSPARK_A1",
|
||||
"S_DRIFTSPARK_A2",
|
||||
"S_DRIFTSPARK_A3",
|
||||
"S_DRIFTSPARK_B1",
|
||||
"S_DRIFTSPARK_C1",
|
||||
"S_DRIFTSPARK_C2",
|
||||
|
||||
// Drift Smoke
|
||||
"S_DRIFTDUST1",
|
||||
|
@ -6247,8 +6251,34 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_DRIFTDUST3",
|
||||
"S_DRIFTDUST4",
|
||||
|
||||
// Fast lines
|
||||
"S_FASTLINE1",
|
||||
"S_FASTLINE2",
|
||||
"S_FASTLINE3",
|
||||
"S_FASTLINE4",
|
||||
"S_FASTLINE5",
|
||||
|
||||
// Fast dust release
|
||||
"S_FASTDUST1",
|
||||
"S_FASTDUST2",
|
||||
"S_FASTDUST3",
|
||||
"S_FASTDUST4",
|
||||
"S_FASTDUST5",
|
||||
"S_FASTDUST6",
|
||||
"S_FASTDUST7",
|
||||
|
||||
// Thunder Shield Burst
|
||||
|
||||
// Sneaker boost effect
|
||||
"S_BOOSTFLAME",
|
||||
"S_BOOSTSMOKESPAWNER",
|
||||
"S_BOOSTSMOKE1",
|
||||
"S_BOOSTSMOKE2",
|
||||
"S_BOOSTSMOKE3",
|
||||
"S_BOOSTSMOKE4",
|
||||
"S_BOOSTSMOKE5",
|
||||
"S_BOOSTSMOKE6",
|
||||
|
||||
// Sneaker Fire Trail
|
||||
"S_KARTFIRE1",
|
||||
"S_KARTFIRE2",
|
||||
|
@ -6362,6 +6392,8 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_JAWZ_DEAD2",
|
||||
//}
|
||||
|
||||
"S_PLAYERRETICULE", // Player reticule
|
||||
|
||||
// Special Stage Mine
|
||||
"S_SSMINE1",
|
||||
"S_SSMINE2",
|
||||
|
@ -6479,6 +6511,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
|
||||
// The legend
|
||||
"S_SINK",
|
||||
"S_SINK_SHIELD",
|
||||
"S_SINKTRAIL1",
|
||||
"S_SINKTRAIL2",
|
||||
"S_SINKTRAIL3",
|
||||
|
@ -7206,11 +7239,15 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
"MT_RANDOMITEM",
|
||||
"MT_RANDOMITEMPOP",
|
||||
|
||||
"MT_FASTLINE",
|
||||
"MT_FASTDUST",
|
||||
"MT_BOOSTFLAME",
|
||||
"MT_BOOSTSMOKE",
|
||||
"MT_SNEAKERTRAIL",
|
||||
"MT_SPARKLETRAIL",
|
||||
"MT_INVULNFLASH",
|
||||
"MT_WIPEOUTTRAIL",
|
||||
"MT_DRIFT",
|
||||
"MT_DRIFTSPARK",
|
||||
"MT_DRIFTDUST",
|
||||
|
||||
"MT_FAKESHIELD",
|
||||
|
@ -7226,6 +7263,8 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
"MT_JAWZ_DUD",
|
||||
"MT_JAWZ_SHIELD",
|
||||
|
||||
"MT_PLAYERRETICULE", // Jawz reticule
|
||||
|
||||
"MT_SSMINE_SHIELD", // Special Stage Mine stuff
|
||||
"MT_SSMINE",
|
||||
"MT_MINEEXPLOSION",
|
||||
|
@ -7245,6 +7284,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
"MT_THUNDERSHIELD", // Thunder Shield stuff
|
||||
|
||||
"MT_SINK", // Kitchen Sink Stuff
|
||||
"MT_SINK_SHIELD",
|
||||
"MT_SINKTRAIL",
|
||||
|
||||
"MT_BATTLEBUMPER", // Battle Mode bumper
|
||||
|
@ -7365,6 +7405,7 @@ static const char *const MOBJFLAG_LIST[] = {
|
|||
"NOCLIPTHING",
|
||||
"GRENADEBOUNCE",
|
||||
"RUNSPAWNFUNC",
|
||||
"DONTENCOREMAP",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -7526,68 +7567,68 @@ static const char *const ML_LIST[16] = {
|
|||
// Also includes Super colors
|
||||
static const char *COLOR_ENUMS[] = { // Rejigged for Kart.
|
||||
"NONE", // 00 // SKINCOLOR_NONE
|
||||
"IVORY", // 01 // SKINCOLOR_IVORY
|
||||
"WHITE", // 02 // SKINCOLOR_WHITE
|
||||
"SILVER", // 03 // SKINCOLOR_SILVER
|
||||
"CLOUDY", // 04 // SKINCOLOR_CLOUDY
|
||||
"GREY", // 05 // SKINCOLOR_GREY
|
||||
"NICKEL", // 06 // SKINCOLOR_NICKEL
|
||||
"BLACK", // 07 // SKINCOLOR_BLACK
|
||||
"SALMON", // 08 // SKINCOLOR_SALMON
|
||||
"PINK", // 09 // SKINCOLOR_PINK
|
||||
"ROSE", // 10 // SKINCOLOR_ROSE
|
||||
"RASPBERRY", // 11 // SKINCOLOR_RASPBERRY
|
||||
"RED", // 12 // SKINCOLOR_RED
|
||||
"RUBY", // 13 // SKINCOLOR_RUBY
|
||||
"CRIMSON", // 14 // SKINCOLOR_CRIMSON
|
||||
"DAWN", // 15 // SKINCOLOR_DAWN
|
||||
"CREAMSICLE", // 16 // SKINCOLOR_CREAMSICLE
|
||||
"ORANGE", // 17 // SKINCOLOR_ORANGE
|
||||
"PUMPKIN", // 18 // SKINCOLOR_PUMPKIN
|
||||
"ROSEWOOD", // 19 // SKINCOLOR_ROSEWOOD
|
||||
"BURGUNDY", // 20 // SKINCOLOR_BURGUNDY
|
||||
"BRONZE", // 21 // SKINCOLOR_BRONZE
|
||||
"SEPIA", // 22 // SKINCOLOR_SEPIA
|
||||
"BEIGE", // 23 // SKINCOLOR_BEIGE
|
||||
"BROWN", // 24 // SKINCOLOR_BROWN
|
||||
"LEATHER", // 25 // SKINCOLOR_LEATHER
|
||||
"PEACH", // 26 // SKINCOLOR_PEACH
|
||||
"CARAMEL", // 27 // SKINCOLOR_CARAMEL
|
||||
"TANGERINE", // 28 // SKINCOLOR_TANGERINE
|
||||
"GOLD", // 29 // SKINCOLOR_GOLD
|
||||
"VOMIT", // 30 // SKINCOLOR_VOMIT
|
||||
"YELLOW", // 31 // SKINCOLOR_YELLOW
|
||||
"CANARY", // 32 // SKINCOLOR_CANARY
|
||||
"OLIVE", // 33 // SKINCOLOR_OLIVE
|
||||
"GARDEN", // 34 // SKINCOLOR_GARDEN
|
||||
"LIME", // 35 // SKINCOLOR_LIME
|
||||
"WHITE", // 01 // SKINCOLOR_WHITE
|
||||
"SILVER", // 02 // SKINCOLOR_SILVER
|
||||
"GREY", // 03 // SKINCOLOR_GREY
|
||||
"NICKEL", // 04 // SKINCOLOR_NICKEL
|
||||
"BLACK", // 05 // SKINCOLOR_BLACK
|
||||
"SEPIA", // 06 // SKINCOLOR_SEPIA
|
||||
"BEIGE", // 07 // SKINCOLOR_BEIGE
|
||||
"BROWN", // 08 // SKINCOLOR_BROWN
|
||||
"LEATHER", // 09 // SKINCOLOR_LEATHER
|
||||
"SALMON", // 10 // SKINCOLOR_SALMON
|
||||
"PINK", // 11 // SKINCOLOR_PINK
|
||||
"ROSE", // 12 // SKINCOLOR_ROSE
|
||||
"RASPBERRY", // 13 // SKINCOLOR_RASPBERRY
|
||||
"RED", // 14 // SKINCOLOR_RED
|
||||
"RUBY", // 15 // SKINCOLOR_RUBY
|
||||
"CRIMSON", // 16 // SKINCOLOR_CRIMSON
|
||||
"KETCHUP", // 17 // SKINCOLOR_KETCHUP
|
||||
"DAWN", // 18 // SKINCOLOR_DAWN
|
||||
"CREAMSICLE", // 19 // SKINCOLOR_CREAMSICLE
|
||||
"ORANGE", // 20 // SKINCOLOR_ORANGE
|
||||
"PUMPKIN", // 21 // SKINCOLOR_PUMPKIN
|
||||
"ROSEWOOD", // 22 // SKINCOLOR_ROSEWOOD
|
||||
"BURGUNDY", // 23 // SKINCOLOR_BURGUNDY
|
||||
"TANGERINE", // 24 // SKINCOLOR_TANGERINE
|
||||
"PEACH", // 25 // SKINCOLOR_PEACH
|
||||
"CARAMEL", // 26 // SKINCOLOR_CARAMEL
|
||||
"GOLD", // 27 // SKINCOLOR_GOLD
|
||||
"BRONZE", // 28 // SKINCOLOR_BRONZE
|
||||
"YELLOW", // 29 // SKINCOLOR_YELLOW
|
||||
"MUSTARD", // 30 // SKINCOLOR_MUSTARD
|
||||
"OLIVE", // 31 // SKINCOLOR_OLIVE
|
||||
"VOMIT", // 32 // SKINCOLOR_VOMIT
|
||||
"GARDEN", // 33 // SKINCOLOR_GARDEN
|
||||
"LIME", // 34 // SKINCOLOR_LIME
|
||||
"DREAM", // 35 // SKINCOLOR_DREAM
|
||||
"TEA", // 36 // SKINCOLOR_TEA
|
||||
"ARMY", // 37 // SKINCOLOR_ARMY
|
||||
"PISTACHIO", // 38 // SKINCOLOR_PISTACHIO
|
||||
"PISTACHIO", // 37 // SKINCOLOR_PISTACHIO
|
||||
"ROBOHOOD", // 38 // SKINCOLOR_ROBOHOOD
|
||||
"MOSS", // 39 // SKINCOLOR_MOSS
|
||||
"MINT", // 40 // SKINCOLOR_MINT
|
||||
"GREEN", // 41 // SKINCOLOR_GREEN
|
||||
"ROBOHOOD", // 42 // SKINCOLOR_ROBOHOOD
|
||||
"PINETREE", // 43 // SKINCOLOR_PINETREE
|
||||
"EMERALD", // 44 // SKINCOLOR_EMERALD
|
||||
"SWAMP", // 45 // SKINCOLOR_SWAMP
|
||||
"AQUA", // 46 // SKINCOLOR_AQUA
|
||||
"TEAL", // 47 // SKINCOLOR_TEAL
|
||||
"CYAN", // 48 // SKINCOLOR_CYAN
|
||||
"PINETREE", // 42 // SKINCOLOR_PINETREE
|
||||
"EMERALD", // 43 // SKINCOLOR_EMERALD
|
||||
"SWAMP", // 44 // SKINCOLOR_SWAMP
|
||||
"AQUA", // 45 // SKINCOLOR_AQUA
|
||||
"TEAL", // 46 // SKINCOLOR_TEAL
|
||||
"CYAN", // 47 // SKINCOLOR_CYAN
|
||||
"JAWZ", // 48 // SKINCOLOR_JAWZ
|
||||
"CERULEAN", // 49 // SKINCOLOR_CERULEAN
|
||||
"SLATE", // 50 // SKINCOLOR_SLATE
|
||||
"STEEL", // 51 // SKINCOLOR_STEEL
|
||||
"PERIWINKLE", // 52 // SKINCOLOR_PERIWINKLE
|
||||
"BLUE", // 53 // SKINCOLOR_BLUE
|
||||
"SAPPHIRE", // 54 // SKINCOLOR_SAPPHIRE
|
||||
"BLUEBERRY", // 55 // SKINCOLOR_BLUEBERRY
|
||||
"NAVY", // 56 // SKINCOLOR_NAVY
|
||||
"JET", // 57 // SKINCOLOR_JET
|
||||
"NAVY", // 50 // SKINCOLOR_NAVY
|
||||
"SLATE", // 51 // SKINCOLOR_SLATE
|
||||
"STEEL", // 52 // SKINCOLOR_STEEL
|
||||
"JET", // 53 // SKINCOLOR_JET
|
||||
"PERIWINKLE", // 54 // SKINCOLOR_PERIWINKLE
|
||||
"BLUE", // 55 // SKINCOLOR_BLUE
|
||||
"SAPPHIRE", // 56 // SKINCOLOR_SAPPHIRE
|
||||
"BLUEBERRY", // 57 // SKINCOLOR_BLUEBERRY
|
||||
"DUSK", // 58 // SKINCOLOR_DUSK
|
||||
"PURPLE", // 59 // SKINCOLOR_PURPLE
|
||||
"LAVENDER", // 60 // SKINCOLOR_LAVENDER
|
||||
"INDIGO", // 61 // SKINCOLOR_INDIGO
|
||||
"BYZANTIUM", // 62 // SKINCOLOR_BYZANTIUM
|
||||
"BYZANTIUM", // 61 // SKINCOLOR_BYZANTIUM
|
||||
"POMEGRANATE", // 62 // SKINCOLOR_POMEGRANATE
|
||||
"LILAC", // 63 // SKINCOLOR_LILAC
|
||||
|
||||
// Super special awesome Super flashing colors!
|
||||
|
@ -7654,6 +7695,7 @@ static const char *const KARTSTUFF_LIST[] = {
|
|||
"WAYPOINT",
|
||||
"STARPOSTWP",
|
||||
"RESPAWN",
|
||||
"DROPDASH",
|
||||
|
||||
"THROWDIR",
|
||||
"LAPANIMATION",
|
||||
|
@ -7670,11 +7712,18 @@ static const char *const KARTSTUFF_LIST[] = {
|
|||
"DRIFTCHARGE",
|
||||
"DRIFTBOOST",
|
||||
"BOOSTCHARGE",
|
||||
"STARTBOOST",
|
||||
"JMP",
|
||||
"OFFROAD",
|
||||
"POGOSPRING",
|
||||
"BRAKESTOP",
|
||||
"WATERSKIP",
|
||||
"DASHPADCOOLDOWN",
|
||||
"BOOSTPOWER",
|
||||
"SPEEDBOOST",
|
||||
"ACCELBOOST",
|
||||
"BOOSTCAM",
|
||||
"DESTBOOSTCAM",
|
||||
|
||||
"ITEMROULETTE",
|
||||
"ROULETTETYPE",
|
||||
|
@ -7683,7 +7732,6 @@ static const char *const KARTSTUFF_LIST[] = {
|
|||
"ITEMAMOUNT",
|
||||
"ITEMHELD",
|
||||
|
||||
//"THUNDERANIM",
|
||||
"CURSHIELD",
|
||||
"HYUDOROTIMER",
|
||||
"STEALINGTIMER",
|
||||
|
@ -7697,6 +7745,7 @@ static const char *const KARTSTUFF_LIST[] = {
|
|||
"EGGMANHELD",
|
||||
"EGGMANEXPLODE",
|
||||
"EGGMANBLAME",
|
||||
"LASTJAWZTARGET",
|
||||
"BANANADRAG",
|
||||
"SPINOUTTIMER",
|
||||
"WIPEOUTSLOW",
|
||||
|
@ -8162,6 +8211,14 @@ struct {
|
|||
{"V_REDMAP",V_REDMAP},
|
||||
{"V_GRAYMAP",V_GRAYMAP},
|
||||
{"V_ORANGEMAP",V_ORANGEMAP},
|
||||
{"V_SKYMAP",V_SKYMAP},
|
||||
{"V_LAVENDERMAP",V_LAVENDERMAP},
|
||||
{"V_GOLDMAP",V_GOLDMAP},
|
||||
{"V_TEAMAP",V_TEAMAP},
|
||||
{"V_STEELMAP",V_STEELMAP},
|
||||
{"V_PINKMAP",V_PINKMAP},
|
||||
{"V_TEALMAP",V_TEALMAP},
|
||||
{"V_PEACHMAP",V_PEACHMAP},
|
||||
{"V_TRANSLUCENT",V_TRANSLUCENT},
|
||||
{"V_10TRANS",V_10TRANS},
|
||||
{"V_20TRANS",V_20TRANS},
|
||||
|
|
|
@ -232,13 +232,15 @@ extern FILE *logstream;
|
|||
typedef enum
|
||||
{
|
||||
SKINCOLOR_NONE = 0,
|
||||
SKINCOLOR_IVORY,
|
||||
SKINCOLOR_WHITE,
|
||||
SKINCOLOR_SILVER,
|
||||
SKINCOLOR_CLOUDY,
|
||||
SKINCOLOR_GREY,
|
||||
SKINCOLOR_NICKEL,
|
||||
SKINCOLOR_BLACK,
|
||||
SKINCOLOR_SEPIA,
|
||||
SKINCOLOR_BEIGE,
|
||||
SKINCOLOR_BROWN,
|
||||
SKINCOLOR_LEATHER,
|
||||
SKINCOLOR_SALMON,
|
||||
SKINCOLOR_PINK,
|
||||
SKINCOLOR_ROSE,
|
||||
|
@ -246,54 +248,52 @@ typedef enum
|
|||
SKINCOLOR_RED,
|
||||
SKINCOLOR_RUBY,
|
||||
SKINCOLOR_CRIMSON,
|
||||
SKINCOLOR_KETCHUP,
|
||||
SKINCOLOR_DAWN,
|
||||
SKINCOLOR_CREAMSICLE,
|
||||
SKINCOLOR_ORANGE,
|
||||
SKINCOLOR_PUMPKIN,
|
||||
SKINCOLOR_ROSEWOOD,
|
||||
SKINCOLOR_BURGUNDY,
|
||||
SKINCOLOR_BRONZE,
|
||||
SKINCOLOR_SEPIA,
|
||||
SKINCOLOR_BEIGE,
|
||||
SKINCOLOR_BROWN,
|
||||
SKINCOLOR_LEATHER,
|
||||
SKINCOLOR_TANGERINE,
|
||||
SKINCOLOR_PEACH,
|
||||
SKINCOLOR_CARAMEL,
|
||||
SKINCOLOR_TANGERINE,
|
||||
SKINCOLOR_GOLD,
|
||||
SKINCOLOR_VOMIT,
|
||||
SKINCOLOR_BRONZE,
|
||||
SKINCOLOR_YELLOW,
|
||||
SKINCOLOR_CANARY,
|
||||
SKINCOLOR_MUSTARD,
|
||||
SKINCOLOR_OLIVE,
|
||||
SKINCOLOR_VOMIT,
|
||||
SKINCOLOR_GARDEN,
|
||||
SKINCOLOR_LIME,
|
||||
SKINCOLOR_DREAM,
|
||||
SKINCOLOR_TEA,
|
||||
SKINCOLOR_ARMY,
|
||||
SKINCOLOR_PISTACHIO,
|
||||
SKINCOLOR_ROBOHOOD,
|
||||
SKINCOLOR_MOSS,
|
||||
SKINCOLOR_MINT,
|
||||
SKINCOLOR_GREEN,
|
||||
SKINCOLOR_ROBOHOOD,
|
||||
SKINCOLOR_PINETREE,
|
||||
SKINCOLOR_EMERALD,
|
||||
SKINCOLOR_SWAMP,
|
||||
SKINCOLOR_AQUA,
|
||||
SKINCOLOR_TEAL,
|
||||
SKINCOLOR_CYAN,
|
||||
SKINCOLOR_JAWZ, // Oni's torment
|
||||
SKINCOLOR_CERULEAN,
|
||||
SKINCOLOR_NAVY,
|
||||
SKINCOLOR_SLATE,
|
||||
SKINCOLOR_STEEL,
|
||||
SKINCOLOR_JET,
|
||||
SKINCOLOR_PERIWINKLE,
|
||||
SKINCOLOR_BLUE,
|
||||
SKINCOLOR_SAPPHIRE, // sweet mother, i cannot weave – slender aphrodite has overcome me with longing for a girl
|
||||
SKINCOLOR_BLUEBERRY,
|
||||
SKINCOLOR_NAVY,
|
||||
SKINCOLOR_JET,
|
||||
SKINCOLOR_DUSK,
|
||||
SKINCOLOR_PURPLE,
|
||||
SKINCOLOR_LAVENDER,
|
||||
SKINCOLOR_INDIGO,
|
||||
SKINCOLOR_BYZANTIUM,
|
||||
SKINCOLOR_POMEGRANATE,
|
||||
SKINCOLOR_LILAC,
|
||||
|
||||
// Careful! MAXSKINCOLORS cannot be greater than 0x40 -- Which it is now.
|
||||
|
|
|
@ -80,7 +80,7 @@ extern INT16 gametype;
|
|||
extern UINT8 splitscreen;
|
||||
extern boolean circuitmap; // Does this level have 'circuit mode'?
|
||||
extern boolean fromlevelselect;
|
||||
extern boolean forceresetplayers;
|
||||
extern boolean forceresetplayers, deferencoremode;
|
||||
|
||||
// ========================================
|
||||
// Internal parameters for sound rendering.
|
||||
|
@ -243,6 +243,7 @@ typedef struct
|
|||
UINT8 cutscenenum; ///< Cutscene number to use, 0 for none.
|
||||
INT16 countdown; ///< Countdown until level end?
|
||||
UINT16 palette; ///< PAL lump to use on this map
|
||||
UINT16 encorepal; ///< PAL for encore mode
|
||||
UINT8 numlaps; ///< Number of laps in circuit mode, unless overridden.
|
||||
SINT8 unlockrequired; ///< Is an unlockable required to play this level? -1 if no.
|
||||
UINT8 levelselect; ///< Is this map available in the level select? If so, which map list is it available in?
|
||||
|
@ -448,7 +449,7 @@ extern INT32 cheats;
|
|||
// SRB2kart
|
||||
extern UINT8 gamespeed;
|
||||
extern boolean franticitems;
|
||||
extern boolean mirrormode;
|
||||
extern boolean encoremode, prevencoremode;
|
||||
extern boolean comeback;
|
||||
|
||||
extern SINT8 battlewanted[4];
|
||||
|
|
|
@ -1252,7 +1252,7 @@ void F_EndCutScene(void)
|
|||
if (runningprecutscene)
|
||||
{
|
||||
if (server)
|
||||
D_MapChange(gamemap, gametype, ultimatemode, precutresetplayer, 0, true, false);
|
||||
D_MapChange(gamemap, gametype, false, precutresetplayer, 0, true, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
168
src/g_game.c
168
src/g_game.c
|
@ -248,7 +248,8 @@ INT32 cheats; //for multiplayer cheat commands
|
|||
// SRB2Kart
|
||||
// Cvars that we don't want changed mid-game
|
||||
UINT8 gamespeed; // Game's current speed (or difficulty, or cc, or etc); 0 for easy, 1 for normal, 2 for hard
|
||||
boolean mirrormode; // Mirror Mode currently enabled?
|
||||
boolean encoremode = false; // Encore Mode currently enabled?
|
||||
boolean prevencoremode;
|
||||
boolean franticitems; // Frantic items currently enabled?
|
||||
boolean comeback; // Battle Mode's karma comeback is on/off
|
||||
|
||||
|
@ -764,9 +765,20 @@ const char *G_BuildMapName(INT32 map)
|
|||
{
|
||||
static char mapname[10] = "MAPXX"; // internal map name (wad resource name)
|
||||
|
||||
I_Assert(map > 0);
|
||||
I_Assert(map >= 0);
|
||||
I_Assert(map <= NUMMAPS);
|
||||
|
||||
if (map == 0) // hack???
|
||||
{
|
||||
if (gamestate == GS_TITLESCREEN)
|
||||
map = -1;
|
||||
else if (gamestate == GS_LEVEL)
|
||||
map = gamemap-1;
|
||||
else
|
||||
map = prevmap;
|
||||
map = G_RandMap(G_TOLFlag(cv_newgametype.value), map, false, false, 0, false)+1;
|
||||
}
|
||||
|
||||
if (map < 100)
|
||||
sprintf(&mapname[3], "%.2d", map);
|
||||
else
|
||||
|
@ -1294,7 +1306,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
|
||||
axis = JoyAxis(AXISTURN, ssplayer);
|
||||
|
||||
if (mirrormode)
|
||||
if (encoremode)
|
||||
{
|
||||
turnright ^= turnleft; // swap these using three XORs
|
||||
turnleft ^= turnright;
|
||||
|
@ -1345,8 +1357,8 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
// Specator mouse turning
|
||||
if (player->spectator)
|
||||
{
|
||||
cmd->angleturn = (INT16)(cmd->angleturn - (mousex*(mirrormode ? -1 : 1)*8));
|
||||
cmd->driftturn = (INT16)(cmd->driftturn - (mousex*(mirrormode ? -1 : 1)*8));
|
||||
cmd->angleturn = (INT16)(cmd->angleturn - (mousex*(encoremode ? -1 : 1)*8));
|
||||
cmd->driftturn = (INT16)(cmd->driftturn - (mousex*(encoremode ? -1 : 1)*8));
|
||||
}
|
||||
|
||||
// Speed bump strafing
|
||||
|
@ -1857,6 +1869,7 @@ boolean G_Responder(event_t *ev)
|
|||
|
||||
// tell who's the view
|
||||
CONS_Printf(M_GetText("Viewpoint: %s\n"), player_names[displayplayer]);
|
||||
P_ResetCamera(&players[displayplayer], &camera);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -2346,6 +2359,10 @@ void G_PlayerReborn(INT32 player)
|
|||
|
||||
// SRB2kart
|
||||
INT32 starpostwp;
|
||||
INT32 itemtype;
|
||||
INT32 itemamount;
|
||||
INT32 itemroulette;
|
||||
INT32 roulettetype;
|
||||
INT32 bumper;
|
||||
INT32 comebackpoints;
|
||||
INT32 wanted;
|
||||
|
@ -2403,10 +2420,39 @@ void G_PlayerReborn(INT32 player)
|
|||
pity = players[player].pity;
|
||||
|
||||
// SRB2kart
|
||||
starpostwp = players[player].kartstuff[k_starpostwp];
|
||||
bumper = players[player].kartstuff[k_bumper];
|
||||
comebackpoints = players[player].kartstuff[k_comebackpoints];
|
||||
wanted = players[player].kartstuff[k_wanted];
|
||||
if (leveltime <= starttime)
|
||||
{
|
||||
itemroulette = 0;
|
||||
roulettetype = 0;
|
||||
itemtype = 0;
|
||||
itemamount = 0;
|
||||
bumper = (G_BattleGametype() ? cv_kartbumpers.value : 0);
|
||||
comebackpoints = 0;
|
||||
wanted = 0;
|
||||
starpostwp = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
starpostwp = players[player].kartstuff[k_starpostwp];
|
||||
|
||||
itemroulette = (players[player].kartstuff[k_itemroulette] > 0 ? 1 : 0);
|
||||
roulettetype = players[player].kartstuff[k_roulettetype];
|
||||
|
||||
if (players[player].kartstuff[k_itemheld])
|
||||
{
|
||||
itemtype = 0;
|
||||
itemamount = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
itemtype = players[player].kartstuff[k_itemtype];
|
||||
itemamount = players[player].kartstuff[k_itemamount];
|
||||
}
|
||||
|
||||
bumper = players[player].kartstuff[k_bumper];
|
||||
comebackpoints = players[player].kartstuff[k_comebackpoints];
|
||||
wanted = players[player].kartstuff[k_wanted];
|
||||
}
|
||||
|
||||
p = &players[player];
|
||||
memset(p, 0, sizeof (*p));
|
||||
|
@ -2463,6 +2509,10 @@ void G_PlayerReborn(INT32 player)
|
|||
|
||||
// SRB2kart
|
||||
p->kartstuff[k_starpostwp] = starpostwp; // TODO: get these out of kartstuff, it causes desync
|
||||
p->kartstuff[k_itemroulette] = itemroulette;
|
||||
p->kartstuff[k_roulettetype] = roulettetype;
|
||||
p->kartstuff[k_itemtype] = itemtype;
|
||||
p->kartstuff[k_itemamount] = itemamount;
|
||||
p->kartstuff[k_bumper] = bumper;
|
||||
p->kartstuff[k_comebackpoints] = comebackpoints;
|
||||
p->kartstuff[k_comebacktimer] = comebacktime;
|
||||
|
@ -3097,15 +3147,52 @@ boolean G_BattleGametype(void)
|
|||
//
|
||||
// G_SometimesGetDifferentGametype
|
||||
//
|
||||
// I pity the fool who adds more gametypes later, because it'll require some element of randomisation which needs to be synched...
|
||||
// Although given this only gets called for the host, you could probably get away with M_Random.
|
||||
// Oh, yeah, and we sometimes flip encore mode on here too.
|
||||
//
|
||||
INT16 G_SometimesGetDifferentGametype(void)
|
||||
{
|
||||
if (randmapbuffer[NUMMAPS] != -1)
|
||||
boolean encorepossible = (M_SecretUnlocked(SECRET_ENCORE) && G_RaceGametype());
|
||||
|
||||
if (!cv_kartvoterulechanges.value) // never
|
||||
return gametype;
|
||||
|
||||
randmapbuffer[NUMMAPS] = gametype;
|
||||
if (randmapbuffer[NUMMAPS] > 0 && (encorepossible || cv_kartvoterulechanges.value != 3))
|
||||
{
|
||||
if (cv_kartvoterulechanges.value != 1)
|
||||
randmapbuffer[NUMMAPS]--;
|
||||
if (encorepossible)
|
||||
{
|
||||
switch (cv_kartvoterulechanges.value)
|
||||
{
|
||||
case 3: // always
|
||||
randmapbuffer[NUMMAPS] = 0; // gotta prep this in case it isn't already set
|
||||
break;
|
||||
case 2: // frequent
|
||||
encorepossible = M_RandomChance(FRACUNIT>>1);
|
||||
break;
|
||||
case 1: // sometimes
|
||||
default:
|
||||
encorepossible = M_RandomChance(FRACUNIT>>3);
|
||||
break;
|
||||
}
|
||||
if (encorepossible != (boolean)cv_kartencore.value)
|
||||
return (gametype|0x80);
|
||||
}
|
||||
return gametype;
|
||||
}
|
||||
|
||||
switch (cv_kartvoterulechanges.value) // okay, we're having a gametype change! when's the next one, luv?
|
||||
{
|
||||
case 3: // always
|
||||
randmapbuffer[NUMMAPS] = 1; // every other vote (or always if !encorepossible)
|
||||
break;
|
||||
case 1: // sometimes
|
||||
default:
|
||||
// fallthrough - happens when clearing buffer, but needs a reasonable countdown if cvar is modified
|
||||
case 2: // frequent
|
||||
randmapbuffer[NUMMAPS] = 5; // per "cup"
|
||||
break;
|
||||
}
|
||||
|
||||
if (gametype == GT_MATCH)
|
||||
return GT_RACE;
|
||||
|
@ -3173,6 +3260,7 @@ INT16 G_TOLFlag(INT32 pgametype)
|
|||
return INT16_MAX;
|
||||
}
|
||||
|
||||
#ifdef FLUSHMAPBUFFEREARLY
|
||||
static INT32 TOLMaps(INT16 tolflags)
|
||||
{
|
||||
INT32 num = 0;
|
||||
|
@ -3190,6 +3278,7 @@ static INT32 TOLMaps(INT16 tolflags)
|
|||
|
||||
return num;
|
||||
}
|
||||
#endif
|
||||
|
||||
/** Select a random map with the given typeoflevel flags.
|
||||
* If no map has those flags, this arbitrarily gives you map 1.
|
||||
|
@ -3208,6 +3297,8 @@ INT16 G_RandMap(INT16 tolflags, INT16 pprevmap, boolean dontadd, boolean ignoreb
|
|||
if (!okmaps)
|
||||
okmaps = Z_Malloc(NUMMAPS * sizeof(INT16), PU_STATIC, NULL);
|
||||
|
||||
tryagain:
|
||||
|
||||
// Find all the maps that are ok and and put them in an array.
|
||||
for (ix = 0; ix < NUMMAPS; ix++)
|
||||
{
|
||||
|
@ -3241,12 +3332,28 @@ INT16 G_RandMap(INT16 tolflags, INT16 pprevmap, boolean dontadd, boolean ignoreb
|
|||
okmaps[numokmaps++] = ix;
|
||||
}
|
||||
|
||||
if (numokmaps == 0)
|
||||
if (numokmaps == 0) // If there's no matches... (Goodbye, incredibly silly function chains :V)
|
||||
{
|
||||
if (!ignorebuffer)
|
||||
return G_RandMap(tolflags, pprevmap, dontadd, true, maphell, callagainsoon); // If there's no matches, (An incredibly silly function chain, buuut... :V)
|
||||
if (maphell)
|
||||
return G_RandMap(tolflags, pprevmap, dontadd, true, maphell-1, callagainsoon);
|
||||
{
|
||||
if (randmapbuffer[3] == -1) // Is the buffer basically empty?
|
||||
{
|
||||
ignorebuffer = true; // This will probably only help in situations where there's very few maps, but it's folly not to at least try it
|
||||
goto tryagain; //return G_RandMap(tolflags, pprevmap, dontadd, true, maphell, callagainsoon);
|
||||
}
|
||||
|
||||
for (bufx = 3; bufx < NUMMAPS; bufx++) // Let's clear all but the three most recent maps...
|
||||
randmapbuffer[bufx] = -1;
|
||||
if (cv_kartvoterulechanges.value == 1) // sometimes
|
||||
randmapbuffer[NUMMAPS] = 0;
|
||||
goto tryagain; //return G_RandMap(tolflags, pprevmap, dontadd, ignorebuffer, maphell, callagainsoon);
|
||||
}
|
||||
|
||||
if (maphell) // Any wiggle room to loosen our restrictions here?
|
||||
{
|
||||
maphell--;
|
||||
goto tryagain; //return G_RandMap(tolflags, pprevmap, dontadd, true, maphell-1, callagainsoon);
|
||||
}
|
||||
|
||||
ix = 0; // Sorry, none match. You get MAP01.
|
||||
for (bufx = 0; bufx < NUMMAPS+1; bufx++)
|
||||
|
@ -3408,11 +3515,15 @@ static void G_DoCompleted(void)
|
|||
|
||||
automapactive = false;
|
||||
|
||||
if (randmapbuffer[TOLMaps(G_TOLFlag(gametype))-4] != -1) // we're getting pretty full, so lets clear it
|
||||
#ifdef FLUSHMAPBUFFEREARLY
|
||||
if (randmapbuffer[TOLMaps(G_TOLFlag(gametype))-5] != -1) // We're getting pretty full, so! -- no need for this, handled in G_RandMap
|
||||
{
|
||||
for (i = 0; i < NUMMAPS+1; i++)
|
||||
for (i = 3; i < NUMMAPS; i++) // Let's clear all but the three most recent maps...
|
||||
randmapbuffer[i] = -1;
|
||||
if (cv_kartvoterulechanges.value == 1) // sometimes
|
||||
randmapbuffer[NUMMAPS] = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (gametype != GT_COOP)
|
||||
{
|
||||
|
@ -3477,6 +3588,7 @@ void G_NextLevel(void)
|
|||
}
|
||||
|
||||
forceresetplayers = false;
|
||||
deferencoremode = (boolean)cv_kartencore.value;
|
||||
}
|
||||
|
||||
gameaction = ga_worlddone;
|
||||
|
@ -3489,7 +3601,7 @@ static void G_DoWorldDone(void)
|
|||
// SRB2Kart
|
||||
D_MapChange(nextmap+1,
|
||||
gametype,
|
||||
ultimatemode,
|
||||
deferencoremode,
|
||||
forceresetplayers,
|
||||
0,
|
||||
false,
|
||||
|
@ -3561,7 +3673,7 @@ static void G_DoContinued(void)
|
|||
// Reset # of lives
|
||||
pl->lives = (ultimatemode) ? 1 : 3;
|
||||
|
||||
D_MapChange(gamemap, gametype, ultimatemode, false, 0, false, false);
|
||||
D_MapChange(gamemap, gametype, false, false, 0, false, false);
|
||||
|
||||
gameaction = ga_nothing;
|
||||
}
|
||||
|
@ -4075,7 +4187,7 @@ void G_SaveGame(UINT32 savegameslot)
|
|||
// Can be called by the startup code or the menu task,
|
||||
// consoleplayer, displayplayer, playeringame[] should be set.
|
||||
//
|
||||
void G_DeferedInitNew(boolean pultmode, const char *mapname, INT32 pickedchar, UINT8 ssplayers, boolean FLS)
|
||||
void G_DeferedInitNew(boolean pencoremode, const char *mapname, INT32 pickedchar, UINT8 ssplayers, boolean FLS)
|
||||
{
|
||||
INT32 i;
|
||||
UINT8 color = 0;
|
||||
|
@ -4120,14 +4232,14 @@ void G_DeferedInitNew(boolean pultmode, const char *mapname, INT32 pickedchar, U
|
|||
CV_StealthSetValue(&cv_playercolor, color);
|
||||
|
||||
if (mapname)
|
||||
D_MapChange(M_MapNumber(mapname[3], mapname[4]), gametype, pultmode, true, 1, false, FLS);
|
||||
D_MapChange(M_MapNumber(mapname[3], mapname[4]), gametype, pencoremode, true, 1, false, FLS);
|
||||
}
|
||||
|
||||
//
|
||||
// This is the map command interpretation something like Command_Map_f
|
||||
//
|
||||
// called at: map cmd execution, doloadgame, doplaydemo
|
||||
void G_InitNew(UINT8 pultmode, const char *mapname, boolean resetplayer, boolean skipprecutscene)
|
||||
void G_InitNew(UINT8 pencoremode, const char *mapname, boolean resetplayer, boolean skipprecutscene)
|
||||
{
|
||||
INT32 i;
|
||||
|
||||
|
@ -4137,8 +4249,8 @@ void G_InitNew(UINT8 pultmode, const char *mapname, boolean resetplayer, boolean
|
|||
S_ResumeAudio();
|
||||
}
|
||||
|
||||
if (netgame || multiplayer) // Nice try, haxor.
|
||||
ultimatemode = false;
|
||||
prevencoremode = ((gamestate == GS_TITLESCREEN) ? false : encoremode);
|
||||
encoremode = pencoremode;
|
||||
|
||||
legitimateexit = false; // SRB2Kart
|
||||
comebackshowninfo = false;
|
||||
|
@ -4227,7 +4339,6 @@ void G_InitNew(UINT8 pultmode, const char *mapname, boolean resetplayer, boolean
|
|||
// Don't carry over custom music change to another map.
|
||||
mapmusflags |= MUSIC_RELOADRESET;
|
||||
|
||||
ultimatemode = pultmode;
|
||||
playerdeadview = false;
|
||||
automapactive = false;
|
||||
imcontinuing = false;
|
||||
|
@ -4256,6 +4367,9 @@ char *G_BuildMapTitle(INT32 mapnum)
|
|||
{
|
||||
char *title = NULL;
|
||||
|
||||
if (mapnum == 0)
|
||||
return Z_StrDup("Random");
|
||||
|
||||
if (strcmp(mapheaderinfo[mapnum-1]->lvlttl, ""))
|
||||
{
|
||||
size_t len = 1;
|
||||
|
|
|
@ -107,7 +107,7 @@ extern boolean camspin, camspin2, camspin3, camspin4; // SRB2Kart
|
|||
void G_ChangePlayerReferences(mobj_t *oldmo, mobj_t *newmo);
|
||||
void G_DoReborn(INT32 playernum);
|
||||
void G_PlayerReborn(INT32 player);
|
||||
void G_InitNew(UINT8 pultmode, const char *mapname, boolean resetplayer,
|
||||
void G_InitNew(UINT8 pencoremode, const char *mapname, boolean resetplayer,
|
||||
boolean skipprecutscene);
|
||||
char *G_BuildMapTitle(INT32 mapnum);
|
||||
|
||||
|
@ -119,7 +119,7 @@ void G_SpawnPlayer(INT32 playernum, boolean starpost);
|
|||
|
||||
// Can be called by the startup code or M_Responder.
|
||||
// A normal game starts at map 1, but a warp test can start elsewhere
|
||||
void G_DeferedInitNew(boolean pultmode, const char *mapname, INT32 pickedchar,
|
||||
void G_DeferedInitNew(boolean pencoremode, const char *mapname, INT32 pickedchar,
|
||||
UINT8 ssplayers, boolean FLS);
|
||||
void G_DoLoadLevel(boolean resetplayer);
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ consvar_t cv_mousesens = {"mousesens", "35", CV_SAVE, mousesens_cons_t, NULL, 0,
|
|||
consvar_t cv_mousesens2 = {"mousesens2", "35", CV_SAVE, mousesens_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_mouseysens = {"mouseysens", "35", CV_SAVE, mousesens_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_mouseysens2 = {"mouseysens2", "35", CV_SAVE, mousesens_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_controlperkey = {"controlperkey", "One", CV_SAVE, onecontrolperkey_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_controlperkey = {"controlperkey", "Several", CV_SAVE, onecontrolperkey_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
INT32 mousex, mousey;
|
||||
INT32 mlooky; // like mousey but with a custom sensitivity for mlook
|
||||
|
@ -1208,6 +1208,7 @@ static const char *gamecontrolname[num_gamecontrols] =
|
|||
"scores",
|
||||
"console",
|
||||
"pause",
|
||||
"systemmenu",
|
||||
"custom1",
|
||||
"custom2",
|
||||
"custom3",
|
||||
|
@ -1283,68 +1284,53 @@ void G_Controldefault(void)
|
|||
gamecontrol[gc_fire ][0] = KEY_SPACE;
|
||||
gamecontrol[gc_lookback ][0] = KEY_LSHIFT;
|
||||
|
||||
gamecontrol[gc_aimforward ][1] = KEY_HAT1+0;
|
||||
gamecontrol[gc_aimbackward][1] = KEY_HAT1+1;
|
||||
gamecontrol[gc_turnleft ][1] = KEY_HAT1+2;
|
||||
gamecontrol[gc_turnright ][1] = KEY_HAT1+3;
|
||||
gamecontrol[gc_accelerate ][1] = KEY_JOY1+0; // A
|
||||
gamecontrol[gc_drift ][1] = KEY_JOY1+1; // X
|
||||
gamecontrol[gc_lookback ][1] = KEY_JOY1+1; // X
|
||||
gamecontrol[gc_brake ][1] = KEY_JOY1+2; // B
|
||||
gamecontrol[gc_fire ][1] = KEY_JOY1+4; // LB
|
||||
gamecontrol[gc_lookback ][1] = KEY_JOY1+5; // RB
|
||||
gamecontrol[gc_fire ][1] = KEY_JOY1+4; // LB
|
||||
gamecontrol[gc_drift ][1] = KEY_JOY1+5; // RB
|
||||
|
||||
// Extra controls
|
||||
gamecontrol[gc_pause ][0] = KEY_PAUSE;
|
||||
gamecontrol[gc_console ][0] = KEY_CONSOLE;
|
||||
gamecontrol[gc_talkkey ][0] = 't';
|
||||
gamecontrol[gc_teamkey ][0] = 'y';
|
||||
//gamecontrol[gc_teamkey ][0] = 'y';
|
||||
gamecontrol[gc_scores ][0] = KEY_TAB;
|
||||
gamecontrol[gc_spectate ][0] = '\'';
|
||||
|
||||
gamecontrol[gc_scores ][1] = KEY_JOY1+6; // Back
|
||||
gamecontrol[gc_spectate ][1] = KEY_JOY1+7; // Start (This is sort of like MP's pause...?)
|
||||
|
||||
gamecontrol[gc_lookup ][0] = KEY_PGUP;
|
||||
gamecontrol[gc_lookdown ][0] = KEY_PGDN;
|
||||
gamecontrol[gc_centerview ][0] = KEY_END;
|
||||
gamecontrol[gc_camreset ][0] = KEY_HOME;
|
||||
gamecontrol[gc_camtoggle ][0] = KEY_BACKSPACE;
|
||||
|
||||
//gamecontrol[gc_viewpoint ][1] = KEY_JOY1+3; // Y
|
||||
gamecontrol[gc_pause ][1] = KEY_JOY1+6; // Back
|
||||
gamecontrol[gc_systemmenu ][0] = KEY_JOY1+7; // Start
|
||||
gamecontrol[gc_camtoggle ][1] = KEY_HAT1+0; // D-Pad Up
|
||||
//gamecontrol[gc_screenshot ][1] = KEY_HAT1+1; // D-Pad Down
|
||||
gamecontrol[gc_talkkey ][1] = KEY_HAT1+2; // D-Pad Left
|
||||
gamecontrol[gc_scores ][1] = KEY_HAT1+3; // D-Pad Right
|
||||
|
||||
// Player 2 controls
|
||||
gamecontrolbis[gc_aimforward ][0] = KEY_2HAT1+0;
|
||||
gamecontrolbis[gc_aimbackward][0] = KEY_2HAT1+1;
|
||||
gamecontrolbis[gc_turnleft ][0] = KEY_2HAT1+2;
|
||||
gamecontrolbis[gc_turnright ][0] = KEY_2HAT1+3;
|
||||
gamecontrolbis[gc_accelerate ][0] = KEY_2JOY1+0; // A
|
||||
gamecontrolbis[gc_drift ][0] = KEY_2JOY1+1; // X
|
||||
gamecontrolbis[gc_lookback ][0] = KEY_2JOY1+1; // X
|
||||
gamecontrolbis[gc_brake ][0] = KEY_2JOY1+2; // B
|
||||
gamecontrolbis[gc_fire ][0] = KEY_2JOY1+4; // LB
|
||||
gamecontrolbis[gc_lookback ][0] = KEY_2JOY1+5; // RB
|
||||
gamecontrolbis[gc_spectate ][0] = KEY_2JOY1+7; // Start
|
||||
gamecontrolbis[gc_drift ][0] = KEY_2JOY1+5; // RB
|
||||
|
||||
// Player 3 controls
|
||||
gamecontrol3[gc_aimforward ][0] = KEY_3HAT1+0;
|
||||
gamecontrol3[gc_aimbackward][0] = KEY_3HAT1+1;
|
||||
gamecontrol3[gc_turnleft ][0] = KEY_3HAT1+2;
|
||||
gamecontrol3[gc_turnright ][0] = KEY_3HAT1+3;
|
||||
gamecontrol3[gc_accelerate ][0] = KEY_3JOY1+0; // A
|
||||
gamecontrol3[gc_drift ][0] = KEY_3JOY1+1; // X
|
||||
gamecontrol3[gc_lookback ][0] = KEY_3JOY1+1; // X
|
||||
gamecontrol3[gc_brake ][0] = KEY_3JOY1+2; // B
|
||||
gamecontrol3[gc_fire ][0] = KEY_3JOY1+4; // LB
|
||||
gamecontrol3[gc_lookback ][0] = KEY_3JOY1+5; // RB
|
||||
gamecontrol3[gc_spectate ][0] = KEY_3JOY1+7; // Start
|
||||
gamecontrol3[gc_drift ][0] = KEY_3JOY1+5; // RB
|
||||
|
||||
// Player 4 controls
|
||||
gamecontrol4[gc_aimforward ][0] = KEY_4HAT1+0;
|
||||
gamecontrol4[gc_aimbackward][0] = KEY_4HAT1+1;
|
||||
gamecontrol4[gc_turnleft ][0] = KEY_4HAT1+2;
|
||||
gamecontrol4[gc_turnright ][0] = KEY_4HAT1+3;
|
||||
gamecontrol4[gc_accelerate ][0] = KEY_4JOY1+0; // A
|
||||
gamecontrol4[gc_drift ][0] = KEY_4JOY1+1; // X
|
||||
gamecontrol4[gc_lookback ][0] = KEY_4JOY1+1; // X
|
||||
gamecontrol4[gc_brake ][0] = KEY_4JOY1+2; // B
|
||||
gamecontrol4[gc_fire ][0] = KEY_4JOY1+4; // LB
|
||||
gamecontrol4[gc_lookback ][0] = KEY_4JOY1+5; // RB
|
||||
gamecontrol4[gc_spectate ][0] = KEY_4JOY1+7; // Start
|
||||
gamecontrol4[gc_drift ][0] = KEY_4JOY1+5; // RB
|
||||
}
|
||||
//#endif
|
||||
|
||||
|
|
|
@ -114,6 +114,7 @@ typedef enum
|
|||
gc_scores,
|
||||
gc_console,
|
||||
gc_pause,
|
||||
gc_systemmenu,
|
||||
gc_custom1, // Lua scriptable
|
||||
gc_custom2, // Lua scriptable
|
||||
gc_custom3, // Lua scriptable
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "../m_argv.h"
|
||||
#include "../i_video.h"
|
||||
#include "../w_wad.h"
|
||||
#include "../p_setup.h" // levelfadecol
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// This is global data for planes rendering
|
||||
|
@ -646,7 +647,7 @@ static void WalkBSPNode(INT32 bspnum, poly_t *poly, UINT16 *leafnode, fixed_t *b
|
|||
sprintf(s, "%d%%", (++ls_percent)<<1);
|
||||
x = BASEVIDWIDTH/2;
|
||||
y = BASEVIDHEIGHT/2;
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31); // Black background to match fade in effect
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, levelfadecol); // White background to match fade in effect
|
||||
//V_DrawPatchFill(W_CachePatchName("SRB2BACK",PU_CACHE)); // SRB2 background, ehhh too bright.
|
||||
M_DrawTextBox(x-58, y-8, 13, 1);
|
||||
V_DrawString(x-50, y, V_YELLOWMAP, "Loading...");
|
||||
|
|
|
@ -109,7 +109,7 @@ typedef struct
|
|||
FLOAT fovxangle, fovyangle;
|
||||
UINT8 splitscreen;
|
||||
boolean flip; // screenflip
|
||||
boolean mirror; // SRB2Kart: Mirror Mode
|
||||
boolean mirror; // SRB2Kart: Encore Mode
|
||||
} FTransform;
|
||||
|
||||
// Transformed vector, as passed to HWR API
|
||||
|
|
|
@ -2041,7 +2041,8 @@ static void HWR_StoreWallRange(double startfrac, double endfrac)
|
|||
{
|
||||
// Single sided line... Deal only with the middletexture (if one exists)
|
||||
gr_midtexture = R_GetTextureNum(gr_sidedef->midtexture);
|
||||
if (gr_midtexture)
|
||||
if (gr_midtexture
|
||||
&& gr_linedef->special != 41) // Ignore horizon line for OGL
|
||||
{
|
||||
if (drawtextured)
|
||||
{
|
||||
|
@ -3154,7 +3155,6 @@ static void HWR_RenderPolyObjectPlane(polyobj_t *polysector, boolean isceiling,
|
|||
v3d->z = FIXED_TO_FLOAT(polysector->vertices[i]->y);
|
||||
}
|
||||
|
||||
|
||||
if (planecolormap)
|
||||
Surf.FlatColor.rgba = HWR_Lighting(lightlevel, planecolormap->rgba, planecolormap->fadergba, false, true);
|
||||
else
|
||||
|
@ -5451,7 +5451,13 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
|||
vis->colormap = R_GetTranslationColormap(TC_DEFAULT, thing->color, GTC_CACHE);
|
||||
}
|
||||
else
|
||||
{
|
||||
vis->colormap = colormaps;
|
||||
#ifdef GLENCORE
|
||||
if (encoremap && (thing->flags & (MF_SCENERY|MF_NOTHINK)))
|
||||
vis->colormap += (256*32);
|
||||
#endif
|
||||
}
|
||||
|
||||
// set top/bottom coords
|
||||
vis->ty = gzt;
|
||||
|
@ -5555,6 +5561,10 @@ static void HWR_ProjectPrecipitationSprite(precipmobj_t *thing)
|
|||
vis->mobj = (mobj_t *)thing;
|
||||
|
||||
vis->colormap = colormaps;
|
||||
#ifdef GLENCORE
|
||||
if (encoremap)
|
||||
vis->colormap += (256*32);
|
||||
#endif
|
||||
|
||||
// set top/bottom coords
|
||||
vis->ty = FIXED_TO_FLOAT(thing->z + spritecachedinfo[lumpoff].topoffset);
|
||||
|
@ -5580,7 +5590,7 @@ static void HWR_DrawSkyBackground(player_t *player)
|
|||
// 0--1
|
||||
|
||||
(void)player;
|
||||
HWR_GetTexture(skytexture);
|
||||
HWR_GetTexture(texturetranslation[skytexture]);
|
||||
|
||||
//Hurdler: the sky is the only texture who need 4.0f instead of 1.0
|
||||
// because it's called just after clearing the screen
|
||||
|
@ -5600,7 +5610,7 @@ static void HWR_DrawSkyBackground(player_t *player)
|
|||
// The only time this will probably be an issue is when a sky wider than 1024 is used as a sky AND a regular wall texture
|
||||
|
||||
angle = (dup_viewangle + gr_xtoviewangle[0]);
|
||||
dimensionmultiply = ((float)textures[skytexture]->width/256.0f);
|
||||
dimensionmultiply = ((float)textures[texturetranslation[skytexture]]->width/256.0f);
|
||||
|
||||
if (atransform.mirror)
|
||||
{
|
||||
|
@ -5615,7 +5625,7 @@ static void HWR_DrawSkyBackground(player_t *player)
|
|||
angle = aimingangle;
|
||||
|
||||
aspectratio = (float)vid.width/(float)vid.height;
|
||||
dimensionmultiply = ((float)textures[skytexture]->height/(128.0f*aspectratio));
|
||||
dimensionmultiply = ((float)textures[texturetranslation[skytexture]]->height/(128.0f*aspectratio));
|
||||
angleturn = (((float)ANGLE_45-1.0f)*aspectratio)*dimensionmultiply;
|
||||
|
||||
// Middle of the sky should always be at angle 0
|
||||
|
@ -6547,6 +6557,7 @@ static void HWR_RenderWall(wallVert3D *wallVerts, FSurfaceInfo *pSurf, FBITFIE
|
|||
alpha = pSurf->FlatColor.s.alpha; // retain the alpha
|
||||
|
||||
// Lighting is done here instead so that fog isn't drawn incorrectly on transparent walls after sorting
|
||||
|
||||
if (wallcolormap)
|
||||
{
|
||||
if (fogwall)
|
||||
|
|
|
@ -948,6 +948,15 @@ spritemd2found:
|
|||
fclose(f);
|
||||
}
|
||||
|
||||
// Define for getting accurate color brightness readings according to how the human eye sees them.
|
||||
// https://en.wikipedia.org/wiki/Relative_luminance
|
||||
// 0.2126 to red
|
||||
// 0.7152 to green
|
||||
// 0.0722 to blue
|
||||
// (See this same define in k_kart.c!)
|
||||
#define SETBRIGHTNESS(brightness,r,g,b) \
|
||||
brightness = (UINT8)(((1063*((UINT16)r)/5000) + (3576*((UINT16)g)/5000) + (361*((UINT16)b)/5000)) / 3)
|
||||
|
||||
static void HWR_CreateBlendedTexture(GLPatch_t *gpatch, GLPatch_t *blendgpatch, GLMipmap_t *grmip, INT32 skinnum, skincolors_t color)
|
||||
{
|
||||
UINT8 i;
|
||||
|
@ -978,40 +987,26 @@ static void HWR_CreateBlendedTexture(GLPatch_t *gpatch, GLPatch_t *blendgpatch,
|
|||
|
||||
// Average all of the translation's colors
|
||||
{
|
||||
UINT16 r, g, b;
|
||||
UINT8 div = 0;
|
||||
const UINT8 div = 6;
|
||||
const UINT8 start = 4;
|
||||
UINT32 r, g, b;
|
||||
|
||||
blendcolor = V_GetColor(colortranslations[color][0]);
|
||||
r = (UINT16)blendcolor.s.red;
|
||||
g = (UINT16)blendcolor.s.green;
|
||||
b = (UINT16)blendcolor.s.blue;
|
||||
blendcolor = V_GetColor(colortranslations[color][start]);
|
||||
r = (UINT32)(blendcolor.s.red*blendcolor.s.red);
|
||||
g = (UINT32)(blendcolor.s.green*blendcolor.s.green);
|
||||
b = (UINT32)(blendcolor.s.blue*blendcolor.s.blue);
|
||||
|
||||
for (i = 1; i < 16; i++)
|
||||
for (i = 1; i < div; i++)
|
||||
{
|
||||
RGBA_t nextcolor = V_GetColor(colortranslations[color][i]);
|
||||
UINT8 mul = 1;
|
||||
// Weight these shades more. Indices 1-9 weren't randomly picked, they are commonly used on sprites and are generally what the colors "look" like
|
||||
if (i >= 1 && i <= 9)
|
||||
mul++;
|
||||
// The mid & dark tons on the minimap icons get weighted even harder
|
||||
if (i == 4 || i == 6)
|
||||
mul += 2;
|
||||
// And the shade between them, why not
|
||||
if (i == 5)
|
||||
mul++;
|
||||
r += (UINT16)(nextcolor.s.red)*mul;
|
||||
g += (UINT16)(nextcolor.s.green)*mul;
|
||||
b += (UINT16)(nextcolor.s.blue)*mul;
|
||||
div += mul;
|
||||
RGBA_t nextcolor = V_GetColor(colortranslations[color][start+i]);
|
||||
r += (UINT32)(nextcolor.s.red*nextcolor.s.red);
|
||||
g += (UINT32)(nextcolor.s.green*nextcolor.s.green);
|
||||
b += (UINT32)(nextcolor.s.blue*nextcolor.s.blue);
|
||||
}
|
||||
|
||||
// This shouldn't happen.
|
||||
if (div < 1)
|
||||
div = 1;
|
||||
|
||||
blendcolor.s.red = (UINT8)(r/div);
|
||||
blendcolor.s.green = (UINT8)(g/div);
|
||||
blendcolor.s.blue = (UINT8)(b/div);
|
||||
blendcolor.s.red = (UINT8)(FixedSqrt((r/div)<<FRACBITS)>>FRACBITS);
|
||||
blendcolor.s.green = (UINT8)(FixedSqrt((g/div)<<FRACBITS)>>FRACBITS);
|
||||
blendcolor.s.blue = (UINT8)(FixedSqrt((b/div)<<FRACBITS)>>FRACBITS);
|
||||
}
|
||||
|
||||
// rainbow support, could theoretically support boss ones too
|
||||
|
@ -1028,11 +1023,11 @@ static void HWR_CreateBlendedTexture(GLPatch_t *gpatch, GLPatch_t *blendgpatch,
|
|||
{
|
||||
UINT32 tempcolor;
|
||||
UINT16 imagebright, blendbright, finalbright, colorbright;
|
||||
imagebright = (image->s.red+image->s.green+image->s.blue)/3;
|
||||
blendbright = (blendimage->s.red+blendimage->s.green+blendimage->s.blue)/3;
|
||||
SETBRIGHTNESS(imagebright,image->s.red,image->s.green,image->s.blue);
|
||||
SETBRIGHTNESS(blendbright,blendimage->s.red,blendimage->s.green,blendimage->s.blue);
|
||||
// slightly dumb average between the blend image color and base image colour, usually one or the other will be fully opaque anyway
|
||||
finalbright = (imagebright*(255-blendimage->s.alpha))/255 + (blendbright*blendimage->s.alpha)/255;
|
||||
colorbright = (blendcolor.s.red+blendcolor.s.green+blendcolor.s.blue)/3;
|
||||
SETBRIGHTNESS(colorbright,blendcolor.s.red,blendcolor.s.green,blendcolor.s.blue);
|
||||
|
||||
tempcolor = (finalbright*blendcolor.s.red)/colorbright;
|
||||
tempcolor = min(255, tempcolor);
|
||||
|
@ -1090,6 +1085,8 @@ static void HWR_CreateBlendedTexture(GLPatch_t *gpatch, GLPatch_t *blendgpatch,
|
|||
return;
|
||||
}
|
||||
|
||||
#undef SETBRIGHTNESS
|
||||
|
||||
static void HWR_GetBlendedTexture(GLPatch_t *gpatch, GLPatch_t *blendgpatch, INT32 skinnum, const UINT8 *colormap, skincolors_t color)
|
||||
{
|
||||
// mostly copied from HWR_GetMappedPatch, hence the similarities and comment
|
||||
|
|
191
src/hu_stuff.c
191
src/hu_stuff.c
|
@ -713,24 +713,55 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum)
|
|||
|| target == 0 // To everyone
|
||||
|| consoleplayer == target-1) // To you
|
||||
{
|
||||
const char *prefix = "", *cstart = "", *cend = "", *adminchar = "\x82~\x83", *remotechar = "\x82@\x83", *fmt, *fmt2;
|
||||
const char *prefix = "", *cstart = "", *cend = "", *adminchar = "\x82~\x83", *remotechar = "\x82@\x83", *fmt, *fmt2, *textcolor = "\x80";
|
||||
char *tempchar = NULL;
|
||||
|
||||
// In CTF and team match, color the player's name.
|
||||
if (G_GametypeHasTeams())
|
||||
{
|
||||
cend = "";
|
||||
if (players[playernum].ctfteam == 1) // red
|
||||
cstart = "\x85";
|
||||
else if (players[playernum].ctfteam == 2) // blue
|
||||
cstart = "\x84";
|
||||
|
||||
}
|
||||
|
||||
// player is a spectator?
|
||||
if (players[playernum].spectator)
|
||||
cstart = "\x86"; // grey name
|
||||
|
||||
if (players[playernum].spectator)
|
||||
{
|
||||
cstart = "\x86"; // grey name
|
||||
textcolor = "\x86";
|
||||
}
|
||||
else
|
||||
{
|
||||
const UINT8 color = players[playernum].skincolor;
|
||||
if (color <= SKINCOLOR_SILVER || color == SKINCOLOR_SLATE)
|
||||
cstart = "\x80"; // white
|
||||
else if (color <= SKINCOLOR_BEIGE || color == SKINCOLOR_JET)
|
||||
cstart = "\x86"; // V_GRAYMAP
|
||||
else if (color <= SKINCOLOR_LEATHER)
|
||||
cstart = "\x8A"; // V_GOLDMAP
|
||||
else if (color <= SKINCOLOR_ROSE || color == SKINCOLOR_LILAC)
|
||||
cstart = "\x8d"; // V_PINKMAP
|
||||
else if (color <= SKINCOLOR_KETCHUP)
|
||||
cstart = "\x85"; // V_REDMAP
|
||||
else if (color <= SKINCOLOR_TANGERINE)
|
||||
cstart = "\x87"; // V_ORANGEMAP
|
||||
else if (color <= SKINCOLOR_CARAMEL)
|
||||
cstart = "\x8f"; // V_PEACHMAP
|
||||
else if (color <= SKINCOLOR_BRONZE)
|
||||
cstart = "\x8A"; // V_GOLDMAP
|
||||
else if (color <= SKINCOLOR_MUSTARD)
|
||||
cstart = "\x82"; // V_YELLOWMAP
|
||||
else if (color <= SKINCOLOR_PISTACHIO)
|
||||
cstart = "\x8b"; // V_TEAMAP
|
||||
else if (color <= SKINCOLOR_SWAMP || color == SKINCOLOR_LIME)
|
||||
cstart = "\x83"; // V_GREENMAP
|
||||
else if (color <= SKINCOLOR_TEAL)
|
||||
cstart = "\x8e"; // V_TEALMAP
|
||||
else if (color <= SKINCOLOR_NAVY || color == SKINCOLOR_SAPPHIRE)
|
||||
cstart = "\x88"; // V_SKYMAP
|
||||
else if (color <= SKINCOLOR_STEEL)
|
||||
cstart = "\x8c"; // V_STEELMAP
|
||||
else if (color <= SKINCOLOR_BLUEBERRY)
|
||||
cstart = "\x84"; // V_BLUEMAP
|
||||
else if (color == SKINCOLOR_PURPLE)
|
||||
cstart = "\x81"; // V_PURPLEMAP
|
||||
else //if (color <= SKINCOLOR_POMEGRANATE)
|
||||
cstart = "\x89"; // V_LAVENDERMAP
|
||||
}
|
||||
prefix = cstart;
|
||||
|
||||
// Give admins and remote admins their symbols.
|
||||
if (playernum == serverplayer)
|
||||
tempchar = (char *)Z_Calloc(strlen(cstart) + strlen(adminchar) + 1, PU_STATIC, NULL);
|
||||
|
@ -757,26 +788,25 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum)
|
|||
}
|
||||
else if (target == 0) // To everyone
|
||||
{
|
||||
fmt = "\3%s\x83<%s%s%s\x83>\x80 %s\n";
|
||||
fmt2 = "%s\x83<%s%s%s\x83>\x80 %s";
|
||||
fmt = "\3%s<%s%s%s>\x80 %s%s\n";
|
||||
fmt2 = "%s<%s%s%s>\x80 %s%s";
|
||||
}
|
||||
else if (target-1 == consoleplayer) // To you
|
||||
{
|
||||
prefix = "\x82[PM]";
|
||||
cstart = "\x82";
|
||||
fmt = "\4%s<%s%s>%s\x80 %s\n"; // make this yellow, however.
|
||||
fmt2 = "%s<%s%s>%s\x80 %s";
|
||||
textcolor = "\x82";
|
||||
fmt = "\4%s<%s%s>%s\x80 %s%s\n"; // make this yellow, however.
|
||||
fmt2 = "%s<%s%s>%s\x80 %s%s";
|
||||
}
|
||||
else if (target > 0) // By you, to another player
|
||||
{
|
||||
// Use target's name.
|
||||
dispname = player_names[target-1];
|
||||
/*fmt = "\3\x82[TO]\x80%s%s%s* %s\n";
|
||||
fmt2 = "\x82[TO]\x80%s%s%s* %s";*/
|
||||
prefix = "\x82[TO]";
|
||||
cstart = "\x82";
|
||||
fmt = "\4%s<%s%s>%s\x80 %s\n"; // make this yellow, however.
|
||||
fmt2 = "%s<%s%s>%s\x80 %s";
|
||||
fmt = "\4%s<%s%s>%s\x80 %s%s\n"; // make this yellow, however.
|
||||
fmt2 = "%s<%s%s>%s\x80 %s%s";
|
||||
|
||||
}
|
||||
else // To your team
|
||||
|
@ -788,17 +818,17 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum)
|
|||
else
|
||||
prefix = "\x83"; // makes sure this doesn't implode if you sayteam on non-team gamemodes
|
||||
|
||||
fmt = "\3%s<%s%s>\x80%s %s\n";
|
||||
fmt2 = "%s<%s%s>\x80%s %s";
|
||||
fmt = "\3%s<%s%s>\x80%s %s%s\n";
|
||||
fmt2 = "%s<%s%s>\x80%s %s%s";
|
||||
|
||||
}
|
||||
|
||||
HU_AddChatText(va(fmt2, prefix, cstart, dispname, cend, msg)); // add it reguardless, in case we decide to change our mind about our chat type.
|
||||
HU_AddChatText(va(fmt2, prefix, cstart, dispname, cend, textcolor, msg)); // add it reguardless, in case we decide to change our mind about our chat type.
|
||||
|
||||
if OLDCHAT
|
||||
CONS_Printf(fmt, prefix, cstart, dispname, cend, msg);
|
||||
CONS_Printf(fmt, prefix, cstart, dispname, cend, textcolor, msg);
|
||||
else
|
||||
CON_LogMessage(va(fmt, prefix, cstart, dispname, cend, msg)); // save to log.txt
|
||||
CON_LogMessage(va(fmt, prefix, cstart, dispname, cend, textcolor, msg)); // save to log.txt
|
||||
|
||||
if (tempchar)
|
||||
Z_Free(tempchar);
|
||||
|
@ -840,6 +870,9 @@ static inline boolean HU_keyInChatString(char *s, char ch)
|
|||
{
|
||||
if (s[m])
|
||||
s[m+1] = (s[m]);
|
||||
|
||||
if (m < 1)
|
||||
break; // fix the chat going ham if your replace the first character. (For whatever reason this didn't happen in vanilla????)
|
||||
}
|
||||
s[c_input] = ch; // and replace this.
|
||||
}
|
||||
|
@ -1152,33 +1185,6 @@ boolean HU_Responder(event_t *ev)
|
|||
// HEADS UP DRAWING
|
||||
//======================================================================
|
||||
|
||||
// Gets string colormap, used for 0x80 color codes
|
||||
//
|
||||
static UINT8 *CHAT_GetStringColormap(INT32 colorflags) // pasted from video.c, sorry for the mess.
|
||||
{
|
||||
switch ((colorflags & V_CHARCOLORMASK) >> V_CHARCOLORSHIFT)
|
||||
{
|
||||
case 1: // 0x81, purple
|
||||
return purplemap;
|
||||
case 2: // 0x82, yellow
|
||||
return yellowmap;
|
||||
case 3: // 0x83, lgreen
|
||||
return greenmap;
|
||||
case 4: // 0x84, blue
|
||||
return bluemap;
|
||||
case 5: // 0x85, red
|
||||
return redmap;
|
||||
case 6: // 0x86, gray
|
||||
return graymap;
|
||||
case 7: // 0x87, orange
|
||||
return orangemap;
|
||||
case 8: // 0x88, sky
|
||||
return skymap;
|
||||
default: // reset
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
// Precompile a wordwrapped string to any given width.
|
||||
// This is a muuuch better method than V_WORDWRAP.
|
||||
// again stolen and modified a bit from video.c, don't mind me, will need to rearrange this one day.
|
||||
|
@ -1197,7 +1203,7 @@ static char *CHAT_WordWrap(INT32 x, INT32 w, INT32 option, const char *string)
|
|||
for (i = 0; i < slen; ++i)
|
||||
{
|
||||
c = newstring[i];
|
||||
if ((UINT8)c >= 0x80 && (UINT8)c <= 0x89) //color parsing! -Inuyasha 2.16.09
|
||||
if ((UINT8)c >= 0x80 && (UINT8)c <= 0x8F) //color parsing! -Inuyasha 2.16.09
|
||||
continue;
|
||||
|
||||
if (c == '\n')
|
||||
|
@ -1314,6 +1320,7 @@ static void HU_drawMiniChat(void)
|
|||
INT32 transflag = (timer >= 0 && timer <= 9) ? (timer*V_10TRANS) : 0; // you can make bad jokes out of this one.
|
||||
size_t j = 0;
|
||||
const char *msg = CHAT_WordWrap(x+2, cv_chatwidth.value-(charwidth*2), V_SNAPTOBOTTOM|V_SNAPTOLEFT|V_ALLOWLOWERCASE, chat_mini[i]); // get the current message, and word wrap it.
|
||||
UINT8 *colormap = NULL;
|
||||
|
||||
while(msg[j]) // iterate through msg
|
||||
{
|
||||
|
@ -1333,6 +1340,7 @@ static void HU_drawMiniChat(void)
|
|||
else if (msg[j] & 0x80) // stolen from video.c, nice.
|
||||
{
|
||||
clrflag = ((msg[j] & 0x7f) << V_CHARCOLORSHIFT) & V_CHARCOLORMASK;
|
||||
colormap = V_GetStringColormap(clrflag);
|
||||
++j;
|
||||
continue;
|
||||
}
|
||||
|
@ -1341,8 +1349,6 @@ static void HU_drawMiniChat(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
UINT8 *colormap = CHAT_GetStringColormap(clrflag);
|
||||
|
||||
if (cv_chatbacktint.value) // on request of wolfy
|
||||
V_DrawFillConsoleMap(x + dx + 2, y+dy, charwidth, charheight, 239|V_SNAPTOBOTTOM|V_SNAPTOLEFT);
|
||||
|
||||
|
@ -1366,54 +1372,24 @@ static void HU_drawMiniChat(void)
|
|||
|
||||
}
|
||||
|
||||
// HU_DrawUpArrow
|
||||
// You see, we don't have arrow graphics in 2.1 and I'm too lazy to include a 2 bytes file for it.
|
||||
|
||||
static void HU_DrawUpArrow(INT32 x, INT32 y, INT32 options)
|
||||
{
|
||||
// Ok I'm super lazy so let's make this as the worst draw function:
|
||||
V_DrawFill(x+2, y, 1, 1, 103|options);
|
||||
V_DrawFill(x+1, y+1, 3, 1, 103|options);
|
||||
V_DrawFill(x, y+2, 5, 1, 103|options); // that's the yellow part, I swear
|
||||
|
||||
V_DrawFill(x+3, y, 1, 1, 26|options);
|
||||
V_DrawFill(x+4, y+1, 1, 1, 26|options);
|
||||
V_DrawFill(x+5, y+2, 1, 1, 26|options);
|
||||
V_DrawFill(x, y+3, 6, 1, 26|options); // that's the black part. no racism intended. i swear.
|
||||
}
|
||||
|
||||
// HU_DrawDownArrow
|
||||
// Should we talk about anime waifus to pass the time? This feels retarded.
|
||||
|
||||
static void HU_DrawDownArrow(INT32 x, INT32 y, INT32 options)
|
||||
{
|
||||
// Ok I'm super lazy so let's make this as the worst draw function:
|
||||
V_DrawFill(x, y, 6, 1, 26|options);
|
||||
V_DrawFill(x, y+1, 5, 1, 26|options);
|
||||
V_DrawFill(x+1, y+2, 3, 1, 26|options);
|
||||
V_DrawFill(x+2, y+3, 1, 1, 26|options); // that's the black part. no racism intended. i swear.
|
||||
|
||||
V_DrawFill(x, y, 5, 1, 103|options);
|
||||
V_DrawFill(x+1, y+1, 3, 1, 103|options);
|
||||
V_DrawFill(x+2, y+2, 1, 1, 103|options); // that's the yellow part, I swear
|
||||
}
|
||||
|
||||
// HU_DrawChatLog
|
||||
// TODO: fix dumb word wrapping issues
|
||||
|
||||
static void HU_drawChatLog(INT32 offset)
|
||||
{
|
||||
INT32 charwidth = 4, charheight = 6;
|
||||
INT32 x = chatx+2, y, dx = 0, dy = 0;
|
||||
UINT32 i = 0;
|
||||
INT32 chat_topy, chat_bottomy;
|
||||
boolean atbottom = false;
|
||||
|
||||
// before we do anything, make sure that our scroll position isn't "illegal";
|
||||
// make sure that our scroll position isn't "illegal";
|
||||
if (chat_scroll > chat_maxscroll)
|
||||
chat_scroll = chat_maxscroll;
|
||||
|
||||
INT32 charwidth = 4, charheight = 6;
|
||||
INT32 x = chatx+2, y = chaty - offset*charheight - (chat_scroll*charheight) - cv_chatheight.value*charheight - 12 - (cv_kartspeedometer.value ? 16 : 0), dx = 0, dy = 0;
|
||||
UINT32 i = 0;
|
||||
INT32 chat_topy = y + chat_scroll*charheight;
|
||||
INT32 chat_bottomy = chat_topy + cv_chatheight.value*charheight;
|
||||
boolean atbottom = false;
|
||||
y = chaty - offset*charheight - (chat_scroll*charheight) - cv_chatheight.value*charheight - 12 - (cv_kartspeedometer.value ? 16 : 0);
|
||||
chat_topy = y + chat_scroll*charheight;
|
||||
chat_bottomy = chat_topy + cv_chatheight.value*charheight;
|
||||
|
||||
V_DrawFillConsoleMap(chatx, chat_topy, cv_chatwidth.value, cv_chatheight.value*charheight +2, 239|V_SNAPTOBOTTOM|V_SNAPTOLEFT); // log box
|
||||
|
||||
|
@ -1422,6 +1398,7 @@ static void HU_drawChatLog(INT32 offset)
|
|||
INT32 clrflag = 0;
|
||||
INT32 j = 0;
|
||||
const char *msg = CHAT_WordWrap(x+2, cv_chatwidth.value-(charwidth*2), V_SNAPTOBOTTOM|V_SNAPTOLEFT|V_ALLOWLOWERCASE, chat_log[i]); // get the current message, and word wrap it.
|
||||
UINT8 *colormap = NULL;
|
||||
while(msg[j]) // iterate through msg
|
||||
{
|
||||
if (msg[j] < HU_FONTSTART) // don't draw
|
||||
|
@ -1436,6 +1413,7 @@ static void HU_drawChatLog(INT32 offset)
|
|||
else if (msg[j] & 0x80) // stolen from video.c, nice.
|
||||
{
|
||||
clrflag = ((msg[j] & 0x7f) << V_CHARCOLORSHIFT) & V_CHARCOLORMASK;
|
||||
colormap = V_GetStringColormap(clrflag);
|
||||
++j;
|
||||
continue;
|
||||
}
|
||||
|
@ -1445,10 +1423,7 @@ static void HU_drawChatLog(INT32 offset)
|
|||
else
|
||||
{
|
||||
if ((y+dy+2 >= chat_topy) && (y+dy < (chat_bottomy)))
|
||||
{
|
||||
UINT8 *colormap = CHAT_GetStringColormap(clrflag);
|
||||
V_DrawChatCharacter(x + dx + 2, y+dy+2, msg[j++] |V_SNAPTOBOTTOM|V_SNAPTOLEFT, !cv_allcaps.value, colormap);
|
||||
}
|
||||
else
|
||||
j++; // don't forget to increment this or we'll get stuck in the limbo.
|
||||
}
|
||||
|
@ -1484,9 +1459,15 @@ static void HU_drawChatLog(INT32 offset)
|
|||
// draw arrows to indicate that we can (or not) scroll.
|
||||
|
||||
if (chat_scroll > 0)
|
||||
HU_DrawUpArrow(chatx-8, ((justscrolledup) ? (chat_topy-1) : (chat_topy)), V_SNAPTOBOTTOM | V_SNAPTOLEFT);
|
||||
{
|
||||
V_DrawCharacter(chatx-9, ((justscrolledup) ? (chat_topy-1) : (chat_topy)),
|
||||
'\x1A' | V_SNAPTOBOTTOM | V_SNAPTOLEFT, false); // up arrow
|
||||
}
|
||||
if (chat_scroll < chat_maxscroll)
|
||||
HU_DrawDownArrow(chatx-8, chat_bottomy-((justscrolleddown) ? 3 : 4), V_SNAPTOBOTTOM | V_SNAPTOLEFT);
|
||||
{
|
||||
V_DrawCharacter(chatx-9, chat_bottomy-((justscrolleddown) ? 5 : 6),
|
||||
'\x1B' | V_SNAPTOBOTTOM | V_SNAPTOLEFT, false); // down arrow
|
||||
}
|
||||
|
||||
justscrolleddown = false;
|
||||
justscrolledup = false;
|
||||
|
@ -1503,7 +1484,7 @@ static void HU_DrawChat(void)
|
|||
{
|
||||
INT32 charwidth = 4, charheight = 6;
|
||||
INT32 t = 0, c = 0, y = chaty - (typelines*charheight) - (cv_kartspeedometer.value ? 16 : 0);
|
||||
UINT32 i = 0;
|
||||
UINT32 i = 0, saylen = strlen(w_chat); // You learn new things everyday!
|
||||
const char *ntalk = "Say: ", *ttalk = "Team: ";
|
||||
const char *talk = ntalk;
|
||||
|
||||
|
@ -1519,7 +1500,7 @@ static void HU_DrawChat(void)
|
|||
}
|
||||
|
||||
V_DrawFillConsoleMap(chatx, y-1, cv_chatwidth.value, (typelines*charheight), 239 | V_SNAPTOBOTTOM | V_SNAPTOLEFT);
|
||||
|
||||
|
||||
while (talk[i])
|
||||
{
|
||||
if (talk[i] < HU_FONTSTART)
|
||||
|
@ -1546,7 +1527,7 @@ static void HU_DrawChat(void)
|
|||
if (hu_tick < 4)
|
||||
V_DrawChatCharacter(cursorx, cursory+1, '_' |V_SNAPTOBOTTOM|V_SNAPTOLEFT|t, !cv_allcaps.value, NULL);
|
||||
|
||||
if (cursorx == chatx+1) // a weirdo hack
|
||||
if (cursorx == chatx+1 && saylen == i) // a weirdo hack
|
||||
{
|
||||
typelines += 1;
|
||||
skippedline = true;
|
||||
|
|
469
src/info.c
469
src/info.c
File diff suppressed because it is too large
Load diff
55
src/info.h
55
src/info.h
|
@ -582,6 +582,10 @@ typedef enum sprite
|
|||
|
||||
SPR_RNDM, // Random Item Box
|
||||
SPR_RPOP, // Random Item Box Pop
|
||||
SPR_FAST, // Speed boost trail
|
||||
SPR_DSHR, // Speed boost dust release
|
||||
SPR_BOST, // Sneaker booster flame
|
||||
SPR_BOSM, // Sneaker booster smoke
|
||||
SPR_KFRE, // Sneaker fire trail
|
||||
SPR_KINV, // Invincibility sparkle trail
|
||||
SPR_KINF, // Invincibility flash
|
||||
|
@ -637,6 +641,7 @@ typedef enum sprite
|
|||
SPR_WANT,
|
||||
|
||||
SPR_PBOM, // player bomb
|
||||
SPR_RETI, // player reticule
|
||||
|
||||
SPR_VIEW, // First person view sprites; this is a sprite so that it can be replaced by a specialized MD2 draw!
|
||||
|
||||
|
@ -3078,12 +3083,12 @@ typedef enum state
|
|||
//}
|
||||
|
||||
// Drift Sparks
|
||||
S_DRIFTSPARK1,
|
||||
S_DRIFTSPARK2,
|
||||
S_DRIFTSPARK3,
|
||||
S_DRIFTSPARK4,
|
||||
S_DRIFTSPARK5,
|
||||
S_DRIFTSPARK6,
|
||||
S_DRIFTSPARK_A1,
|
||||
S_DRIFTSPARK_A2,
|
||||
S_DRIFTSPARK_A3,
|
||||
S_DRIFTSPARK_B1,
|
||||
S_DRIFTSPARK_C1,
|
||||
S_DRIFTSPARK_C2,
|
||||
|
||||
// Drift Smoke
|
||||
S_DRIFTDUST1,
|
||||
|
@ -3091,8 +3096,34 @@ typedef enum state
|
|||
S_DRIFTDUST3,
|
||||
S_DRIFTDUST4,
|
||||
|
||||
// Fast lines
|
||||
S_FASTLINE1,
|
||||
S_FASTLINE2,
|
||||
S_FASTLINE3,
|
||||
S_FASTLINE4,
|
||||
S_FASTLINE5,
|
||||
|
||||
// Fast dust release
|
||||
S_FASTDUST1,
|
||||
S_FASTDUST2,
|
||||
S_FASTDUST3,
|
||||
S_FASTDUST4,
|
||||
S_FASTDUST5,
|
||||
S_FASTDUST6,
|
||||
S_FASTDUST7,
|
||||
|
||||
// Magnet Burst
|
||||
|
||||
// Sneaker boost effect
|
||||
S_BOOSTFLAME,
|
||||
S_BOOSTSMOKESPAWNER,
|
||||
S_BOOSTSMOKE1,
|
||||
S_BOOSTSMOKE2,
|
||||
S_BOOSTSMOKE3,
|
||||
S_BOOSTSMOKE4,
|
||||
S_BOOSTSMOKE5,
|
||||
S_BOOSTSMOKE6,
|
||||
|
||||
// Sneaker Fire Trail
|
||||
S_KARTFIRE1,
|
||||
S_KARTFIRE2,
|
||||
|
@ -3206,6 +3237,8 @@ typedef enum state
|
|||
S_JAWZ_DEAD2,
|
||||
//}
|
||||
|
||||
S_PLAYERRETICULE, // Player reticule
|
||||
|
||||
// Special Stage Mine
|
||||
S_SSMINE1,
|
||||
S_SSMINE2,
|
||||
|
@ -3323,6 +3356,7 @@ typedef enum state
|
|||
|
||||
// The legend
|
||||
S_SINK,
|
||||
S_SINK_SHIELD,
|
||||
S_SINKTRAIL1,
|
||||
S_SINKTRAIL2,
|
||||
S_SINKTRAIL3,
|
||||
|
@ -4067,11 +4101,15 @@ typedef enum mobj_type
|
|||
MT_RANDOMITEM,
|
||||
MT_RANDOMITEMPOP,
|
||||
|
||||
MT_FASTLINE,
|
||||
MT_FASTDUST,
|
||||
MT_BOOSTFLAME,
|
||||
MT_BOOSTSMOKE,
|
||||
MT_SNEAKERTRAIL,
|
||||
MT_SPARKLETRAIL,
|
||||
MT_INVULNFLASH,
|
||||
MT_WIPEOUTTRAIL,
|
||||
MT_DRIFT,
|
||||
MT_DRIFTSPARK,
|
||||
MT_DRIFTDUST,
|
||||
|
||||
MT_FAKESHIELD,
|
||||
|
@ -4087,6 +4125,8 @@ typedef enum mobj_type
|
|||
MT_JAWZ_DUD,
|
||||
MT_JAWZ_SHIELD,
|
||||
|
||||
MT_PLAYERRETICULE, // Jawz reticule
|
||||
|
||||
MT_SSMINE, // Mine stuff
|
||||
MT_SSMINE_SHIELD,
|
||||
MT_MINEEXPLOSION,
|
||||
|
@ -4106,6 +4146,7 @@ typedef enum mobj_type
|
|||
MT_THUNDERSHIELD, // Thunder Shield stuff
|
||||
|
||||
MT_SINK, // Kitchen Sink Stuff
|
||||
MT_SINK_SHIELD,
|
||||
MT_SINKTRAIL,
|
||||
|
||||
MT_BATTLEBUMPER, // Battle Mode bumpers
|
||||
|
|
1634
src/k_kart.c
1634
src/k_kart.c
File diff suppressed because it is too large
Load diff
|
@ -42,6 +42,7 @@ void K_KillBananaChain(mobj_t *banana, mobj_t *inflictor, mobj_t *source);
|
|||
void K_CleanHnextList(mobj_t *work);
|
||||
void K_UpdateHnextList(player_t *player);
|
||||
void K_RepairOrbitChain(mobj_t *orbit);
|
||||
player_t *K_FindJawzTarget(mobj_t *actor, player_t *source);
|
||||
boolean K_CheckPlayersRespawnColliding(INT32 playernum, fixed_t x, fixed_t y);
|
||||
INT16 K_GetKartTurnValue(player_t *player, INT16 turnvalue);
|
||||
fixed_t K_GetKartDriftSparkValue(player_t *player);
|
||||
|
@ -56,11 +57,13 @@ void K_CalculateBattleWanted(void);
|
|||
void K_CheckBumpers(void);
|
||||
void K_CheckSpectateStatus(void);
|
||||
|
||||
const char *K_GetItemPatch(UINT8 item, boolean small);
|
||||
INT32 K_calcSplitFlags(INT32 snapflags);
|
||||
void K_LoadKartHUDGraphics(void);
|
||||
fixed_t K_FindCheckX(fixed_t px, fixed_t py, angle_t ang, fixed_t mx, fixed_t my);
|
||||
void K_drawKartHUD(void);
|
||||
void K_drawKartFreePlay(UINT32 flashtime);
|
||||
void K_drawKartTimestamp(tic_t drawtime, INT32 TX, INT32 TY, INT16 emblemmap, boolean playing);
|
||||
void K_LoadIconGraphics(char *facestr, INT32 skinnum);
|
||||
void K_ReloadSkinIconGraphics(void);
|
||||
|
||||
|
|
16
src/m_cond.c
16
src/m_cond.c
|
@ -96,12 +96,14 @@ extraemblem_t extraemblems[MAXEXTRAEMBLEMS] =
|
|||
// Default Unlockables
|
||||
unlockable_t unlockables[MAXUNLOCKABLES] =
|
||||
{
|
||||
// Name, Objective, Menu Height, ConditionSet, Unlock Type, Variable, NoCecho, NoChecklist
|
||||
/* 01 */ {"Egg Cup", "", 0, 1, SECRET_NONE, 0, false, false, 0},
|
||||
/* 02 */ {"SMK Cup", "", 0, 2, SECRET_NONE, 0, false, false, 0},
|
||||
/* 03 */ {"Chao Cup", "", 0, 3, SECRET_NONE, 0, false, false, 0},
|
||||
// Name, Objective, Showing Conditionset, ConditionSet, Unlock Type, Variable, NoCecho, NoChecklist
|
||||
/* 01 */ {"Egg Cup", "", -1, 1, SECRET_NONE, 0, false, false, 0},
|
||||
/* 02 */ {"SMK Cup", "", -1, 2, SECRET_NONE, 0, false, false, 0},
|
||||
/* 03 */ {"Chao Cup", "", -1, 3, SECRET_NONE, 0, false, false, 0},
|
||||
|
||||
/* 04 */ {"Record Attack", "", 0, -1, SECRET_RECORDATTACK, 0, true, true, 0},
|
||||
/* 04 */ {"Encore Mode", "", 3, 4, SECRET_ENCORE, 0, false, false, 0},
|
||||
|
||||
/* 05 */ {"Record Attack", "", -1, -1, SECRET_RECORDATTACK, 0, true, true, 0},
|
||||
};
|
||||
|
||||
// Default number of emblems and extra emblems
|
||||
|
@ -125,6 +127,10 @@ void M_SetupDefaultConditionSets(void)
|
|||
M_AddRawCondition(3, 1, UC_TOTALEMBLEMS, 30, 0, 0);
|
||||
M_AddRawCondition(3, 2, UC_MATCHESPLAYED, 50, 0, 0);
|
||||
|
||||
// -- 4: Collect 50 emblems OR play 150 matches
|
||||
M_AddRawCondition(4, 1, UC_TOTALEMBLEMS, 50, 0, 0);
|
||||
M_AddRawCondition(4, 2, UC_MATCHESPLAYED, 150, 0, 0);
|
||||
|
||||
// -- 10: Play 100 matches
|
||||
M_AddRawCondition(10, 1, UC_MATCHESPLAYED, 100, 0, 0);
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ typedef struct
|
|||
{
|
||||
char name[64];
|
||||
char objective[64];
|
||||
UINT16 height; // menu height
|
||||
UINT8 showconditionset;
|
||||
UINT8 conditionset;
|
||||
INT16 type;
|
||||
INT16 variable;
|
||||
|
@ -112,6 +112,7 @@ typedef struct
|
|||
UINT8 unlocked;
|
||||
} unlockable_t;
|
||||
|
||||
// I have NO idea why these are going negative, but whatever.
|
||||
#define SECRET_NONE -6 // Does nil. Use with levels locked by UnlockRequired
|
||||
#define SECRET_ITEMFINDER -5 // Enables Item Finder/Emblem Radar
|
||||
#define SECRET_EMBLEMHINTS -4 // Enables Emblem Hints
|
||||
|
@ -123,6 +124,7 @@ typedef struct
|
|||
#define SECRET_WARP 2 // Selectable warp
|
||||
#define SECRET_SOUNDTEST 3 // Sound Test
|
||||
#define SECRET_CREDITS 4 // Enables Credits
|
||||
#define SECRET_ENCORE 5 // Enables Encore mode cvar
|
||||
|
||||
// If you have more secrets than these variables allow in your game,
|
||||
// you seriously need to get a life.
|
||||
|
|
650
src/m_menu.c
650
src/m_menu.c
|
@ -57,6 +57,7 @@
|
|||
#include "st_stuff.h"
|
||||
#include "i_sound.h"
|
||||
#include "k_kart.h" // SRB2kart
|
||||
#include "d_player.h" // KITEM_ constants
|
||||
|
||||
// Condition Sets
|
||||
#include "m_cond.h"
|
||||
|
@ -231,6 +232,7 @@ menu_t SR_MainDef, SR_UnlockChecklistDef;
|
|||
// Misc. Main Menu
|
||||
static void M_SinglePlayerMenu(INT32 choice);
|
||||
static void M_Options(INT32 choice);
|
||||
static void M_Manual(INT32 choice);
|
||||
static void M_SelectableClearMenus(INT32 choice);
|
||||
static void M_Retry(INT32 choice);
|
||||
static void M_EndGame(INT32 choice);
|
||||
|
@ -355,7 +357,7 @@ static void M_DrawControl(void);
|
|||
static void M_DrawVideoMenu(void);
|
||||
static void M_DrawHUDOptions(void);
|
||||
static void M_DrawVideoMode(void);
|
||||
//static void M_DrawMonitorToggles(void);
|
||||
static void M_DrawMonitorToggles(void);
|
||||
#ifdef HWRENDER
|
||||
static void M_OGL_DrawFogMenu(void);
|
||||
static void M_OGL_DrawColorMenu(void);
|
||||
|
@ -387,6 +389,7 @@ static void M_HandleSetupMultiPlayer(INT32 choice);
|
|||
static void M_HandleFogColor(INT32 choice);
|
||||
#endif
|
||||
static void M_HandleVideoMode(INT32 choice);
|
||||
static void M_HandleMonitorToggles(INT32 choice);
|
||||
|
||||
// Consvar onchange functions
|
||||
static void Nextmap_OnChange(void);
|
||||
|
@ -399,7 +402,7 @@ static void Dummystaff_OnChange(void);
|
|||
// ==========================================================================
|
||||
|
||||
static CV_PossibleValue_t map_cons_t[] = {
|
||||
{1,"MIN"},
|
||||
{0,"MIN"},
|
||||
{NUMMAPS, "MAX"},
|
||||
{0, NULL}
|
||||
};
|
||||
|
@ -648,11 +651,19 @@ static menuitem_t MISC_ChangeLevelMenu[] =
|
|||
|
||||
static menuitem_t MISC_HelpMenu[] =
|
||||
{
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "HELPN01", M_HandleImageDef, 0},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "HELPN02", M_HandleImageDef, 0},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "HELPN03", M_HandleImageDef, 0},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "HELPM01", M_HandleImageDef, 0},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "HELPM02", M_HandleImageDef, 0},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "MANUAL00", M_HandleImageDef, 0},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "MANUAL01", M_HandleImageDef, 1},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "MANUAL02", M_HandleImageDef, 1},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "MANUAL03", M_HandleImageDef, 1},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "MANUAL04", M_HandleImageDef, 1},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "MANUAL05", M_HandleImageDef, 1},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "MANUAL06", M_HandleImageDef, 1},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "MANUAL07", M_HandleImageDef, 1},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "MANUAL08", M_HandleImageDef, 1},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "MANUAL09", M_HandleImageDef, 1},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "MANUAL10", M_HandleImageDef, 1},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "MANUAL11", M_HandleImageDef, 1},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "MANUAL12", M_HandleImageDef, 0},
|
||||
};
|
||||
|
||||
// --------------------------------
|
||||
|
@ -1081,8 +1092,9 @@ static menuitem_t OP_MainMenu[] =
|
|||
{IT_SUBMENU|IT_STRING, NULL, "Server Options...", &OP_ServerOptionsDef, 100},
|
||||
{IT_STRING|IT_CALL, NULL, "Add-on Options...", M_AddonsOptions, 110},
|
||||
|
||||
{IT_CALL|IT_STRING, NULL, "Play Credits", M_Credits, 130},
|
||||
{IT_SUBMENU|IT_STRING, NULL, "Erase Data...", &OP_EraseDataDef, 140},
|
||||
{IT_CALL|IT_STRING, NULL, "Tricks & Secrets (F1)", M_Manual, 130},
|
||||
{IT_CALL|IT_STRING, NULL, "Play Credits", M_Credits, 140},
|
||||
{IT_SUBMENU|IT_STRING, NULL, "Erase Data...", &OP_EraseDataDef, 150},
|
||||
};
|
||||
|
||||
static menuitem_t OP_ControlsMenu[] =
|
||||
|
@ -1116,12 +1128,13 @@ static menuitem_t OP_MoveControlsMenu[] =
|
|||
{IT_CONTROL, NULL, "Talk key", M_ChangeControl, gc_talkkey },
|
||||
//{IT_CONTROL, NULL, "Team-Talk key", M_ChangeControl, gc_teamkey },
|
||||
{IT_CONTROL, NULL, "Rankings/Scores", M_ChangeControl, gc_scores },
|
||||
{IT_CONTROL, NULL, "Open/Close Menu (ESC)", M_ChangeControl, gc_systemmenu},
|
||||
{IT_CONTROL, NULL, "Pause", M_ChangeControl, gc_pause },
|
||||
{IT_CONTROL, NULL, "Console", M_ChangeControl, gc_console },
|
||||
|
||||
{IT_SUBMENU | IT_STRING, NULL, "Gamepad Options...", &OP_Joystick1Def, 112},
|
||||
{IT_SUBMENU | IT_STRING, NULL, "Spectator Controls...", &OP_SpectateControlsDef, 120},
|
||||
{IT_SUBMENU | IT_STRING, NULL, "Custom Lua Actions...", &OP_CustomControlsDef, 128},
|
||||
{IT_SUBMENU | IT_STRING, NULL, "Gamepad Options...", &OP_Joystick1Def, 120},
|
||||
{IT_SUBMENU | IT_STRING, NULL, "Spectator Controls...", &OP_SpectateControlsDef, 128},
|
||||
{IT_SUBMENU | IT_STRING, NULL, "Custom Lua Actions...", &OP_CustomControlsDef, 136},
|
||||
};
|
||||
|
||||
static menuitem_t OP_SpectateControlsMenu[] =
|
||||
|
@ -1495,7 +1508,7 @@ static menuitem_t OP_GameOptionsMenu[] =
|
|||
|
||||
{IT_STRING | IT_CVAR, NULL, "Game Speed", &cv_kartspeed, 30},
|
||||
{IT_STRING | IT_CVAR, NULL, "Frantic Items", &cv_kartfrantic, 40},
|
||||
{IT_STRING | IT_CVAR, NULL, "Mirror Mode", &cv_kartmirror, 50},
|
||||
{IT_SECRET, NULL, "Encore Mode", &cv_kartencore, 50},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Number of Laps", &cv_basenumlaps, 70},
|
||||
{IT_STRING | IT_CVAR, NULL, "Exit Countdown Timer", &cv_countdowntime, 80},
|
||||
|
@ -1518,14 +1531,15 @@ static menuitem_t OP_ServerOptionsMenu[] =
|
|||
{IT_STRING | IT_CVAR, NULL, "Intermission Timer", &cv_inttime, 40},
|
||||
{IT_STRING | IT_CVAR, NULL, "Map Progression", &cv_advancemap, 50},
|
||||
{IT_STRING | IT_CVAR, NULL, "Voting Timer", &cv_votetime, 60},
|
||||
{IT_STRING | IT_CVAR, NULL, "Voting Rule Changes", &cv_kartvoterulechanges, 70},
|
||||
|
||||
#ifndef NONET
|
||||
{IT_STRING | IT_CVAR, NULL, "Max. Player Count", &cv_maxplayers, 80},
|
||||
{IT_STRING | IT_CVAR, NULL, "Allow Players to Join", &cv_allownewplayer, 90},
|
||||
//{IT_STRING | IT_CVAR, NULL, "Join on Map Change", &cv_joinnextround, 100},
|
||||
{IT_STRING | IT_CVAR, NULL, "Max. Player Count", &cv_maxplayers, 90},
|
||||
{IT_STRING | IT_CVAR, NULL, "Allow Players to Join", &cv_allownewplayer, 100},
|
||||
//{IT_STRING | IT_CVAR, NULL, "Join on Map Change", &cv_joinnextround, 110},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Allow WAD Downloading", &cv_downloading, 100},
|
||||
{IT_STRING | IT_CVAR, NULL, "Attempts to resynchronise", &cv_resynchattempts, 110},
|
||||
{IT_STRING | IT_CVAR, NULL, "Allow WAD Downloading", &cv_downloading, 110},
|
||||
{IT_STRING | IT_CVAR, NULL, "Attempts to resynchronise", &cv_resynchattempts, 120},
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -1552,7 +1566,7 @@ static menuitem_t OP_ServerOptionsMenu[] =
|
|||
{
|
||||
{IT_HEADER, NULL, "RACE", NULL, 2},
|
||||
{IT_STRING | IT_CVAR, NULL, "Game Speed", &cv_kartspeed, 10},
|
||||
{IT_STRING | IT_CVAR, NULL, "Mirror Mode", &cv_kartmirror, 18},
|
||||
{IT_STRING | IT_CVAR, NULL, "Encore Mode", &cv_kartencore, 18},
|
||||
{IT_STRING | IT_CVAR, NULL, "Number of Laps", &cv_numlaps, 26},
|
||||
{IT_STRING | IT_CVAR, NULL, "Use Map Lap Counts", &cv_usemapnumlaps, 34},
|
||||
|
||||
|
@ -1561,29 +1575,38 @@ static menuitem_t OP_ServerOptionsMenu[] =
|
|||
{IT_STRING | IT_CVAR, NULL, "Karma Comeback", &cv_kartcomeback, 66},
|
||||
};*/
|
||||
|
||||
#define ITEMTOGGLEBOTTOMRIGHT
|
||||
|
||||
static menuitem_t OP_MonitorToggleMenu[] =
|
||||
{
|
||||
// Printing handled by drawing function
|
||||
// Mostly handled by the drawing function.
|
||||
// Instead of using this for dumb monitors, lets use the new item bools we have :V
|
||||
{IT_STRING | IT_CVAR, NULL, "Sneakers", &cv_sneaker, 10},
|
||||
{IT_STRING | IT_CVAR, NULL, "Sneakers x3", &cv_triplesneaker, 18},
|
||||
{IT_STRING | IT_CVAR, NULL, "Rocket Sneakers", &cv_rocketsneaker, 26},
|
||||
{IT_STRING | IT_CVAR, NULL, "Invinciblity", &cv_invincibility, 34},
|
||||
{IT_STRING | IT_CVAR, NULL, "Bananas", &cv_banana, 42},
|
||||
{IT_STRING | IT_CVAR, NULL, "Bananas x3", &cv_triplebanana, 50},
|
||||
{IT_STRING | IT_CVAR, NULL, "Eggman Monitors", &cv_eggmanmonitor, 58},
|
||||
{IT_STRING | IT_CVAR, NULL, "Orbinauts", &cv_orbinaut, 66},
|
||||
{IT_STRING | IT_CVAR, NULL, "Orbinauts x3", &cv_tripleorbinaut, 74},
|
||||
{IT_STRING | IT_CVAR, NULL, "Jawz", &cv_jawz, 82},
|
||||
{IT_STRING | IT_CVAR, NULL, "Jawz x2", &cv_dualjawz, 90},
|
||||
{IT_STRING | IT_CVAR, NULL, "Mines", &cv_mine, 98},
|
||||
{IT_STRING | IT_CVAR, NULL, "Ballhogs", &cv_ballhog, 106},
|
||||
{IT_STRING | IT_CVAR, NULL, "Self-Propelled Bombs",&cv_selfpropelledbomb,114},
|
||||
{IT_STRING | IT_CVAR, NULL, "Grow", &cv_grow, 122},
|
||||
{IT_STRING | IT_CVAR, NULL, "Shrink", &cv_shrink, 130},
|
||||
{IT_STRING | IT_CVAR, NULL, "Thunder Shields", &cv_thundershield, 138},
|
||||
{IT_STRING | IT_CVAR, NULL, "Hyudoros", &cv_hyudoro, 146},
|
||||
{IT_STRING | IT_CVAR, NULL, "Pogo Springs", &cv_pogospring, 154},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "Sneakers", M_HandleMonitorToggles, KITEM_SNEAKER},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "Sneakers x3", M_HandleMonitorToggles, KRITEM_TRIPLESNEAKER},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "Rocket Sneakers", M_HandleMonitorToggles, KITEM_ROCKETSNEAKER},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "Toggle All", M_HandleMonitorToggles, 0},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "Bananas", M_HandleMonitorToggles, KITEM_BANANA},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "Bananas x3", M_HandleMonitorToggles, KRITEM_TRIPLEBANANA},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "Bananas x10", M_HandleMonitorToggles, KRITEM_TENFOLDBANANA},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "Eggman Monitors", M_HandleMonitorToggles, KITEM_EGGMAN},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "Orbinauts", M_HandleMonitorToggles, KITEM_ORBINAUT},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "Orbinauts x3", M_HandleMonitorToggles, KRITEM_TRIPLEORBINAUT},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "Orbinauts x4", M_HandleMonitorToggles, KRITEM_QUADORBINAUT},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "Mines", M_HandleMonitorToggles, KITEM_MINE},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "Jawz", M_HandleMonitorToggles, KITEM_JAWZ},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "Jawz x2", M_HandleMonitorToggles, KRITEM_DUALJAWZ},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "Ballhogs", M_HandleMonitorToggles, KITEM_BALLHOG},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "Self-Propelled Bombs", M_HandleMonitorToggles, KITEM_SPB},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "Invinciblity", M_HandleMonitorToggles, KITEM_INVINCIBILITY},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "Grow", M_HandleMonitorToggles, KITEM_GROW},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "Shrink", M_HandleMonitorToggles, KITEM_SHRINK},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "Thunder Shields", M_HandleMonitorToggles, KITEM_THUNDERSHIELD},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "Hyudoros", M_HandleMonitorToggles, KITEM_HYUDORO},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "Pogo Springs", M_HandleMonitorToggles, KITEM_POGOSPRING},
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "Kitchen Sinks", M_HandleMonitorToggles, KITEM_KITCHENSINK},
|
||||
#ifdef ITEMTOGGLEBOTTOMRIGHT
|
||||
{IT_KEYHANDLER | IT_NOTHING, NULL, "---", M_HandleMonitorToggles, 255},
|
||||
#endif
|
||||
};
|
||||
|
||||
// ==========================================================================
|
||||
|
@ -2017,18 +2040,17 @@ menu_t OP_ServerOptionsDef = DEFAULTMENUSTYLE("M_SERVER", OP_ServerOptionsMenu,
|
|||
|
||||
//menu_t OP_NetgameOptionsDef = DEFAULTMENUSTYLE("M_SERVER", OP_NetgameOptionsMenu, &OP_ServerOptionsDef, 30, 30);
|
||||
//menu_t OP_GametypeOptionsDef = DEFAULTMENUSTYLE("M_SERVER", OP_GametypeOptionsMenu, &OP_ServerOptionsDef, 30, 30);
|
||||
menu_t OP_MonitorToggleDef = DEFAULTMENUSTYLE("M_GAME", OP_MonitorToggleMenu, &OP_GameOptionsDef, 30, 30);
|
||||
/*menu_t OP_MonitorToggleDef =
|
||||
menu_t OP_MonitorToggleDef =
|
||||
{
|
||||
"M_SERVER",
|
||||
"M_GAME",
|
||||
sizeof (OP_MonitorToggleMenu)/sizeof (menuitem_t),
|
||||
&OP_ServerOptionsDef,
|
||||
&OP_GameOptionsDef,
|
||||
OP_MonitorToggleMenu,
|
||||
M_DrawMonitorToggles,
|
||||
30, 30,
|
||||
47, 30,
|
||||
0,
|
||||
NULL
|
||||
};*/
|
||||
};
|
||||
|
||||
#ifdef HWRENDER
|
||||
menu_t OP_OpenGLOptionsDef = DEFAULTMENUSTYLE("M_VIDEO", OP_OpenGLOptionsMenu, &OP_VideoOptionsDef, 30, 30);
|
||||
|
@ -2206,9 +2228,9 @@ static void Dummystaff_OnChange(void)
|
|||
// Newgametype. Used for gametype changes.
|
||||
static void Newgametype_OnChange(void)
|
||||
{
|
||||
if (menuactive)
|
||||
if (cv_nextmap.value && menuactive)
|
||||
{
|
||||
if(!mapheaderinfo[cv_nextmap.value-1])
|
||||
if (!mapheaderinfo[cv_nextmap.value-1])
|
||||
P_AllocMapHeader((INT16)(cv_nextmap.value-1));
|
||||
|
||||
if ((cv_newgametype.value == GT_RACE && !(mapheaderinfo[cv_nextmap.value-1]->typeoflevel & TOL_RACE)) || // SRB2kart
|
||||
|
@ -2525,18 +2547,21 @@ boolean M_Responder(event_t *ev)
|
|||
|
||||
if (ch == -1)
|
||||
return false;
|
||||
else if (ch == gamecontrol[gc_systemmenu][0]) // allow remappable ESC key
|
||||
ch = KEY_ESCAPE;
|
||||
|
||||
// F-Keys
|
||||
if (!menuactive)
|
||||
{
|
||||
noFurtherInput = true;
|
||||
|
||||
switch (ch)
|
||||
{
|
||||
case KEY_F1: // Help key
|
||||
if (modeattacking)
|
||||
return true;
|
||||
M_StartControlPanel();
|
||||
currentMenu = &MISC_HelpDef;
|
||||
M_Manual(INT32_MAX);
|
||||
itemOn = 0;
|
||||
return true;
|
||||
|
||||
|
@ -2791,10 +2816,9 @@ boolean M_Responder(event_t *ev)
|
|||
}
|
||||
|
||||
// Why _does_ backspace go back anyway?
|
||||
// Sal: Because it supports gamepads better. And still makes sense for keyboard.
|
||||
currentMenu->lastOn = itemOn;
|
||||
if (currentMenu->prevMenu)
|
||||
M_SetupNextMenu(currentMenu->prevMenu);
|
||||
//currentMenu->lastOn = itemOn;
|
||||
//if (currentMenu->prevMenu)
|
||||
// M_SetupNextMenu(currentMenu->prevMenu);
|
||||
return false;
|
||||
|
||||
default:
|
||||
|
@ -3919,6 +3943,10 @@ static void M_PrepareLevelSelect(void)
|
|||
//
|
||||
boolean M_CanShowLevelInList(INT32 mapnum, INT32 gt)
|
||||
{
|
||||
// Random map!
|
||||
if (mapnum == -1)
|
||||
return (gamestate != GS_TIMEATTACK && !modeattacking);
|
||||
|
||||
// Does the map exist?
|
||||
if (!mapheaderinfo[mapnum])
|
||||
return false;
|
||||
|
@ -4226,6 +4254,9 @@ static void M_StopMessage(INT32 choice)
|
|||
// You can even put multiple images in one menu!
|
||||
static void M_DrawImageDef(void)
|
||||
{
|
||||
// this is probably what the V_DrawFixedPatch screen-fill bullshit was for, right
|
||||
//V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31); -- never mind, screen fade
|
||||
|
||||
// Grr. Need to autodetect for pic_ts.
|
||||
pic_t *pictest = (pic_t *)W_CachePatchName(currentMenu->menuitems[itemOn].text,PU_CACHE);
|
||||
if (!pictest->zero)
|
||||
|
@ -4239,41 +4270,59 @@ static void M_DrawImageDef(void)
|
|||
V_DrawSmallScaledPatch(0,0,0,patch);
|
||||
}
|
||||
|
||||
if (currentMenu->numitems > 1)
|
||||
V_DrawString(0,192,V_TRANSLUCENT, va("PAGE %d of %hd", itemOn+1, currentMenu->numitems));
|
||||
if (currentMenu->menuitems[itemOn].alphaKey)
|
||||
{
|
||||
V_DrawString(2,BASEVIDHEIGHT-10, V_YELLOWMAP, va("%d", (itemOn<<1)-1)); // intentionally not highlightflags, unlike below
|
||||
V_DrawRightAlignedString(BASEVIDWIDTH-2,BASEVIDHEIGHT-10, V_YELLOWMAP, va("%d", itemOn<<1)); // ditto
|
||||
}
|
||||
else
|
||||
{
|
||||
INT32 x = ((itemOn ? 3 : 1)*BASEVIDWIDTH)>>2, y = (BASEVIDHEIGHT>>1) - 4;
|
||||
V_DrawCenteredString(x, y-10, highlightflags, "USE ARROW KEYS");
|
||||
V_DrawCharacter(x - 10 - (skullAnimCounter/5), y,
|
||||
'\x1C' | highlightflags, false); // left arrow
|
||||
V_DrawCharacter(x + 2 + (skullAnimCounter/5), y,
|
||||
'\x1D' | highlightflags, false); // right arrow
|
||||
V_DrawCenteredString(x, y+10, highlightflags, "TO LEAF THROUGH");
|
||||
}
|
||||
}
|
||||
|
||||
// Handles the ImageDefs. Just a specialized function that
|
||||
// uses left and right movement.
|
||||
static void M_HandleImageDef(INT32 choice)
|
||||
{
|
||||
boolean exitmenu = false;
|
||||
|
||||
switch (choice)
|
||||
{
|
||||
case KEY_RIGHTARROW:
|
||||
if (currentMenu->numitems == 1)
|
||||
break;
|
||||
|
||||
S_StartSound(NULL, sfx_menu1);
|
||||
if (itemOn >= (INT16)(currentMenu->numitems-1))
|
||||
itemOn = 0;
|
||||
else itemOn++;
|
||||
break;
|
||||
S_StartSound(NULL, sfx_menu1);
|
||||
itemOn++;
|
||||
break;
|
||||
|
||||
case KEY_LEFTARROW:
|
||||
if (currentMenu->numitems == 1)
|
||||
if (!itemOn)
|
||||
break;
|
||||
|
||||
S_StartSound(NULL, sfx_menu1);
|
||||
if (!itemOn)
|
||||
itemOn = currentMenu->numitems - 1;
|
||||
else itemOn--;
|
||||
itemOn--;
|
||||
break;
|
||||
|
||||
case KEY_ESCAPE:
|
||||
case KEY_ENTER:
|
||||
M_ClearMenus(true);
|
||||
exitmenu = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (exitmenu)
|
||||
{
|
||||
if (currentMenu->prevMenu)
|
||||
M_SetupNextMenu(currentMenu->prevMenu);
|
||||
else
|
||||
M_ClearMenus(true);
|
||||
}
|
||||
}
|
||||
|
||||
// ======================
|
||||
|
@ -4899,13 +4948,24 @@ static void M_Options(INT32 choice)
|
|||
OP_MainMenu[5].status = OP_MainMenu[6].status = (Playing() && !(server || IsPlayerAdmin(consoleplayer))) ? (IT_GRAYEDOUT) : (IT_STRING|IT_SUBMENU);
|
||||
|
||||
// if the player is playing _at all_, disable the erase data & credits options
|
||||
OP_MainMenu[8].status = (Playing()) ? (IT_GRAYEDOUT) : (IT_STRING|IT_CALL);
|
||||
OP_MainMenu[9].status = (Playing()) ? (IT_GRAYEDOUT) : (IT_STRING|IT_SUBMENU);
|
||||
OP_MainMenu[9].status = (Playing()) ? (IT_GRAYEDOUT) : (IT_STRING|IT_CALL);
|
||||
OP_MainMenu[10].status = (Playing()) ? (IT_GRAYEDOUT) : (IT_STRING|IT_SUBMENU);
|
||||
|
||||
OP_GameOptionsMenu[3].status =
|
||||
(M_SecretUnlocked(SECRET_ENCORE)) ? (IT_CVAR|IT_STRING) : IT_SECRET; // cv_kartencore
|
||||
|
||||
OP_MainDef.prevMenu = currentMenu;
|
||||
M_SetupNextMenu(&OP_MainDef);
|
||||
}
|
||||
|
||||
static void M_Manual(INT32 choice)
|
||||
{
|
||||
(void)choice;
|
||||
|
||||
MISC_HelpDef.prevMenu = (choice == INT32_MAX ? NULL : currentMenu);
|
||||
M_SetupNextMenu(&MISC_HelpDef);
|
||||
}
|
||||
|
||||
static void M_RetryResponse(INT32 ch)
|
||||
{
|
||||
if (ch != 'y' && ch != KEY_ENTER)
|
||||
|
@ -5054,7 +5114,8 @@ static void M_DrawChecklist(void)
|
|||
for (i = 0; i < MAXUNLOCKABLES; i++)
|
||||
{
|
||||
if (unlockables[i].name[0] == 0 || unlockables[i].nochecklist
|
||||
|| !unlockables[i].conditionset || unlockables[i].conditionset > MAXCONDITIONSETS)
|
||||
|| !unlockables[i].conditionset || unlockables[i].conditionset > MAXCONDITIONSETS
|
||||
|| !M_Achieved(unlockables[i].showconditionset - 1))
|
||||
continue;
|
||||
|
||||
++line;
|
||||
|
@ -6000,7 +6061,7 @@ static void M_ChoosePlayer(INT32 choice)
|
|||
{
|
||||
char *skin1,*skin2;
|
||||
INT32 skinnum;
|
||||
boolean ultmode = (ultimate_selectable && SP_PlayerDef.prevMenu == &SP_LoadDef && saveSlotSelected == NOSAVESLOT);
|
||||
//boolean ultmode = (ultimate_selectable && SP_PlayerDef.prevMenu == &SP_LoadDef && saveSlotSelected == NOSAVESLOT);
|
||||
|
||||
// skip this if forcecharacter
|
||||
if (mapheaderinfo[startmap-1] && mapheaderinfo[startmap-1]->forcecharacter[0] == '\0')
|
||||
|
@ -6037,7 +6098,7 @@ static void M_ChoosePlayer(INT32 choice)
|
|||
lastmapsaved = 0;
|
||||
gamecomplete = false;
|
||||
|
||||
G_DeferedInitNew(ultmode, G_BuildMapName(startmap), (UINT8)skinnum, 0, fromlevelselect);
|
||||
G_DeferedInitNew(false, G_BuildMapName(startmap), (UINT8)skinnum, 0, fromlevelselect);
|
||||
COM_BufAddText("dummyconsvar 1\n"); // G_DeferedInitNew doesn't do this
|
||||
}
|
||||
|
||||
|
@ -6093,7 +6154,8 @@ static void M_DrawStatsMaps(int location)
|
|||
boolean dotopname = true, dobottomarrow = (location < statsMax);
|
||||
|
||||
if (location)
|
||||
V_DrawString(10, y-(skullAnimCounter/5), highlightflags, "\x1A");
|
||||
V_DrawCharacter(10, y-(skullAnimCounter/5),
|
||||
'\x1A' | highlightflags, false); // up arrow
|
||||
|
||||
while (statsMapList[++i] != -1)
|
||||
{
|
||||
|
@ -6175,7 +6237,8 @@ static void M_DrawStatsMaps(int location)
|
|||
}
|
||||
bottomarrow:
|
||||
if (dobottomarrow)
|
||||
V_DrawString(10, y-8 + (skullAnimCounter/5), highlightflags, "\x1B");
|
||||
V_DrawCharacter(10, y-8 + (skullAnimCounter/5),
|
||||
'\x1B' | highlightflags, false); // up arrow
|
||||
}
|
||||
|
||||
static void M_DrawLevelStats(void)
|
||||
|
@ -6279,7 +6342,6 @@ void M_DrawTimeAttackMenu(void)
|
|||
INT32 i, x, y, cursory = 0;
|
||||
UINT16 dispstatus;
|
||||
patch_t *PictureOfUrFace;
|
||||
char beststr[40];
|
||||
|
||||
//S_ChangeMusicInternal("racent", true); // Eww, but needed for when user hits escape during demo playback
|
||||
|
||||
|
@ -6360,6 +6422,24 @@ void M_DrawTimeAttackMenu(void)
|
|||
// Level record list
|
||||
if (cv_nextmap.value)
|
||||
{
|
||||
INT32 dupadjust = (vid.width/vid.dupx);
|
||||
tic_t lap = 0, time = 0;
|
||||
if (mainrecords[cv_nextmap.value-1])
|
||||
{
|
||||
lap = mainrecords[cv_nextmap.value-1]->lap;
|
||||
time = mainrecords[cv_nextmap.value-1]->time;
|
||||
}
|
||||
|
||||
V_DrawFill((BASEVIDWIDTH - dupadjust)>>1, 78, dupadjust, 36, 239);
|
||||
|
||||
V_DrawRightAlignedString(149, 80, highlightflags, "BEST LAP:");
|
||||
K_drawKartTimestamp(lap, 19, 86, 0, false);
|
||||
|
||||
V_DrawRightAlignedString(292, 80, highlightflags, "BEST TIME:");
|
||||
K_drawKartTimestamp(time, 162, 86, cv_nextmap.value, false);
|
||||
}
|
||||
/*{
|
||||
char beststr[40];
|
||||
emblem_t *em;
|
||||
|
||||
if (!mainrecords[cv_nextmap.value-1] || !mainrecords[cv_nextmap.value-1]->time)
|
||||
|
@ -6402,7 +6482,7 @@ void M_DrawTimeAttackMenu(void)
|
|||
skipThisOne:
|
||||
em = M_GetLevelEmblems(-1);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
// ALWAYS DRAW player name, level name, skin and color even when not on this menu!
|
||||
if (currentMenu != &SP_TimeAttackDef)
|
||||
|
@ -6454,11 +6534,16 @@ static void M_TimeAttack(INT32 choice)
|
|||
|
||||
M_PrepareLevelSelect();
|
||||
M_SetupNextMenu(&SP_TimeAttackDef);
|
||||
Nextmap_OnChange();
|
||||
|
||||
G_SetGamestate(GS_TIMEATTACK);
|
||||
|
||||
if (cv_nextmap.value)
|
||||
Nextmap_OnChange();
|
||||
else
|
||||
CV_AddValue(&cv_nextmap, 1);
|
||||
|
||||
itemOn = tastart; // "Start" is selected.
|
||||
|
||||
G_SetGamestate(GS_TIMEATTACK);
|
||||
S_ChangeMusicInternal("racent", true);
|
||||
}
|
||||
|
||||
|
@ -7269,8 +7354,11 @@ static INT32 M_FindFirstMap(INT32 gtype)
|
|||
|
||||
for (i = 0; i < NUMMAPS; i++)
|
||||
{
|
||||
if (mapheaderinfo[i] && (mapheaderinfo[i]->typeoflevel & gtype))
|
||||
return i + 1;
|
||||
if (!mapheaderinfo[i])
|
||||
continue;
|
||||
if (!(mapheaderinfo[i]->typeoflevel & gtype))
|
||||
continue;
|
||||
return i + 1;
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
@ -7302,9 +7390,12 @@ static void M_StartServer(INT32 choice)
|
|||
if (metalrecording)
|
||||
G_StopMetalDemo();
|
||||
|
||||
if (!cv_nextmap.value)
|
||||
CV_SetValue(&cv_nextmap, G_RandMap(G_TOLFlag(cv_newgametype.value), -1, false, false, 0, false)+1);
|
||||
|
||||
if (ssplayers < 1)
|
||||
{
|
||||
D_MapChange(cv_nextmap.value, cv_newgametype.value, false, 1, 1, false, false);
|
||||
D_MapChange(cv_nextmap.value, cv_newgametype.value, (boolean)cv_kartencore.value, 1, 1, false, false);
|
||||
COM_BufAddText("dummyconsvar 1\n");
|
||||
}
|
||||
else // split screen
|
||||
|
@ -7318,7 +7409,7 @@ static void M_StartServer(INT32 choice)
|
|||
SplitScreen_OnChange();
|
||||
}
|
||||
|
||||
D_MapChange(cv_nextmap.value, cv_newgametype.value, false, 1, 1, false, false);
|
||||
D_MapChange(cv_nextmap.value, cv_newgametype.value, (boolean)cv_kartencore.value, 1, 1, false, false);
|
||||
}
|
||||
|
||||
M_ClearMenus(true);
|
||||
|
@ -7331,12 +7422,16 @@ static void M_DrawLevelSelectOnly(boolean leftfade, boolean rightfade)
|
|||
INT32 x, y, w, i, oldval, trans, dupadjust = ((vid.width/vid.dupx) - BASEVIDWIDTH)>>1;
|
||||
|
||||
// A 160x100 image of the level as entry MAPxxP
|
||||
lumpnum = W_CheckNumForName(va("%sP", G_BuildMapName(cv_nextmap.value)));
|
||||
|
||||
if (lumpnum != LUMPERROR)
|
||||
PictureOfLevel = W_CachePatchNum(lumpnum, PU_CACHE);
|
||||
if (cv_nextmap.value)
|
||||
{
|
||||
lumpnum = W_CheckNumForName(va("%sP", G_BuildMapName(cv_nextmap.value)));
|
||||
if (lumpnum != LUMPERROR)
|
||||
PictureOfLevel = W_CachePatchNum(lumpnum, PU_CACHE);
|
||||
else
|
||||
PictureOfLevel = W_CachePatchName("BLANKLVL", PU_CACHE);
|
||||
}
|
||||
else
|
||||
PictureOfLevel = W_CachePatchName("BLANKLVL", PU_CACHE);
|
||||
PictureOfLevel = W_CachePatchName("RANDOMLV", PU_CACHE);
|
||||
|
||||
w = SHORT(PictureOfLevel->width)/2;
|
||||
i = SHORT(PictureOfLevel->height)/2;
|
||||
|
@ -7350,7 +7445,23 @@ static void M_DrawLevelSelectOnly(boolean leftfade, boolean rightfade)
|
|||
|
||||
V_DrawFill(x-1, y-1, w+2, i+2, trans); // variable reuse...
|
||||
|
||||
V_DrawSmallScaledPatch(x, y, 0, PictureOfLevel);
|
||||
if (!cv_kartencore.value || gamestate == GS_TIMEATTACK || cv_newgametype.value != GT_RACE)
|
||||
V_DrawSmallScaledPatch(x, y, 0, PictureOfLevel);
|
||||
else
|
||||
{
|
||||
/*UINT8 *mappingforencore = NULL;
|
||||
if ((lumpnum = W_CheckNumForName(va("%sE", mapname))) != LUMPERROR)
|
||||
mappingforencore = W_CachePatchNum(lumpnum, PU_CACHE);*/
|
||||
|
||||
V_DrawFixedPatch((x+w)<<FRACBITS, (y)<<FRACBITS, FRACUNIT/2, V_FLIP, PictureOfLevel, 0);
|
||||
|
||||
{
|
||||
static angle_t rubyfloattime = 0;
|
||||
const fixed_t rubyheight = FINESINE(rubyfloattime>>ANGLETOFINESHIFT);
|
||||
V_DrawFixedPatch((x+w/2)<<FRACBITS, ((y+i/2)<<FRACBITS) - (rubyheight<<1), FRACUNIT, 0, W_CachePatchName("RUBYICON", PU_CACHE), NULL);
|
||||
rubyfloattime += (ANGLE_MAX/NEWTICRATE);
|
||||
}
|
||||
}
|
||||
/*V_DrawDiag(x, y, 12, 31);
|
||||
V_DrawDiag(x, y, 10, G_GetGametypeColor(cv_newgametype.value));*/
|
||||
|
||||
|
@ -7365,7 +7476,7 @@ static void M_DrawLevelSelectOnly(boolean leftfade, boolean rightfade)
|
|||
do
|
||||
{
|
||||
i--;
|
||||
if (i == -1)
|
||||
if (i == -2)
|
||||
i = NUMMAPS-1;
|
||||
|
||||
if (i == oldval)
|
||||
|
@ -7377,14 +7488,19 @@ static void M_DrawLevelSelectOnly(boolean leftfade, boolean rightfade)
|
|||
} while (!M_CanShowLevelInList(i, cv_newgametype.value));
|
||||
|
||||
// A 160x100 image of the level as entry MAPxxP
|
||||
lumpnum = W_CheckNumForName(va("%sP", G_BuildMapName(i+1)));
|
||||
|
||||
if (lumpnum != LUMPERROR)
|
||||
PictureOfLevel = W_CachePatchNum(lumpnum, PU_CACHE);
|
||||
if (i+1)
|
||||
{
|
||||
lumpnum = W_CheckNumForName(va("%sP", G_BuildMapName(i+1)));
|
||||
if (lumpnum != LUMPERROR)
|
||||
PictureOfLevel = W_CachePatchNum(lumpnum, PU_CACHE);
|
||||
else
|
||||
PictureOfLevel = W_CachePatchName("BLANKLVL", PU_CACHE);
|
||||
}
|
||||
else
|
||||
PictureOfLevel = W_CachePatchName("BLANKLVL", PU_CACHE);
|
||||
PictureOfLevel = W_CachePatchName("RANDOMLV", PU_CACHE);
|
||||
|
||||
x -= horizspac + w/2;
|
||||
|
||||
x -= horizspac + SHORT(PictureOfLevel->width)/4;
|
||||
V_DrawTinyScaledPatch(x, y, trans, PictureOfLevel);
|
||||
} while (x > horizspac-dupadjust);
|
||||
|
||||
|
@ -7399,7 +7515,7 @@ static void M_DrawLevelSelectOnly(boolean leftfade, boolean rightfade)
|
|||
{
|
||||
i++;
|
||||
if (i == NUMMAPS)
|
||||
i = 0;
|
||||
i = -1;
|
||||
|
||||
if (i == oldval)
|
||||
return;
|
||||
|
@ -7410,15 +7526,20 @@ static void M_DrawLevelSelectOnly(boolean leftfade, boolean rightfade)
|
|||
} while (!M_CanShowLevelInList(i, cv_newgametype.value));
|
||||
|
||||
// A 160x100 image of the level as entry MAPxxP
|
||||
lumpnum = W_CheckNumForName(va("%sP", G_BuildMapName(i+1)));
|
||||
|
||||
if (lumpnum != LUMPERROR)
|
||||
PictureOfLevel = W_CachePatchNum(lumpnum, PU_CACHE);
|
||||
if (i+1)
|
||||
{
|
||||
lumpnum = W_CheckNumForName(va("%sP", G_BuildMapName(i+1)));
|
||||
if (lumpnum != LUMPERROR)
|
||||
PictureOfLevel = W_CachePatchNum(lumpnum, PU_CACHE);
|
||||
else
|
||||
PictureOfLevel = W_CachePatchName("BLANKLVL", PU_CACHE);
|
||||
}
|
||||
else
|
||||
PictureOfLevel = W_CachePatchName("BLANKLVL", PU_CACHE);
|
||||
PictureOfLevel = W_CachePatchName("RANDOMLV", PU_CACHE);
|
||||
|
||||
V_DrawTinyScaledPatch(x, y, trans, PictureOfLevel);
|
||||
x += horizspac + SHORT(PictureOfLevel->width)/4;
|
||||
|
||||
x += horizspac + w/2;
|
||||
}
|
||||
#undef horizspac
|
||||
}
|
||||
|
@ -7705,6 +7826,8 @@ static void M_DrawSetupMultiPlayerMenu(void)
|
|||
spritedef_t *sprdef;
|
||||
spriteframe_t *sprframe;
|
||||
patch_t *statbg = W_CachePatchName("K_STATBG", PU_CACHE);
|
||||
patch_t *statlr = W_CachePatchName("K_STATLR", PU_CACHE);
|
||||
patch_t *statud = W_CachePatchName("K_STATUD", PU_CACHE);
|
||||
patch_t *statdot = W_CachePatchName("K_SDOT0", PU_CACHE);
|
||||
patch_t *patch;
|
||||
UINT8 frame;
|
||||
|
@ -7712,10 +7835,14 @@ static void M_DrawSetupMultiPlayerMenu(void)
|
|||
UINT8 weight;
|
||||
UINT8 i;
|
||||
const UINT8 *flashcol = V_GetStringColormap(highlightflags);
|
||||
INT32 statx, staty;
|
||||
|
||||
mx = MP_PlayerSetupDef.x;
|
||||
my = MP_PlayerSetupDef.y;
|
||||
|
||||
statx = (BASEVIDWIDTH - mx - 118);
|
||||
staty = (my+62);
|
||||
|
||||
// use generic drawer for cursor, items and title
|
||||
M_DrawGenericMenu();
|
||||
|
||||
|
@ -7753,7 +7880,16 @@ static void M_DrawSetupMultiPlayerMenu(void)
|
|||
}
|
||||
|
||||
// SRB2Kart: draw the stat backer
|
||||
V_DrawFixedPatch((BASEVIDWIDTH - mx - 117)<<FRACBITS, (my+62)<<FRACBITS, FRACUNIT, 0, statbg, flashcol);
|
||||
// labels
|
||||
V_DrawThinString(statx+16, staty, V_6WIDTHSPACE|highlightflags, "Acceleration");
|
||||
V_DrawThinString(statx+91, staty, V_6WIDTHSPACE|highlightflags, "Max Speed");
|
||||
V_DrawThinString(statx, staty+12, V_6WIDTHSPACE|highlightflags, "Handling");
|
||||
V_DrawThinString(statx+7, staty+77, V_6WIDTHSPACE|highlightflags, "Weight");
|
||||
// label arrows
|
||||
V_DrawFixedPatch((statx+64)<<FRACBITS, staty<<FRACBITS, FRACUNIT, 0, statlr, flashcol);
|
||||
V_DrawFixedPatch((statx+24)<<FRACBITS, (staty+22)<<FRACBITS, FRACUNIT, 0, statud, flashcol);
|
||||
// bg
|
||||
V_DrawFixedPatch((statx+34)<<FRACBITS, (staty+10)<<FRACBITS, FRACUNIT, 0, statbg, 0);
|
||||
|
||||
for (i = 0; i < numskins; i++) // draw the stat dots
|
||||
{
|
||||
|
@ -9004,41 +9140,308 @@ static void M_HandleVideoMode(INT32 ch)
|
|||
// ===============
|
||||
// Monitor Toggles
|
||||
// ===============
|
||||
/*static void M_DrawMonitorToggles(void)
|
||||
static consvar_t *kartitemcvs[NUMKARTRESULTS-1] = {
|
||||
&cv_sneaker,
|
||||
&cv_rocketsneaker,
|
||||
&cv_invincibility,
|
||||
&cv_banana,
|
||||
&cv_eggmanmonitor,
|
||||
&cv_orbinaut,
|
||||
&cv_jawz,
|
||||
&cv_mine,
|
||||
&cv_ballhog,
|
||||
&cv_selfpropelledbomb,
|
||||
&cv_grow,
|
||||
&cv_shrink,
|
||||
&cv_thundershield,
|
||||
&cv_hyudoro,
|
||||
&cv_pogospring,
|
||||
&cv_kitchensink,
|
||||
&cv_triplesneaker,
|
||||
&cv_triplebanana,
|
||||
&cv_decabanana,
|
||||
&cv_tripleorbinaut,
|
||||
&cv_quadorbinaut,
|
||||
&cv_dualjawz
|
||||
};
|
||||
|
||||
static tic_t shitsfree = 0;
|
||||
|
||||
static void M_DrawMonitorToggles(void)
|
||||
{
|
||||
INT32 i, y;
|
||||
INT32 sum = 0;
|
||||
const INT32 edges = 4;
|
||||
const INT32 height = 4;
|
||||
const INT32 spacing = 35;
|
||||
const INT32 column = itemOn/height;
|
||||
//const INT32 row = itemOn%height;
|
||||
INT32 leftdraw, rightdraw, totaldraw;
|
||||
INT32 x = currentMenu->x, y = currentMenu->y+(spacing/4);
|
||||
INT32 onx = 0, ony = 0;
|
||||
consvar_t *cv;
|
||||
boolean cheating = false;
|
||||
INT32 i, translucent, drawnum;
|
||||
|
||||
M_DrawGenericMenu();
|
||||
M_DrawMenuTitle();
|
||||
|
||||
// Assumes all are cvar type.
|
||||
for (i = 0; i < currentMenu->numitems; ++i)
|
||||
// Find the available space around column
|
||||
leftdraw = rightdraw = column;
|
||||
totaldraw = 0;
|
||||
for (i = 0; (totaldraw < edges*2 && i < edges*4); i++)
|
||||
{
|
||||
cv = (consvar_t *)currentMenu->menuitems[i].itemaction;
|
||||
sum += cv->value;
|
||||
|
||||
if (!CV_IsSetToDefault(cv))
|
||||
cheating = true;
|
||||
if (rightdraw+1 < (currentMenu->numitems/height)+1)
|
||||
{
|
||||
rightdraw++;
|
||||
totaldraw++;
|
||||
}
|
||||
if (leftdraw-1 >= 0)
|
||||
{
|
||||
leftdraw--;
|
||||
totaldraw++;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < currentMenu->numitems; ++i)
|
||||
for (i = leftdraw; i <= rightdraw; i++)
|
||||
{
|
||||
cv = (consvar_t *)currentMenu->menuitems[i].itemaction;
|
||||
y = currentMenu->y + currentMenu->menuitems[i].alphaKey;
|
||||
INT32 j;
|
||||
|
||||
M_DrawSlider(currentMenu->x + 20, y, cv, (i == itemOn));
|
||||
for (j = 0; j < height; j++)
|
||||
{
|
||||
const INT32 thisitem = (i*height)+j;
|
||||
INT32 drawnum = 0;
|
||||
|
||||
if (!cv->value)
|
||||
V_DrawRightAlignedString(312, y, V_OLDSPACING|((i == itemOn) ? highlightflags : 0), "None");
|
||||
if (thisitem >= currentMenu->numitems)
|
||||
continue;
|
||||
|
||||
if (thisitem == itemOn)
|
||||
{
|
||||
onx = x;
|
||||
ony = y;
|
||||
y += spacing;
|
||||
continue;
|
||||
}
|
||||
|
||||
#ifdef ITEMTOGGLEBOTTOMRIGHT
|
||||
if (currentMenu->menuitems[thisitem].alphaKey == 255)
|
||||
{
|
||||
V_DrawScaledPatch(x, y, V_TRANSLUCENT, W_CachePatchName("K_ISBG", PU_CACHE));
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
if (currentMenu->menuitems[thisitem].alphaKey == 0)
|
||||
{
|
||||
V_DrawScaledPatch(x, y, 0, W_CachePatchName("K_ISBG", PU_CACHE));
|
||||
V_DrawScaledPatch(x, y, 0, W_CachePatchName("K_ISTOGL", PU_CACHE));
|
||||
continue;
|
||||
}
|
||||
|
||||
cv = kartitemcvs[currentMenu->menuitems[thisitem].alphaKey-1];
|
||||
translucent = (cv->value ? 0 : V_TRANSLUCENT);
|
||||
|
||||
switch (currentMenu->menuitems[thisitem].alphaKey)
|
||||
{
|
||||
case KRITEM_DUALJAWZ:
|
||||
drawnum = 2;
|
||||
break;
|
||||
case KRITEM_TRIPLESNEAKER:
|
||||
case KRITEM_TRIPLEBANANA:
|
||||
case KRITEM_TRIPLEORBINAUT:
|
||||
drawnum = 3;
|
||||
break;
|
||||
case KRITEM_QUADORBINAUT:
|
||||
drawnum = 4;
|
||||
break;
|
||||
case KRITEM_TENFOLDBANANA:
|
||||
drawnum = 10;
|
||||
break;
|
||||
default:
|
||||
drawnum = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
if (cv->value)
|
||||
V_DrawScaledPatch(x, y, 0, W_CachePatchName("K_ISBG", PU_CACHE));
|
||||
else
|
||||
V_DrawScaledPatch(x, y, 0, W_CachePatchName("K_ISBGD", PU_CACHE));
|
||||
|
||||
if (drawnum != 0)
|
||||
{
|
||||
V_DrawScaledPatch(x, y, 0, W_CachePatchName("K_ISMUL", PU_CACHE));
|
||||
V_DrawScaledPatch(x, y, translucent, W_CachePatchName(K_GetItemPatch(currentMenu->menuitems[thisitem].alphaKey, true), PU_CACHE));
|
||||
V_DrawString(x+24, y+31, V_ALLOWLOWERCASE|translucent, va("x%d", drawnum));
|
||||
}
|
||||
else
|
||||
V_DrawScaledPatch(x, y, translucent, W_CachePatchName(K_GetItemPatch(currentMenu->menuitems[thisitem].alphaKey, true), PU_CACHE));
|
||||
|
||||
y += spacing;
|
||||
}
|
||||
|
||||
x += spacing;
|
||||
y = currentMenu->y+(spacing/4);
|
||||
}
|
||||
|
||||
{
|
||||
#ifdef ITEMTOGGLEBOTTOMRIGHT
|
||||
if (currentMenu->menuitems[itemOn].alphaKey == 255)
|
||||
{
|
||||
V_DrawScaledPatch(onx-1, ony-2, V_TRANSLUCENT, W_CachePatchName("K_ITBG", PU_CACHE));
|
||||
if (shitsfree)
|
||||
{
|
||||
INT32 trans = V_TRANSLUCENT;
|
||||
if (shitsfree-1 > TICRATE-5)
|
||||
trans = ((10-TICRATE)+shitsfree-1)<<V_ALPHASHIFT;
|
||||
else if (shitsfree < 5)
|
||||
trans = (10-shitsfree)<<V_ALPHASHIFT;
|
||||
V_DrawScaledPatch(onx-1, ony-2, trans, W_CachePatchName("K_ITFREE", PU_CACHE));
|
||||
}
|
||||
}
|
||||
else
|
||||
V_DrawRightAlignedString(312, y, V_OLDSPACING|((i == itemOn) ? highlightflags : 0), va("%3d%%", (cv->value*100)/sum));
|
||||
#endif
|
||||
if (currentMenu->menuitems[itemOn].alphaKey == 0)
|
||||
{
|
||||
V_DrawScaledPatch(onx-1, ony-2, 0, W_CachePatchName("K_ITBG", PU_CACHE));
|
||||
V_DrawScaledPatch(onx-1, ony-2, 0, W_CachePatchName("K_ITTOGL", PU_CACHE));
|
||||
}
|
||||
else
|
||||
{
|
||||
cv = kartitemcvs[currentMenu->menuitems[itemOn].alphaKey-1];
|
||||
translucent = (cv->value ? 0 : V_TRANSLUCENT);
|
||||
|
||||
switch (currentMenu->menuitems[itemOn].alphaKey)
|
||||
{
|
||||
case KRITEM_DUALJAWZ:
|
||||
drawnum = 2;
|
||||
break;
|
||||
case KRITEM_TRIPLESNEAKER:
|
||||
case KRITEM_TRIPLEBANANA:
|
||||
drawnum = 3;
|
||||
break;
|
||||
case KRITEM_TENFOLDBANANA:
|
||||
drawnum = 10;
|
||||
break;
|
||||
default:
|
||||
drawnum = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
if (cv->value)
|
||||
V_DrawScaledPatch(onx-1, ony-2, 0, W_CachePatchName("K_ITBG", PU_CACHE));
|
||||
else
|
||||
V_DrawScaledPatch(onx-1, ony-2, 0, W_CachePatchName("K_ITBGD", PU_CACHE));
|
||||
|
||||
if (drawnum != 0)
|
||||
{
|
||||
V_DrawScaledPatch(onx-1, ony-2, 0, W_CachePatchName("K_ITMUL", PU_CACHE));
|
||||
V_DrawScaledPatch(onx-1, ony-2, translucent, W_CachePatchName(K_GetItemPatch(currentMenu->menuitems[itemOn].alphaKey, false), PU_CACHE));
|
||||
V_DrawScaledPatch(onx+27, ony+39, translucent, W_CachePatchName("K_ITX", PU_CACHE));
|
||||
V_DrawKartString(onx+37, ony+34, translucent, va("%d", drawnum));
|
||||
}
|
||||
else
|
||||
V_DrawScaledPatch(onx-1, ony-2, translucent, W_CachePatchName(K_GetItemPatch(currentMenu->menuitems[itemOn].alphaKey, false), PU_CACHE));
|
||||
}
|
||||
}
|
||||
|
||||
if (cheating)
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, currentMenu->y, warningflags, "* MODIFIED, CHEATS ENABLED *");
|
||||
}*/
|
||||
if (shitsfree)
|
||||
shitsfree--;
|
||||
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, currentMenu->y, highlightflags, va("* %s *", currentMenu->menuitems[itemOn].text));
|
||||
}
|
||||
|
||||
static void M_HandleMonitorToggles(INT32 choice)
|
||||
{
|
||||
const INT32 width = 6, height = 4;
|
||||
INT32 column = itemOn/height, row = itemOn%height;
|
||||
INT16 next;
|
||||
UINT8 i;
|
||||
boolean exitmenu = false;
|
||||
|
||||
switch (choice)
|
||||
{
|
||||
case KEY_RIGHTARROW:
|
||||
S_StartSound(NULL, sfx_menu1);
|
||||
column++;
|
||||
if (((column*height)+row) >= currentMenu->numitems)
|
||||
column = 0;
|
||||
next = min(((column*height)+row), currentMenu->numitems-1);
|
||||
itemOn = next;
|
||||
break;
|
||||
|
||||
case KEY_LEFTARROW:
|
||||
S_StartSound(NULL, sfx_menu1);
|
||||
column--;
|
||||
if (column < 0)
|
||||
column = width-1;
|
||||
if (((column*height)+row) >= currentMenu->numitems)
|
||||
column--;
|
||||
next = max(((column*height)+row), 0);
|
||||
if (next >= currentMenu->numitems)
|
||||
next = currentMenu->numitems-1;
|
||||
itemOn = next;
|
||||
break;
|
||||
|
||||
case KEY_DOWNARROW:
|
||||
S_StartSound(NULL, sfx_menu1);
|
||||
row = (row+1) % height;
|
||||
if (((column*height)+row) >= currentMenu->numitems)
|
||||
row = 0;
|
||||
next = min(((column*height)+row), currentMenu->numitems-1);
|
||||
itemOn = next;
|
||||
break;
|
||||
|
||||
case KEY_UPARROW:
|
||||
S_StartSound(NULL, sfx_menu1);
|
||||
row = (row-1) % height;
|
||||
if (row < 0)
|
||||
row = height-1;
|
||||
if (((column*height)+row) >= currentMenu->numitems)
|
||||
row--;
|
||||
next = max(((column*height)+row), 0);
|
||||
if (next >= currentMenu->numitems)
|
||||
next = currentMenu->numitems-1;
|
||||
itemOn = next;
|
||||
break;
|
||||
|
||||
case KEY_ENTER:
|
||||
#ifdef ITEMTOGGLEBOTTOMRIGHT
|
||||
if (currentMenu->menuitems[itemOn].alphaKey == 255)
|
||||
{
|
||||
//S_StartSound(NULL, sfx_lose);
|
||||
if (!shitsfree)
|
||||
{
|
||||
shitsfree = TICRATE;
|
||||
S_StartSound(NULL, sfx_itfree);
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if (currentMenu->menuitems[itemOn].alphaKey == 0)
|
||||
{
|
||||
INT32 v = cv_sneaker.value;
|
||||
S_StartSound(NULL, sfx_s1b4);
|
||||
for (i = 0; i < NUMKARTRESULTS-1; i++)
|
||||
{
|
||||
if (kartitemcvs[i]->value == v)
|
||||
CV_AddValue(kartitemcvs[i], 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
S_StartSound(NULL, sfx_s1ba);
|
||||
CV_AddValue(kartitemcvs[currentMenu->menuitems[itemOn].alphaKey-1], 1);
|
||||
}
|
||||
break;
|
||||
|
||||
case KEY_ESCAPE:
|
||||
exitmenu = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (exitmenu)
|
||||
{
|
||||
if (currentMenu->prevMenu)
|
||||
M_SetupNextMenu(currentMenu->prevMenu);
|
||||
else
|
||||
M_ClearMenus(true);
|
||||
}
|
||||
}
|
||||
|
||||
// =========
|
||||
// Quit Game
|
||||
|
@ -9155,7 +9558,6 @@ static void M_HandleFogColor(INT32 choice)
|
|||
break;
|
||||
|
||||
case KEY_ESCAPE:
|
||||
S_StartSound(NULL, sfx_menu1);
|
||||
exitmenu = true;
|
||||
break;
|
||||
|
||||
|
|
|
@ -8164,9 +8164,6 @@ void A_ItemPop(mobj_t *actor)
|
|||
|
||||
void A_JawzChase(mobj_t *actor)
|
||||
{
|
||||
|
||||
INT32 c = 0;
|
||||
INT32 stop;
|
||||
player_t *player;
|
||||
#ifdef HAVE_BLUA
|
||||
if (LUA_CallAction("A_JawzChase", actor))
|
||||
|
@ -8175,95 +8172,33 @@ void A_JawzChase(mobj_t *actor)
|
|||
|
||||
if (actor->tracer)
|
||||
{
|
||||
if (!actor->tracer->health)
|
||||
if (actor->tracer->health)
|
||||
{
|
||||
P_SetTarget(&actor->tracer, NULL);
|
||||
}
|
||||
mobj_t *ret;
|
||||
|
||||
ret = P_SpawnMobj(actor->tracer->x, actor->tracer->y, actor->tracer->z, MT_PLAYERRETICULE);
|
||||
P_SetTarget(&ret->target, actor->tracer);
|
||||
ret->frame |= ((leveltime % 10) / 2) + 5;
|
||||
ret->color = actor->cvmem;
|
||||
|
||||
if (actor->tracer && (actor->tracer->health))
|
||||
{
|
||||
P_Thrust(actor, R_PointToAngle2(actor->x, actor->y, actor->tracer->x, actor->tracer->y), actor->info->speed);
|
||||
return;
|
||||
}
|
||||
else
|
||||
P_SetTarget(&actor->tracer, NULL);
|
||||
}
|
||||
|
||||
// first time init, this allow minimum lastlook changes
|
||||
if (actor->lastlook == -1)
|
||||
actor->lastlook = P_RandomFixed();
|
||||
if (actor->extravalue1) // Disable looking by setting this
|
||||
return;
|
||||
|
||||
actor->lastlook %= MAXPLAYERS;
|
||||
player = K_FindJawzTarget(actor, actor->target->player);
|
||||
if (player)
|
||||
P_SetTarget(&actor->tracer, player->mo);
|
||||
|
||||
stop = (actor->lastlook - 1) & PLAYERSMASK;
|
||||
|
||||
if (actor->lastlook >= 0)
|
||||
{
|
||||
for (; ; actor->lastlook = (actor->lastlook + 1) & PLAYERSMASK)
|
||||
{
|
||||
if (!playeringame[actor->lastlook])
|
||||
continue;
|
||||
|
||||
if (c++ == 2)
|
||||
return;
|
||||
|
||||
player = &players[actor->lastlook];
|
||||
|
||||
if (!player->mo)
|
||||
continue;
|
||||
|
||||
if (player->mo->health <= 0)
|
||||
continue; // dead
|
||||
|
||||
if ((netgame || multiplayer) && player->spectator)
|
||||
continue; // spectator
|
||||
|
||||
if (actor->target && actor->target->player)
|
||||
{
|
||||
if (player->mo == actor->target)
|
||||
continue;
|
||||
|
||||
// Don't home in on teammates.
|
||||
if (gametype == GT_CTF
|
||||
&& actor->target->player->ctfteam == player->ctfteam)
|
||||
continue;
|
||||
|
||||
if (G_RaceGametype()) // Only in races, in match and CTF you should go after any nearby players
|
||||
{
|
||||
// USER TARGET
|
||||
if (actor->target->player->kartstuff[k_position] != (player->kartstuff[k_position] + 1)) // Jawz only go after the person directly ahead of you -Sryder
|
||||
continue;
|
||||
}
|
||||
|
||||
if (G_BattleGametype())
|
||||
{
|
||||
if (player->kartstuff[k_bumper] <= 0)
|
||||
continue;
|
||||
|
||||
if (P_AproxDistance(P_AproxDistance(player->mo->x-actor->x,
|
||||
player->mo->y-actor->y), player->mo->z-actor->z) > RING_DIST)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if ((G_RaceGametype()) || (G_BattleGametype() // If in match etc. only home in when you get close enough, in race etc. home in all the time
|
||||
&& P_AproxDistance(P_AproxDistance(player->mo->x-actor->x,
|
||||
player->mo->y-actor->y), player->mo->z-actor->z) < RING_DIST
|
||||
&& player->kartstuff[k_bumper] > 0))
|
||||
P_SetTarget(&actor->tracer, player->mo);
|
||||
return;
|
||||
|
||||
// Moved to bottom so it doesn't not check the last player
|
||||
// done looking
|
||||
if (actor->lastlook == stop)
|
||||
{
|
||||
if (G_RaceGametype())
|
||||
actor->lastlook = -2;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (G_RaceGametype()) // Stop looking after first tic in race
|
||||
actor->extravalue1 = 1;
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
void A_JawzExplode(mobj_t *actor)
|
||||
|
|
|
@ -516,6 +516,22 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
boom->color = SKINCOLOR_RED;
|
||||
S_StartSound(boom, special->info->attacksound);
|
||||
|
||||
if (player->kartstuff[k_bumper] == 1) // If you have only one bumper left, and see if it's a 1v1
|
||||
{
|
||||
INT32 numingame = 0;
|
||||
INT32 i;
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (!playeringame[i] || players[i].spectator || players[i].kartstuff[k_bumper] <= 0)
|
||||
continue;
|
||||
numingame++;
|
||||
}
|
||||
|
||||
if (numingame <= 2) // If so, then an extra karma point so they are 100% certain to switch places; it's annoying to end matches with a bomb kill
|
||||
special->target->player->kartstuff[k_comebackpoints]++;
|
||||
}
|
||||
|
||||
special->target->player->kartstuff[k_comebackpoints] += 2 * (K_IsPlayerWanted(player) ? 2 : 1);
|
||||
if (netgame && cv_hazardlog.value)
|
||||
CONS_Printf(M_GetText("%s bombed %s!\n"), player_names[special->target->player-players], player_names[player-players]);
|
||||
|
@ -1733,7 +1749,6 @@ static void P_HitDeathMessages(player_t *player, mobj_t *inflictor, mobj_t *sour
|
|||
str = M_GetText("%s%s's tagging hand %s %s.\n");
|
||||
break;
|
||||
case MT_SPINFIRE:
|
||||
case MT_SNEAKERTRAIL:
|
||||
str = M_GetText("%s%s's elemental fire trail %s %s.\n");
|
||||
break;
|
||||
case MT_THROWNBOUNCE:
|
||||
|
@ -2219,7 +2234,8 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
|
|||
if (target->target->player->kartstuff[k_itemheld])
|
||||
{
|
||||
if ((target->type == MT_BANANA_SHIELD && target->target->player->kartstuff[k_itemtype] == KITEM_BANANA) // trail items
|
||||
|| (target->type == MT_SSMINE_SHIELD && target->target->player->kartstuff[k_itemtype] == KITEM_MINE))
|
||||
|| (target->type == MT_SSMINE_SHIELD && target->target->player->kartstuff[k_itemtype] == KITEM_MINE)
|
||||
|| (target->type == MT_SINK_SHIELD && target->target->player->kartstuff[k_itemtype] == KITEM_KITCHENSINK))
|
||||
{
|
||||
if (target->movedir != 0 && target->movedir < (UINT16)target->target->player->kartstuff[k_itemamount])
|
||||
{
|
||||
|
|
|
@ -107,6 +107,9 @@ typedef struct camera_s
|
|||
|
||||
// Momentums, used to update position.
|
||||
fixed_t momx, momy, momz;
|
||||
|
||||
// SRB2Kart: camera pans while drifting
|
||||
fixed_t pan;
|
||||
} camera_t;
|
||||
|
||||
extern camera_t camera, camera2, camera3, camera4;
|
||||
|
|
25
src/p_map.c
25
src/p_map.c
|
@ -188,7 +188,7 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
|
|||
P_InstaThrustEvenIn2D(object, spring->angle, FixedMul(horizspeed,FixedSqrt(FixedMul(hscale, spring->scale))));
|
||||
else
|
||||
{
|
||||
fixed_t finalSpeed = horizspeed;
|
||||
fixed_t finalSpeed = FixedDiv(horizspeed, hscale);
|
||||
fixed_t pSpeed = object->player->speed;
|
||||
|
||||
if (pSpeed > finalSpeed)
|
||||
|
@ -698,7 +698,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
K_KartBouncing(thing, tmthing, false, false);
|
||||
|
||||
if (tmthing->type == MT_ORBINAUT || tmthing->type == MT_JAWZ || tmthing->type == MT_JAWZ_DUD)
|
||||
S_StartSound(thing, sfx_shelit);
|
||||
S_StartSound(thing, sfx_s3k7b);
|
||||
|
||||
// This Item Damage
|
||||
if (tmthing->eflags & MFE_VERTICALFLIP)
|
||||
|
@ -981,7 +981,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
K_KartBouncing(tmthing, thing, false, false);
|
||||
|
||||
if (thing->type == MT_ORBINAUT || thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD)
|
||||
S_StartSound(tmthing, sfx_shelit);
|
||||
S_StartSound(tmthing, sfx_s3k7b);
|
||||
|
||||
// Other Item Damage
|
||||
if (thing->eflags & MFE_VERTICALFLIP)
|
||||
|
@ -1491,10 +1491,15 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
|
||||
if (thing->player->kartstuff[k_squishedtimer] || thing->player->kartstuff[k_hyudorotimer]
|
||||
|| thing->player->kartstuff[k_justbumped] || thing->scale > tmthing->scale + (FRACUNIT/8)
|
||||
|| (G_BattleGametype() && thing->player->kartstuff[k_bumper] <= 0)
|
||||
|| tmthing->player->kartstuff[k_squishedtimer] || tmthing->player->kartstuff[k_hyudorotimer]
|
||||
|| tmthing->player->kartstuff[k_justbumped] || tmthing->scale > thing->scale + (FRACUNIT/8)
|
||||
|| (G_BattleGametype() && tmthing->player->kartstuff[k_bumper] <= 0))
|
||||
|| tmthing->player->kartstuff[k_justbumped] || tmthing->scale > thing->scale + (FRACUNIT/8))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (G_BattleGametype()
|
||||
&& ((thing->player->kartstuff[k_bumper] && !tmthing->player->kartstuff[k_bumper])
|
||||
|| (tmthing->player->kartstuff[k_bumper] && !thing->player->kartstuff[k_bumper])))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -2587,6 +2592,10 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
|
|||
if (P_PlayerTouchingSectorSpecial(thing->player, 1, 13)
|
||||
|| GETSECSPECIAL(R_PointInSubsector(x, y)->sector->special, 1) == 13)
|
||||
maxstep <<= 1;
|
||||
// If using type Section1:12, no maxstep. For ledges you don't want the player to climb! (see: Egg Zeppelin & SMK port walls)
|
||||
else if (P_PlayerTouchingSectorSpecial(thing->player, 1, 12)
|
||||
|| GETSECSPECIAL(R_PointInSubsector(x, y)->sector->special, 1) == 12)
|
||||
maxstep = 0;
|
||||
|
||||
// Don't 'step up' while springing,
|
||||
// Only step up "if needed".
|
||||
|
@ -2793,7 +2802,7 @@ boolean P_SceneryTryMove(mobj_t *thing, fixed_t x, fixed_t y)
|
|||
|
||||
if (!(thing->flags & MF_NOCLIP))
|
||||
{
|
||||
const fixed_t maxstep = MAXSTEPMOVE;
|
||||
const fixed_t maxstep = FixedMul(MAXSTEPMOVE, mapheaderinfo[gamemap-1]->mobj_scale);
|
||||
|
||||
if (tmceilingz - tmfloorz < thing->height)
|
||||
return false; // doesn't fit
|
||||
|
@ -3276,7 +3285,7 @@ static boolean PTR_SlideTraverse(intercept_t *in)
|
|||
if (opentop - slidemo->z < slidemo->height)
|
||||
goto isblocking; // mobj is too high
|
||||
|
||||
if (openbottom - slidemo->z > FixedMul(MAXSTEPMOVE, slidemo->scale))
|
||||
if (openbottom - slidemo->z > FixedMul(MAXSTEPMOVE, mapheaderinfo[gamemap-1]->mobj_scale))
|
||||
goto isblocking; // too big a step up
|
||||
|
||||
// this line doesn't block movement
|
||||
|
|
170
src/p_mobj.c
170
src/p_mobj.c
|
@ -1404,8 +1404,11 @@ fixed_t P_GetMobjGravity(mobj_t *mo)
|
|||
case MT_BANANA:
|
||||
case MT_FAKEITEM:
|
||||
case MT_SSMINE:
|
||||
case MT_SINK:
|
||||
gravityadd = FixedMul(gravityadd, 5*FRACUNIT/2);
|
||||
break;
|
||||
case MT_SINK:
|
||||
gravityadd = FixedMul(gravityadd, 5*FRACUNIT); // Double gravity
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -3652,7 +3655,7 @@ boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled
|
|||
|| (thiscam == &camera4 && players[fourthdisplayplayer].mo && (players[fourthdisplayplayer].mo->flags2 & MF2_TWOD)))
|
||||
itsatwodlevel = true;
|
||||
|
||||
if (mirrormode)
|
||||
if (encoremode)
|
||||
postimg = postimg_mirror;
|
||||
else if (player->pflags & PF_FLIPCAM && !(player->pflags & PF_NIGHTSMODE) && player->mo->eflags & MFE_VERTICALFLIP)
|
||||
postimg = postimg_flip;
|
||||
|
@ -6212,6 +6215,9 @@ void P_RunOverlays(void)
|
|||
mo->scale = mo->destscale = mo->target->scale;
|
||||
mo->angle = mo->target->angle;
|
||||
|
||||
if ((mo->flags & MF_DONTENCOREMAP) != (mo->target->flags & MF_DONTENCOREMAP))
|
||||
mo->flags ^= MF_DONTENCOREMAP;
|
||||
|
||||
if (!(mo->state->frame & FF_ANIMATE))
|
||||
zoffs = FixedMul(((signed)mo->state->var2)*FRACUNIT, mo->scale);
|
||||
// if you're using FF_ANIMATE on an overlay,
|
||||
|
@ -6611,115 +6617,12 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
return;
|
||||
break;
|
||||
//{ SRB2kart mobs
|
||||
case MT_DRIFT:
|
||||
{
|
||||
if (mobj->target && mobj->target->player && mobj->target->player->mo && mobj->target->player->health > 0 && !mobj->target->player->spectator)
|
||||
{
|
||||
fixed_t HEIGHT;
|
||||
fixed_t radius;
|
||||
|
||||
fixed_t dsone = K_GetKartDriftSparkValue(mobj->target->player);
|
||||
fixed_t dstwo = dsone*2;
|
||||
|
||||
if (mobj->target->player->kartstuff[k_driftcharge] < dsone)
|
||||
{
|
||||
P_RemoveMobj(mobj);
|
||||
return;
|
||||
}
|
||||
|
||||
if (mobj->target->player->kartstuff[k_hyudorotimer] > 0)
|
||||
{
|
||||
if (splitscreen)
|
||||
{
|
||||
if (leveltime & 1)
|
||||
mobj->flags2 |= MF2_DONTDRAW;
|
||||
else
|
||||
mobj->flags2 &= ~MF2_DONTDRAW;
|
||||
|
||||
if (mobj->target->player->kartstuff[k_hyudorotimer] >= (1*TICRATE/2) && mobj->target->player->kartstuff[k_hyudorotimer] <= hyudorotime-(1*TICRATE/2))
|
||||
{
|
||||
if (mobj->target->player == &players[secondarydisplayplayer])
|
||||
mobj->eflags |= MFE_DRAWONLYFORP2;
|
||||
else if (mobj->target->player == &players[thirddisplayplayer] && splitscreen > 1)
|
||||
mobj->eflags |= MFE_DRAWONLYFORP3;
|
||||
else if (mobj->target->player == &players[fourthdisplayplayer] && splitscreen > 2)
|
||||
mobj->eflags |= MFE_DRAWONLYFORP4;
|
||||
else
|
||||
mobj->eflags |= MFE_DRAWONLYFORP1;
|
||||
}
|
||||
else
|
||||
mobj->eflags &= ~(MFE_DRAWONLYFORP1|MFE_DRAWONLYFORP2|MFE_DRAWONLYFORP3|MFE_DRAWONLYFORP4);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mobj->target->player == &players[displayplayer]
|
||||
|| (mobj->target->player != &players[displayplayer]
|
||||
&& (mobj->target->player->kartstuff[k_hyudorotimer] < (1*TICRATE/2) || mobj->target->player->kartstuff[k_hyudorotimer] > hyudorotime-(1*TICRATE/2))))
|
||||
{
|
||||
if (leveltime & 1)
|
||||
mobj->flags2 |= MF2_DONTDRAW;
|
||||
else
|
||||
mobj->flags2 &= ~MF2_DONTDRAW;
|
||||
}
|
||||
else
|
||||
mobj->flags2 |= MF2_DONTDRAW;
|
||||
}
|
||||
}
|
||||
else if (mobj->target->player->kartstuff[k_hyudorotimer] == 0)
|
||||
{
|
||||
mobj->flags2 &= ~MF2_DONTDRAW;
|
||||
mobj->eflags &= ~(MFE_DRAWONLYFORP1|MFE_DRAWONLYFORP2|MFE_DRAWONLYFORP3|MFE_DRAWONLYFORP4);
|
||||
}
|
||||
|
||||
// Actor's distance from its Target, or Radius.
|
||||
radius = 7*mobj->target->scale;
|
||||
|
||||
// Switch blue flames to red flames
|
||||
if (mobj->target->player && mobj->type == MT_DRIFT
|
||||
&& mobj->target->player->kartstuff[k_driftcharge] >= dstwo
|
||||
&& !(mobj->state >= &states[S_DRIFTSPARK4] && mobj->state <= &states[S_DRIFTSPARK6]))
|
||||
P_SetMobjStateNF(mobj, S_DRIFTSPARK4);
|
||||
|
||||
// Get the angle
|
||||
if (mobj->target->player)
|
||||
mobj->angle = ANGLE_180 + mobj->target->player->frameangle;
|
||||
|
||||
// If the player is on the ceiling, then flip
|
||||
if (mobj->target->eflags & MFE_VERTICALFLIP)
|
||||
{
|
||||
mobj->eflags |= MFE_VERTICALFLIP;
|
||||
HEIGHT = (16<<FRACBITS);
|
||||
}
|
||||
else
|
||||
{
|
||||
mobj->eflags &= ~MFE_VERTICALFLIP;
|
||||
HEIGHT = 0;
|
||||
}
|
||||
|
||||
// Shrink if the player shrunk too.
|
||||
mobj->scale = mobj->target->scale;
|
||||
|
||||
P_UnsetThingPosition(mobj);
|
||||
{
|
||||
const angle_t fa = mobj->angle>>ANGLETOFINESHIFT;
|
||||
mobj->x = mobj->target->x + FixedMul(finecosine[fa],radius);
|
||||
mobj->y = mobj->target->y + FixedMul(finesine[fa],radius);
|
||||
mobj->z = mobj->target->z - HEIGHT;
|
||||
P_SetThingPosition(mobj);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
P_RemoveMobj(mobj);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case MT_ORBINAUT_SHIELD: // Kart orbit/trail items
|
||||
case MT_JAWZ_SHIELD:
|
||||
case MT_BANANA_SHIELD:
|
||||
case MT_SSMINE_SHIELD:
|
||||
case MT_FAKESHIELD:
|
||||
case MT_SINK_SHIELD:
|
||||
/*if (mobj->health > 0 && mobj->target && mobj->target->player
|
||||
&& mobj->target->player->health > 0 && !mobj->target->player->spectator)
|
||||
{
|
||||
|
@ -7018,7 +6921,15 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
break;
|
||||
}
|
||||
|
||||
mobj->tracer->flags2 &= ~MF2_DONTDRAW;
|
||||
if (mobj->target->player->kartstuff[k_itemheld])
|
||||
{
|
||||
if (leveltime & 1)
|
||||
mobj->tracer->flags2 &= ~MF2_DONTDRAW;
|
||||
else
|
||||
mobj->tracer->flags2 |= MF2_DONTDRAW;
|
||||
}
|
||||
else
|
||||
mobj->tracer->flags2 &= ~MF2_DONTDRAW;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -7029,7 +6940,7 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
mobj->tracer->destscale = scale;
|
||||
|
||||
if (mobj->target->player->kartstuff[k_itemamount] >= numberdisplaymin
|
||||
&& mobj->target->player->kartstuff[k_itemamount] < 10) // Meh, too difficult to support greater than this; convert this to a decent HUD object and then maybe :V
|
||||
&& mobj->target->player->kartstuff[k_itemamount] <= 10) // Meh, too difficult to support greater than this; convert this to a decent HUD object and then maybe :V
|
||||
{
|
||||
mobj_t *number = P_SpawnMobj(mobj->x, mobj->y, mobj->z, MT_OVERLAY);
|
||||
mobj_t *numx = P_SpawnMobj(mobj->x, mobj->y, mobj->z, MT_OVERLAY);
|
||||
|
@ -7913,7 +7824,7 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
else
|
||||
{
|
||||
mobj->flags &= ~MF_NOGRAVITY;
|
||||
if (mobj->z > mobj->watertop && mobj->z - mobj->watertop < FixedMul(MAXSTEPMOVE, mobj->scale))
|
||||
if (mobj->z > mobj->watertop && mobj->z - mobj->watertop < FixedMul(MAXSTEPMOVE, mapheaderinfo[gamemap-1]->mobj_scale))
|
||||
mobj->z = mobj->watertop;
|
||||
}
|
||||
break;
|
||||
|
@ -8225,6 +8136,39 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
S_StartSound(mobj, sfx_prloop);
|
||||
mobj->health--;
|
||||
break;
|
||||
case MT_BOOSTFLAME:
|
||||
if (!mobj->target || !mobj->target->health)
|
||||
{
|
||||
P_RemoveMobj(mobj);
|
||||
return;
|
||||
}
|
||||
|
||||
P_TeleportMove(mobj, mobj->target->x + P_ReturnThrustX(mobj, mobj->target->angle+ANGLE_180, mobj->target->radius),
|
||||
mobj->target->y + P_ReturnThrustY(mobj, mobj->target->angle+ANGLE_180, mobj->target->radius), mobj->target->z);
|
||||
mobj->angle = mobj->target->angle;
|
||||
P_SetScale(mobj, mobj->target->scale);
|
||||
|
||||
if (mobj->target->player)
|
||||
{
|
||||
if (mobj->target->player->kartstuff[k_sneakertimer] > mobj->movecount)
|
||||
P_SetMobjState(mobj, S_BOOSTFLAME);
|
||||
mobj->movecount = mobj->target->player->kartstuff[k_sneakertimer];
|
||||
}
|
||||
|
||||
if (mobj->state == &states[S_BOOSTSMOKESPAWNER])
|
||||
{
|
||||
mobj_t *smoke = P_SpawnMobj(mobj->x, mobj->y, mobj->z+(8<<FRACBITS), MT_BOOSTSMOKE);
|
||||
|
||||
P_SetScale(smoke, mobj->target->scale/2);
|
||||
smoke->destscale = 3*mobj->target->scale/2;
|
||||
|
||||
smoke->momx = mobj->target->momx/2;
|
||||
smoke->momy = mobj->target->momy/2;
|
||||
smoke->momz = mobj->target->momz/2;
|
||||
|
||||
P_Thrust(smoke, mobj->target->angle+FixedAngle(P_RandomRange(135, 225)<<FRACBITS), P_RandomRange(0, 8) * mapheaderinfo[gamemap-1]->mobj_scale);
|
||||
}
|
||||
break;
|
||||
case MT_SPARKLETRAIL:
|
||||
if (!mobj->target)
|
||||
{
|
||||
|
@ -8242,6 +8186,14 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
}
|
||||
P_TeleportMove(mobj, mobj->target->x, mobj->target->y, mobj->target->z);
|
||||
break;
|
||||
case MT_PLAYERRETICULE:
|
||||
if (!mobj->target || !mobj->target->health)
|
||||
{
|
||||
P_RemoveMobj(mobj);
|
||||
return;
|
||||
}
|
||||
P_TeleportMove(mobj, mobj->target->x, mobj->target->y, mobj->target->z);
|
||||
break;
|
||||
case MT_INSTASHIELDB:
|
||||
if (leveltime & 1)
|
||||
mobj->flags2 |= MF2_DONTDRAW;
|
||||
|
|
|
@ -160,7 +160,9 @@ typedef enum
|
|||
MF_GRENADEBOUNCE = 1<<28,
|
||||
// Run the action thinker on spawn.
|
||||
MF_RUNSPAWNFUNC = 1<<29,
|
||||
// free: 1<<30 and 1<<31
|
||||
// Don't remap in Encore mode.
|
||||
MF_DONTENCOREMAP = 1<<30,
|
||||
// free: 1<<31
|
||||
} mobjflag_t;
|
||||
|
||||
typedef enum
|
||||
|
|
|
@ -3207,6 +3207,8 @@ static void P_NetArchiveMisc(void)
|
|||
|
||||
WRITEUINT32(save_p, tokenlist);
|
||||
|
||||
WRITEUINT8(save_p, encoremode);
|
||||
|
||||
WRITEUINT32(save_p, leveltime);
|
||||
WRITEUINT32(save_p, totalrings);
|
||||
WRITEINT16(save_p, lastmap);
|
||||
|
@ -3256,7 +3258,6 @@ static void P_NetArchiveMisc(void)
|
|||
WRITEINT32(save_p, numgotboxes);
|
||||
|
||||
WRITEUINT8(save_p, gamespeed);
|
||||
WRITEUINT8(save_p, mirrormode);
|
||||
WRITEUINT8(save_p, franticitems);
|
||||
WRITEUINT8(save_p, comeback);
|
||||
|
||||
|
@ -3308,6 +3309,8 @@ static inline boolean P_NetUnArchiveMisc(void)
|
|||
|
||||
tokenlist = READUINT32(save_p);
|
||||
|
||||
encoremode = (boolean)READUINT8(save_p);
|
||||
|
||||
if (!P_SetupLevel(true))
|
||||
return false;
|
||||
|
||||
|
@ -3361,7 +3364,6 @@ static inline boolean P_NetUnArchiveMisc(void)
|
|||
numgotboxes = READINT32(save_p);
|
||||
|
||||
gamespeed = READUINT8(save_p);
|
||||
mirrormode = (boolean)READUINT8(save_p);
|
||||
franticitems = (boolean)READUINT8(save_p);
|
||||
comeback = (boolean)READUINT8(save_p);
|
||||
|
||||
|
|
|
@ -103,6 +103,7 @@ side_t *sides;
|
|||
mapthing_t *mapthings;
|
||||
INT32 numstarposts;
|
||||
boolean levelloading;
|
||||
UINT8 levelfadecol;
|
||||
|
||||
// BLOCKMAP
|
||||
// Created from axis aligned bounding box
|
||||
|
@ -218,6 +219,8 @@ static void P_ClearSingleMapHeaderInfo(INT16 i)
|
|||
mapheaderinfo[num]->countdown = 0;
|
||||
DEH_WriteUndoline("PALLETE", va("%u", mapheaderinfo[num]->palette), UNDO_NONE);
|
||||
mapheaderinfo[num]->palette = UINT16_MAX;
|
||||
DEH_WriteUndoline("ENCOREPAL", va("%u", mapheaderinfo[num]->encorepal), UNDO_NONE);
|
||||
mapheaderinfo[num]->encorepal = UINT16_MAX;
|
||||
DEH_WriteUndoline("NUMLAPS", va("%u", mapheaderinfo[num]->numlaps), UNDO_NONE);
|
||||
mapheaderinfo[num]->numlaps = NUMLAPS_DEFAULT;
|
||||
DEH_WriteUndoline("UNLOCKABLE", va("%s", mapheaderinfo[num]->unlockrequired), UNDO_NONE);
|
||||
|
@ -2246,6 +2249,26 @@ static void P_LevelInitStuff(void)
|
|||
// and this stupid flag as a result
|
||||
players[i].pflags &= ~PF_TRANSFERTOCLOSEST;
|
||||
}
|
||||
|
||||
// SRB2Kart: map load variables
|
||||
if (modeattacking) // Just play it safe and set everything
|
||||
{
|
||||
gamespeed = 2;
|
||||
franticitems = false;
|
||||
comeback = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (G_BattleGametype())
|
||||
gamespeed = 0;
|
||||
else
|
||||
gamespeed = (UINT8)cv_kartspeed.value;
|
||||
franticitems = (boolean)cv_kartfrantic.value;
|
||||
comeback = (boolean)cv_kartcomeback.value;
|
||||
}
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
battlewanted[i] = -1;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -2620,23 +2643,31 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
// will be set by player think.
|
||||
players[consoleplayer].viewz = 1;
|
||||
|
||||
// Special stage fade to white
|
||||
// Encore mode fade to pink to white
|
||||
// This is handled BEFORE sounds are stopped.
|
||||
/*if (rendermode != render_none && G_IsSpecialStage(gamemap))
|
||||
if (rendermode != render_none && encoremode && !prevencoremode)
|
||||
{
|
||||
tic_t starttime = I_GetTime();
|
||||
tic_t endtime = starttime + (3*TICRATE)/2;
|
||||
tic_t nowtime;
|
||||
tic_t starttime, endtime, nowtime;
|
||||
|
||||
S_StartSound(NULL, sfx_s3kaf);
|
||||
S_StopMusic(); // er, about that...
|
||||
|
||||
S_StartSound(NULL, sfx_ruby1);
|
||||
|
||||
F_WipeStartScreen();
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 0);
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 122);
|
||||
|
||||
F_WipeEndScreen();
|
||||
F_RunWipe(wipedefs[wipe_speclevel_towhite], false);
|
||||
|
||||
nowtime = lastwipetic;
|
||||
F_WipeStartScreen();
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 120);
|
||||
|
||||
F_WipeEndScreen();
|
||||
F_RunWipe(wipedefs[wipe_level_final], false);
|
||||
|
||||
starttime = nowtime = lastwipetic;
|
||||
endtime = starttime + (3*TICRATE)/2;
|
||||
|
||||
// Hold on white for extra effect.
|
||||
while (nowtime < endtime)
|
||||
{
|
||||
|
@ -2649,30 +2680,31 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
}
|
||||
|
||||
ranspecialwipe = 1;
|
||||
}*/
|
||||
}
|
||||
|
||||
// Make sure all sounds are stopped before Z_FreeTags.
|
||||
S_StopSounds();
|
||||
S_ClearSfx();
|
||||
|
||||
|
||||
// As oddly named as this is, this handles music only.
|
||||
// We should be fine starting it here.
|
||||
S_Start();
|
||||
// SRB2 Kart - Yes this is weird, but we don't want the music to start until after the countdown is finished
|
||||
// but we do still need the mapmusname to be changed
|
||||
if (leveltime < (starttime + (TICRATE/2)))
|
||||
S_ChangeMusicInternal("kstart", false); //S_StopMusic();
|
||||
S_ChangeMusicInternal((encoremode ? "estart" : "kstart"), false); //S_StopMusic();
|
||||
|
||||
// Let's fade to black here
|
||||
// But only if we didn't do the special stage wipe
|
||||
levelfadecol = (encoremode && !ranspecialwipe ? 122 : 120);
|
||||
|
||||
// Let's fade to white here
|
||||
// But only if we didn't do the encore startup wipe
|
||||
if (rendermode != render_none && !ranspecialwipe)
|
||||
{
|
||||
F_WipeStartScreen();
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 120);
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, levelfadecol);
|
||||
|
||||
F_WipeEndScreen();
|
||||
F_RunWipe(wipedefs[wipe_level_toblack], false);
|
||||
F_RunWipe(wipedefs[(encoremode ? wipe_level_final : wipe_level_toblack)], false);
|
||||
}
|
||||
|
||||
// Reset the palette now all fades have been done
|
||||
|
@ -2728,7 +2760,8 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
// internal game map
|
||||
lastloadedmaplumpnum = W_GetNumForName(maplumpname = G_BuildMapName(gamemap));
|
||||
|
||||
R_ReInitColormaps(mapheaderinfo[gamemap-1]->palette);
|
||||
R_ReInitColormaps(mapheaderinfo[gamemap-1]->palette,
|
||||
(encoremode ? W_CheckNumForName(va("%sE", maplumpname)) : LUMPERROR));
|
||||
CON_SetupBackColormap();
|
||||
|
||||
// SRB2 determines the sky texture to be used depending on the map header.
|
||||
|
@ -2988,33 +3021,6 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
CV_SetValue(&cv_analog, false);
|
||||
}*/
|
||||
|
||||
// SRB2Kart: map load variables
|
||||
if (modeattacking) // Just play it safe and set everything
|
||||
{
|
||||
gamespeed = 2;
|
||||
mirrormode = false;
|
||||
franticitems = false;
|
||||
comeback = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (G_BattleGametype())
|
||||
{
|
||||
gamespeed = 0;
|
||||
mirrormode = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
gamespeed = (UINT8)cv_kartspeed.value;
|
||||
mirrormode = (boolean)cv_kartmirror.value;
|
||||
}
|
||||
franticitems = (boolean)cv_kartfrantic.value;
|
||||
comeback = (boolean)cv_kartcomeback.value;
|
||||
}
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
battlewanted[i] = -1;
|
||||
|
||||
wantedcalcdelay = wantedfrequency*2;
|
||||
indirectitemcooldown = 0;
|
||||
spbincoming = 0;
|
||||
|
@ -3039,7 +3045,7 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
|
||||
// Remove the loading shit from the screen
|
||||
if (rendermode != render_none)
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 120);
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, levelfadecol);
|
||||
|
||||
if (precache || dedicated)
|
||||
R_PrecacheLevel();
|
||||
|
|
|
@ -27,6 +27,7 @@ extern mapthing_t *deathmatchstarts[MAX_DM_STARTS];
|
|||
extern INT32 numdmstarts, numcoopstarts, numredctfstarts, numbluectfstarts;
|
||||
|
||||
extern boolean levelloading;
|
||||
extern UINT8 levelfadecol;
|
||||
|
||||
extern lumpnum_t lastloadedmaplumpnum; // for comparative savegame
|
||||
//
|
||||
|
|
|
@ -778,6 +778,10 @@ void P_ReverseQuantizeMomentumToSlope(vector3_t *momentum, pslope_t *slope)
|
|||
slope->zangle = InvAngle(slope->zangle);
|
||||
}
|
||||
|
||||
// SRB2Kart: This fixes all slope-based jumps for different scales in Kart automatically without map tweaking.
|
||||
// However, they will always feel off every single time... see for yourself: https://cdn.discordapp.com/attachments/270211093761097728/484924392128774165/kart0181.gif
|
||||
//#define GROWNEVERMISSES
|
||||
|
||||
//
|
||||
// P_SlopeLaunch
|
||||
//
|
||||
|
@ -795,9 +799,19 @@ void P_SlopeLaunch(mobj_t *mo)
|
|||
slopemom.z = mo->momz;
|
||||
P_QuantizeMomentumToSlope(&slopemom, mo->standingslope);
|
||||
|
||||
#ifdef GROWNEVERMISSES
|
||||
{
|
||||
const fixed_t xyscale = mapheaderinfo[gamemap-1]->mobj_scale + (mapheaderinfo[gamemap-1]->mobj_scale - mo->scale);
|
||||
const fixed_t zscale = mapheaderinfo[gamemap-1]->mobj_scale + (mapheaderinfo[gamemap-1]->mobj_scale - mo->scale);
|
||||
mo->momx = FixedMul(slopemom.x, xyscale);
|
||||
mo->momy = FixedMul(slopemom.y, xyscale);
|
||||
mo->momz = FixedMul(slopemom.z, zscale);
|
||||
}
|
||||
#else
|
||||
mo->momx = slopemom.x;
|
||||
mo->momy = slopemom.y;
|
||||
mo->momz = slopemom.z;
|
||||
#endif
|
||||
}
|
||||
|
||||
//CONS_Printf("Launched off of slope.\n");
|
||||
|
|
42
src/p_spec.c
42
src/p_spec.c
|
@ -1940,6 +1940,7 @@ boolean P_RunTriggerLinedef(line_t *triggerline, mobj_t *actor, sector_t *caller
|
|||
|| specialtype == 318 // Unlockable trigger - Once
|
||||
|| specialtype == 320 // Unlockable - Once
|
||||
|| specialtype == 321 || specialtype == 322 // Trigger on X calls - Continuous + Each Time
|
||||
|| specialtype == 328 // Encore Load
|
||||
|| specialtype == 399) // Level Load
|
||||
triggerline->special = 0; // Clear it out
|
||||
|
||||
|
@ -1975,6 +1976,7 @@ void P_LinedefExecute(INT16 tag, mobj_t *actor, sector_t *caller)
|
|||
// "No More Enemies" and "Level Load" take care of themselves.
|
||||
if (lines[masterline].special == 313
|
||||
|| lines[masterline].special == 399
|
||||
|| lines[masterline].special == 328
|
||||
// Each-time executors handle themselves, too
|
||||
|| lines[masterline].special == 301 // Each time
|
||||
|| lines[masterline].special == 306 // Character ability - Each time
|
||||
|
@ -3616,10 +3618,7 @@ void P_ProcessSpecialSector(player_t *player, sector_t *sector, sector_t *rovers
|
|||
if (gametype == GT_CTF && player->gotflag & (GF_REDFLAG|GF_BLUEFLAG))
|
||||
P_PlayerFlagBurst(player, false);
|
||||
break;
|
||||
case 12: // Space Countdown
|
||||
if ((player->powers[pw_shield] & SH_NOSTACK) != SH_ELEMENTAL && !player->powers[pw_spacetime])
|
||||
player->powers[pw_spacetime] = spacetimetics + 1;
|
||||
break;
|
||||
case 12: // Wall Sector (Don't step-up/down)
|
||||
case 13: // Ramp Sector (Increase step-up/down)
|
||||
case 14: // Non-Ramp Sector (Don't step-down)
|
||||
case 15: // Bouncy Sector (FOF Control Only)
|
||||
|
@ -3745,6 +3744,8 @@ void P_ProcessSpecialSector(player_t *player, sector_t *sector, sector_t *rovers
|
|||
break;
|
||||
case 12: // Lua sector special
|
||||
break;
|
||||
case 15: // Invert Encore Remap
|
||||
break;
|
||||
}
|
||||
DoneSection2:
|
||||
|
||||
|
@ -3756,8 +3757,8 @@ DoneSection2:
|
|||
case 1: // SRB2kart: Spring Panel
|
||||
if (roversector || P_MobjReadyToTrigger(player->mo, sector))
|
||||
{
|
||||
const fixed_t scale = mapheaderinfo[gamemap-1]->mobj_scale + abs(player->mo->scale - mapheaderinfo[gamemap-1]->mobj_scale);
|
||||
const fixed_t minspeed = 24*scale;
|
||||
const fixed_t hscale = mapheaderinfo[gamemap-1]->mobj_scale + (mapheaderinfo[gamemap-1]->mobj_scale - player->mo->scale);
|
||||
const fixed_t minspeed = 24*hscale;
|
||||
|
||||
if (player->mo->eflags & MFE_SPRUNG)
|
||||
break;
|
||||
|
@ -3776,9 +3777,9 @@ DoneSection2:
|
|||
case 3: // SRB2kart: Spring Panel (capped speed)
|
||||
if (roversector || P_MobjReadyToTrigger(player->mo, sector))
|
||||
{
|
||||
const fixed_t scale = mapheaderinfo[gamemap-1]->mobj_scale + abs(player->mo->scale - mapheaderinfo[gamemap-1]->mobj_scale);
|
||||
const fixed_t minspeed = 24*scale;
|
||||
const fixed_t maxspeed = 36*scale;
|
||||
const fixed_t hscale = mapheaderinfo[gamemap-1]->mobj_scale + (mapheaderinfo[gamemap-1]->mobj_scale - player->mo->scale);
|
||||
const fixed_t minspeed = 24*hscale;
|
||||
const fixed_t maxspeed = 28*hscale;
|
||||
|
||||
if (player->mo->eflags & MFE_SPRUNG)
|
||||
break;
|
||||
|
@ -3798,7 +3799,7 @@ DoneSection2:
|
|||
|
||||
case 5: // Speed pad w/o spin
|
||||
case 6: // Speed pad w/ spin
|
||||
if (player->powers[pw_flashing] != 0 && player->powers[pw_flashing] < TICRATE/2)
|
||||
if (player->kartstuff[k_dashpadcooldown] != 0)
|
||||
break;
|
||||
|
||||
i = P_FindSpecialLineFromTag(4, sector->tag, -1);
|
||||
|
@ -3813,6 +3814,11 @@ DoneSection2:
|
|||
|
||||
player->mo->angle = lineangle;
|
||||
|
||||
// SRB2Kart: Scale the speed you get from them!
|
||||
// This is scaled differently from other horizontal speed boosts from stuff like springs, because of how this is used for some ramp jumps.
|
||||
if (player->mo->scale > mapheaderinfo[gamemap-1]->mobj_scale)
|
||||
linespeed = FixedMul(linespeed, mapheaderinfo[gamemap-1]->mobj_scale + (player->mo->scale - mapheaderinfo[gamemap-1]->mobj_scale));
|
||||
|
||||
if (!demoplayback || P_AnalogMove(player))
|
||||
{
|
||||
if (player == &players[consoleplayer])
|
||||
|
@ -3843,15 +3849,15 @@ DoneSection2:
|
|||
|
||||
P_InstaThrust(player->mo, player->mo->angle, linespeed);
|
||||
|
||||
if (GETSECSPECIAL(sector->special, 3) == 6 && (player->charability2 == CA2_SPINDASH))
|
||||
/*if (GETSECSPECIAL(sector->special, 3) == 6 && (player->charability2 == CA2_SPINDASH)) // SRB2kart
|
||||
{
|
||||
if (!(player->pflags & PF_SPINNING))
|
||||
player->pflags |= PF_SPINNING;
|
||||
|
||||
//P_SetPlayerMobjState(player->mo, S_PLAY_ATK1); // SRB2kart
|
||||
}
|
||||
//P_SetPlayerMobjState(player->mo, S_PLAY_ATK1);
|
||||
}*/
|
||||
|
||||
player->powers[pw_flashing] = TICRATE/3;
|
||||
player->kartstuff[k_dashpadcooldown] = TICRATE/3;
|
||||
S_StartSound(player->mo, sfx_spdpad);
|
||||
}
|
||||
break;
|
||||
|
@ -5559,7 +5565,7 @@ static void P_RunLevelLoadExecutors(void)
|
|||
|
||||
for (i = 0; i < numlines; i++)
|
||||
{
|
||||
if (lines[i].special == 399)
|
||||
if (lines[i].special == 399 || lines[i].special == 328)
|
||||
P_RunTriggerLinedef(&lines[i], NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
@ -6450,6 +6456,12 @@ void P_SpawnSpecials(INT32 fromnetsave)
|
|||
}
|
||||
break;
|
||||
|
||||
case 328: // Encore-only linedef execute on map load
|
||||
if (!encoremode)
|
||||
lines[i].special = 0;
|
||||
// This is handled in P_RunLevelLoadExecutors.
|
||||
break;
|
||||
|
||||
case 399: // Linedef execute on map load
|
||||
// This is handled in P_RunLevelLoadExecutors.
|
||||
break;
|
||||
|
|
|
@ -744,7 +744,7 @@ void P_Ticker(boolean run)
|
|||
if (mapreset > 1
|
||||
&& --mapreset <= 1
|
||||
&& server) // Remember: server uses it for mapchange, but EVERYONE ticks down for the animation
|
||||
D_MapChange(gamemap, gametype, ultimatemode, true, 0, false, false);
|
||||
D_MapChange(gamemap, gametype, encoremode, true, 0, false, false);
|
||||
}
|
||||
|
||||
P_MapEnd();
|
||||
|
|
409
src/p_user.c
409
src/p_user.c
|
@ -1221,7 +1221,7 @@ void P_RestoreMusic(player_t *player)
|
|||
|
||||
// Event - Level Start
|
||||
if (leveltime < (starttime + (TICRATE/2)))
|
||||
S_ChangeMusicInternal("kstart", false); //S_StopMusic();
|
||||
S_ChangeMusicInternal((encoremode ? "estart" : "kstart"), false); //S_StopMusic();
|
||||
else // see also where time overs are handled - search for "lives = 2" in this file
|
||||
{
|
||||
// Item - Grow
|
||||
|
@ -1599,6 +1599,9 @@ mobj_t *P_SpawnGhostMobj(mobj_t *mobj)
|
|||
if (mobj->flags2 & MF2_OBJECTFLIP)
|
||||
ghost->flags |= MF2_OBJECTFLIP;
|
||||
|
||||
if (!(mobj->flags & MF_DONTENCOREMAP))
|
||||
mobj->flags &= ~MF_DONTENCOREMAP;
|
||||
|
||||
return ghost;
|
||||
}
|
||||
|
||||
|
@ -2939,17 +2942,14 @@ static void P_DoClimbing(player_t *player) // SRB2kart - unused
|
|||
P_InstaThrust(player->mo, player->mo->angle, FixedMul(-4*FRACUNIT, player->mo->scale));
|
||||
}
|
||||
|
||||
if (!demoplayback || P_AnalogMove(player))
|
||||
{
|
||||
if (player == &players[consoleplayer])
|
||||
localangle = player->mo->angle;
|
||||
else if (player == &players[secondarydisplayplayer])
|
||||
localangle2 = player->mo->angle;
|
||||
else if (player == &players[thirddisplayplayer])
|
||||
localangle3 = player->mo->angle;
|
||||
else if (player == &players[fourthdisplayplayer])
|
||||
localangle4 = player->mo->angle;
|
||||
}
|
||||
if (player == &players[consoleplayer])
|
||||
localangle = player->mo->angle;
|
||||
else if (player == &players[secondarydisplayplayer])
|
||||
localangle2 = player->mo->angle;
|
||||
else if (player == &players[thirddisplayplayer])
|
||||
localangle3 = player->mo->angle;
|
||||
else if (player == &players[fourthdisplayplayer])
|
||||
localangle4 = player->mo->angle;
|
||||
|
||||
if (player->climbing == 0)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_ATK1);
|
||||
|
@ -2978,7 +2978,7 @@ static fixed_t teeteryl, teeteryh;
|
|||
static boolean PIT_CheckSolidsTeeter(mobj_t *thing) // SRB2kart - unused.
|
||||
{
|
||||
fixed_t blockdist;
|
||||
fixed_t tiptop = FixedMul(MAXSTEPMOVE, teeterer->scale);
|
||||
fixed_t tiptop = FixedMul(MAXSTEPMOVE, mapheaderinfo[gamemap-1]->mobj_scale);
|
||||
fixed_t thingtop = thing->z + thing->height;
|
||||
fixed_t teeterertop = teeterer->z + teeterer->height;
|
||||
|
||||
|
@ -3095,7 +3095,7 @@ static void P_DoTeeter(player_t *player) // SRB2kart - unused.
|
|||
boolean roverfloor; // solid 3d floors?
|
||||
fixed_t floorheight, ceilingheight;
|
||||
fixed_t topheight, bottomheight; // for 3d floor usage
|
||||
const fixed_t tiptop = FixedMul(MAXSTEPMOVE, player->mo->scale); // Distance you have to be above the ground in order to teeter.
|
||||
const fixed_t tiptop = FixedMul(MAXSTEPMOVE, mapheaderinfo[gamemap-1]->mobj_scale); // Distance you have to be above the ground in order to teeter.
|
||||
|
||||
if (player->mo->standingslope && player->mo->standingslope->zdelta >= (FRACUNIT/2)) // Always teeter if the slope is too steep.
|
||||
teeter = true;
|
||||
|
@ -3772,17 +3772,14 @@ void P_DoJump(player_t *player, boolean soundandstate)
|
|||
|
||||
player->mo->angle = player->mo->angle - ANGLE_180; // Turn around from the wall you were climbing.
|
||||
|
||||
if (!demoplayback || P_AnalogMove(player))
|
||||
{
|
||||
if (player == &players[consoleplayer])
|
||||
localangle = player->mo->angle; // Adjust the local control angle.
|
||||
else if (player == &players[secondarydisplayplayer])
|
||||
localangle2 = player->mo->angle;
|
||||
else if (player == &players[thirddisplayplayer])
|
||||
localangle3 = player->mo->angle;
|
||||
else if (player == &players[fourthdisplayplayer])
|
||||
localangle4 = player->mo->angle;
|
||||
}
|
||||
if (player == &players[consoleplayer])
|
||||
localangle = player->mo->angle; // Adjust the local control angle.
|
||||
else if (player == &players[secondarydisplayplayer])
|
||||
localangle2 = player->mo->angle;
|
||||
else if (player == &players[thirddisplayplayer])
|
||||
localangle3 = player->mo->angle;
|
||||
else if (player == &players[fourthdisplayplayer])
|
||||
localangle4 = player->mo->angle;
|
||||
|
||||
player->climbing = 0; // Stop climbing, duh!
|
||||
P_InstaThrust(player->mo, player->mo->angle, FixedMul(6*FRACUNIT, player->mo->scale)); // Jump off the wall.
|
||||
|
@ -7765,8 +7762,8 @@ boolean P_LookForEnemies(player_t *player)
|
|||
if (mo->type == MT_DETON) // Don't be STUPID, Sonic!
|
||||
continue;
|
||||
|
||||
if (((mo->z > player->mo->z+FixedMul(MAXSTEPMOVE, player->mo->scale)) && !(player->mo->eflags & MFE_VERTICALFLIP))
|
||||
|| ((mo->z+mo->height < player->mo->z+player->mo->height-FixedMul(MAXSTEPMOVE, player->mo->scale)) && (player->mo->eflags & MFE_VERTICALFLIP))) // Reverse gravity check - Flame.
|
||||
if (((mo->z > player->mo->z+FixedMul(MAXSTEPMOVE, mapheaderinfo[gamemap-1]->mobj_scale)) && !(player->mo->eflags & MFE_VERTICALFLIP))
|
||||
|| ((mo->z+mo->height < player->mo->z+player->mo->height-FixedMul(MAXSTEPMOVE, mapheaderinfo[gamemap-1]->mobj_scale)) && (player->mo->eflags & MFE_VERTICALFLIP))) // Reverse gravity check - Flame.
|
||||
continue; // Don't home upwards!
|
||||
|
||||
if (P_AproxDistance(P_AproxDistance(player->mo->x-mo->x, player->mo->y-mo->y),
|
||||
|
@ -7820,7 +7817,7 @@ void P_HomingAttack(mobj_t *source, mobj_t *enemy) // Home in on your target
|
|||
|
||||
// change angle
|
||||
source->angle = R_PointToAngle2(source->x, source->y, enemy->x, enemy->y);
|
||||
if (source->player && (!demoplayback || P_AnalogMove(source->player)))
|
||||
if (source->player)
|
||||
{
|
||||
if (source->player == &players[consoleplayer])
|
||||
localangle = source->angle;
|
||||
|
@ -8086,25 +8083,25 @@ static CV_PossibleValue_t CV_CamRotate[] = {{-720, "MIN"}, {720, "MAX"}, {0, NUL
|
|||
consvar_t cv_cam_dist = {"cam_dist", "160", CV_FLOAT|CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam_height = {"cam_height", "50", CV_FLOAT|CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam_still = {"cam_still", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam_speed = {"cam_speed", "0.45", CV_FLOAT|CV_SAVE, CV_CamSpeed, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam_speed = {"cam_speed", "0.4", CV_FLOAT|CV_SAVE, CV_CamSpeed, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam_rotate = {"cam_rotate", "0", CV_CALL|CV_NOINIT, CV_CamRotate, CV_CamRotate_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam_rotspeed = {"cam_rotspeed", "10", CV_SAVE, rotation_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_dist = {"cam2_dist", "160", CV_FLOAT|CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_height = {"cam2_height", "50", CV_FLOAT|CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_still = {"cam2_still", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_speed = {"cam2_speed", "0.45", CV_FLOAT|CV_SAVE, CV_CamSpeed, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_speed = {"cam2_speed", "0.4", CV_FLOAT|CV_SAVE, CV_CamSpeed, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_rotate = {"cam2_rotate", "0", CV_CALL|CV_NOINIT, CV_CamRotate, CV_CamRotate2_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_rotspeed = {"cam2_rotspeed", "10", CV_SAVE, rotation_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam3_dist = {"cam3_dist", "160", CV_FLOAT|CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam3_height = {"cam3_height", "50", CV_FLOAT|CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam3_still = {"cam3_still", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam3_speed = {"cam3_speed", "0.45", CV_FLOAT|CV_SAVE, CV_CamSpeed, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam3_speed = {"cam3_speed", "0.4", CV_FLOAT|CV_SAVE, CV_CamSpeed, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam3_rotate = {"cam3_rotate", "0", CV_CALL|CV_NOINIT, CV_CamRotate, CV_CamRotate3_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam3_rotspeed = {"cam3_rotspeed", "10", CV_SAVE, rotation_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam4_dist = {"cam4_dist", "160", CV_FLOAT|CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam4_height = {"cam4_height", "50", CV_FLOAT|CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam4_still = {"cam4_still", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam4_speed = {"cam4_speed", "0.45", CV_FLOAT|CV_SAVE, CV_CamSpeed, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam4_speed = {"cam4_speed", "0.4", CV_FLOAT|CV_SAVE, CV_CamSpeed, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam4_rotate = {"cam4_rotate", "0", CV_CALL|CV_NOINIT, CV_CamRotate, CV_CamRotate4_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam4_rotspeed = {"cam4_rotspeed", "10", CV_SAVE, rotation_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
|
@ -8168,7 +8165,8 @@ void P_ResetCamera(player_t *player, camera_t *thiscam)
|
|||
boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcalled)
|
||||
{
|
||||
angle_t angle = 0, focusangle = 0, focusaiming = 0;
|
||||
fixed_t x, y, z, dist, height, checkdist, viewpointx, viewpointy, camspeed, camdist, camheight, pviewheight;
|
||||
fixed_t x, y, z, dist, height, viewpointx, viewpointy, camspeed, camdist, camheight, pviewheight;
|
||||
fixed_t pan, xpan, ypan;
|
||||
INT32 camrotate;
|
||||
boolean camstill, cameranoclip, lookback;
|
||||
mobj_t *mo;
|
||||
|
@ -8238,8 +8236,8 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
|
||||
mo = player->mo;
|
||||
|
||||
thiscam->radius = FixedMul(20*FRACUNIT, mo->scale);
|
||||
thiscam->height = FixedMul(16*FRACUNIT, mo->scale);
|
||||
thiscam->radius = FixedMul(20*FRACUNIT, mapheaderinfo[gamemap-1]->mobj_scale);
|
||||
thiscam->height = FixedMul(16*FRACUNIT, mapheaderinfo[gamemap-1]->mobj_scale);
|
||||
|
||||
if (!mo)
|
||||
return true;
|
||||
|
@ -8337,54 +8335,31 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
camspeed = FRACUNIT;
|
||||
}
|
||||
|
||||
#ifdef REDSANALOG
|
||||
if (P_AnalogMove(player) && (player->cmd.buttons & (BT_FORWARD|BT_BACKWARD)) == (BT_FORWARD|BT_BACKWARD)) {
|
||||
camstill = true;
|
||||
if (camspeed < 4*FRACUNIT/5)
|
||||
camspeed = 4*FRACUNIT/5;
|
||||
}
|
||||
#endif // REDSANALOG
|
||||
|
||||
if (mo->eflags & MFE_VERTICALFLIP)
|
||||
camheight += thiscam->height;
|
||||
|
||||
if (twodlevel || (mo->flags2 & MF2_TWOD))
|
||||
angle = ANGLE_90;
|
||||
else if (camstill || resetcalled || player->playerstate == PST_DEAD)
|
||||
if (camstill || resetcalled || player->playerstate == PST_DEAD)
|
||||
angle = thiscam->angle;
|
||||
else if (player->pflags & PF_NIGHTSMODE) // NiGHTS Level
|
||||
{
|
||||
if ((player->pflags & PF_TRANSFERTOCLOSEST) && player->axis1 && player->axis2)
|
||||
{
|
||||
angle = R_PointToAngle2(player->axis1->x, player->axis1->y, player->axis2->x, player->axis2->y);
|
||||
angle += ANGLE_90;
|
||||
}
|
||||
else if (player->mo->target)
|
||||
{
|
||||
if (player->mo->target->flags2 & MF2_AMBUSH)
|
||||
angle = R_PointToAngle2(player->mo->target->x, player->mo->target->y, player->mo->x, player->mo->y);
|
||||
else
|
||||
angle = R_PointToAngle2(player->mo->x, player->mo->y, player->mo->target->x, player->mo->target->y);
|
||||
}
|
||||
}
|
||||
else if (P_AnalogMove(player)) // Analog
|
||||
angle = R_PointToAngle2(thiscam->x, thiscam->y, mo->x, mo->y);
|
||||
else if (demoplayback && leveltime > starttime)
|
||||
{
|
||||
angle = focusangle;
|
||||
focusangle = R_PointToAngle2(thiscam->x, thiscam->y, mo->x, mo->y);
|
||||
if (player == &players[consoleplayer])
|
||||
{
|
||||
if (focusangle >= localangle)
|
||||
localangle += abs((signed)(focusangle - localangle))>>5;
|
||||
else
|
||||
localangle -= abs((signed)(focusangle - localangle))>>5;
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (leveltime < starttime)
|
||||
angle = focusangle + FixedAngle(camrotate*FRACUNIT);
|
||||
else
|
||||
{
|
||||
angle_t input = focusangle + FixedAngle(camrotate<<FRACBITS) - thiscam->angle;
|
||||
boolean invert = (input > ANGLE_180);
|
||||
if (invert)
|
||||
input = InvAngle(input);
|
||||
|
||||
if (!resetcalled && (leveltime > starttime) && (cv_analog.value || demoplayback)
|
||||
input = FixedAngle(FixedMul(AngleFixed(input), camspeed));
|
||||
if (invert)
|
||||
input = InvAngle(input);
|
||||
|
||||
angle = thiscam->angle + input;
|
||||
|
||||
if (demoplayback && player == &players[consoleplayer])
|
||||
localangle = angle;
|
||||
}
|
||||
|
||||
if (!resetcalled && (leveltime > starttime)
|
||||
&& ((thiscam == &camera && t_cam_rotate != -42)
|
||||
|| (thiscam == &camera2 && t_cam2_rotate != -42)
|
||||
|| (thiscam == &camera3 && t_cam3_rotate != -42)
|
||||
|
@ -8394,112 +8369,51 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
thiscam->angle = angle;
|
||||
}
|
||||
|
||||
/* // SRB2kart - camera controls are disabled... for now.
|
||||
if (!objectplacing && !(twodlevel || (mo->flags2 & MF2_TWOD)) && !(player->pflags & PF_NIGHTSMODE) && displayplayer == consoleplayer)
|
||||
{
|
||||
#ifdef REDSANALOG
|
||||
if ((player->cmd.buttons & (BT_FORWARD|BT_BACKWARD)) == (BT_FORWARD|BT_BACKWARD)); else
|
||||
#endif
|
||||
if (player->cmd.buttons & BT_FORWARD)
|
||||
{
|
||||
if (thiscam == &camera)
|
||||
{
|
||||
if (cv_analog.value || demoplayback)
|
||||
angle -= FixedAngle(cv_cam_rotspeed.value*FRACUNIT);
|
||||
else
|
||||
CV_SetValue(&cv_cam_rotate, camrotate == 0 ? 358
|
||||
: camrotate - 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cv_analog2.value)
|
||||
angle -= FixedAngle(cv_cam2_rotspeed.value*FRACUNIT);
|
||||
else
|
||||
CV_SetValue(&cv_cam2_rotate, camrotate == 0 ? 358
|
||||
: camrotate - 2);
|
||||
}
|
||||
}
|
||||
else if (player->cmd.buttons & BT_BACKWARD)
|
||||
{
|
||||
if (thiscam == &camera)
|
||||
{
|
||||
if (cv_analog.value || demoplayback)
|
||||
angle += FixedAngle(cv_cam_rotspeed.value*FRACUNIT);
|
||||
else
|
||||
CV_SetValue(&cv_cam_rotate, camrotate + 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cv_analog2.value)
|
||||
angle += FixedAngle(cv_cam2_rotspeed.value*FRACUNIT);
|
||||
else
|
||||
CV_SetValue(&cv_cam2_rotate, camrotate + 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
height = camheight;
|
||||
|
||||
// sets ideal cam pos
|
||||
if (twodlevel || (mo->flags2 & MF2_TWOD))
|
||||
dist = 480<<FRACBITS;
|
||||
else if (player->pflags & PF_NIGHTSMODE)
|
||||
dist = 320<<FRACBITS;
|
||||
else
|
||||
dist = camdist;
|
||||
|
||||
if (player->speed > K_GetKartSpeed(player, false))
|
||||
dist += 4*(player->speed - K_GetKartSpeed(player, false));
|
||||
dist += abs(thiscam->momz)/4;
|
||||
|
||||
if (player->kartstuff[k_boostcam])
|
||||
{
|
||||
dist = camdist;
|
||||
|
||||
// in splitscreen modes, mess with the camera distances to make it feel proportional to how it feels normally
|
||||
if (splitscreen == 1) // widescreen splits should get x1.5 distance
|
||||
{
|
||||
dist = FixedMul(dist, 3*FRACUNIT/2);
|
||||
height = FixedMul(height, 3*FRACUNIT/2);
|
||||
}
|
||||
|
||||
if (player->climbing || player->exiting || player->playerstate == PST_DEAD || (player->pflags & (PF_MACESPIN|PF_ITEMHANG|PF_ROPEHANG)))
|
||||
dist <<= 1;
|
||||
dist -= FixedMul(11*dist/16, player->kartstuff[k_boostcam]);
|
||||
height -= FixedMul(height, player->kartstuff[k_boostcam]);
|
||||
}
|
||||
|
||||
checkdist = dist;
|
||||
|
||||
if (checkdist < 128*FRACUNIT)
|
||||
checkdist = 128*FRACUNIT;
|
||||
// in splitscreen modes, mess with the camera distances to make it feel proportional to how it feels normally
|
||||
if (splitscreen == 1) // widescreen splits should get x1.5 distance
|
||||
{
|
||||
dist = FixedMul(dist, 3*FRACUNIT/2);
|
||||
height = FixedMul(height, 3*FRACUNIT/2);
|
||||
}
|
||||
|
||||
x = mo->x - FixedMul(FINECOSINE((angle>>ANGLETOFINESHIFT) & FINEMASK), dist);
|
||||
y = mo->y - FixedMul(FINESINE((angle>>ANGLETOFINESHIFT) & FINEMASK), dist);
|
||||
|
||||
#if 0
|
||||
if (twodlevel || (mo->flags2 & MF2_TWOD))
|
||||
// SRB2Kart: set camera panning
|
||||
if (player->kartstuff[k_drift] != 0)
|
||||
{
|
||||
// Camera doesn't ALWAYS need to move, only when running...
|
||||
if (abs(player->mo->momx) > 10)
|
||||
{
|
||||
// Move the camera all smooth-like, not jerk it around...
|
||||
if (mo->momx > 0)
|
||||
{
|
||||
if (thiscam->relativex < MAXCAMERADIST)
|
||||
thiscam->relativex += 4*FRACUNIT;
|
||||
}
|
||||
else if (mo->momx < 0)
|
||||
{
|
||||
if (thiscam->relativex > -MAXCAMERADIST)
|
||||
thiscam->relativex -= 4*FRACUNIT;
|
||||
}
|
||||
}
|
||||
else // If speed is less than required, start moving the camera back.
|
||||
{
|
||||
if (thiscam->relativex > 0)
|
||||
thiscam->relativex -= 4*FRACUNIT;
|
||||
else if (thiscam->relativex < 0)
|
||||
thiscam->relativex += 4*FRACUNIT;
|
||||
}
|
||||
|
||||
// Add the relative x to the global x
|
||||
x += thiscam->relativex;
|
||||
y += mo->momy << 1;
|
||||
fixed_t panmax = (dist/5);
|
||||
pan = FixedDiv(FixedMul(min((fixed_t)player->kartstuff[k_driftcharge], K_GetKartDriftSparkValue(player)), panmax), K_GetKartDriftSparkValue(player));
|
||||
if (pan > panmax)
|
||||
pan = panmax;
|
||||
if (player->kartstuff[k_drift] < 0)
|
||||
pan *= -1;
|
||||
}
|
||||
#endif // bad 2D camera code
|
||||
else
|
||||
pan = 0;
|
||||
|
||||
pan = thiscam->pan + FixedMul(pan - thiscam->pan, camspeed/4);
|
||||
|
||||
xpan = FixedMul(FINECOSINE(((angle+ANGLE_90)>>ANGLETOFINESHIFT) & FINEMASK), pan);
|
||||
ypan = FixedMul(FINESINE(((angle+ANGLE_90)>>ANGLETOFINESHIFT) & FINEMASK), pan);
|
||||
|
||||
x += xpan;
|
||||
y += ypan;
|
||||
|
||||
pviewheight = FixedMul(32<<FRACBITS, mo->scale);
|
||||
|
||||
|
@ -8677,7 +8591,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
for (rover = newsubsec->sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
fixed_t topheight, bottomheight;
|
||||
if ((rover->flags & FF_BLOCKOTHERS) && (rover->flags & FF_RENDERALL) && (rover->flags & FF_EXISTS) && GETSECSPECIAL(rover->master->frontsector->special, 4) != 12)
|
||||
if ((rover->flags & FF_BLOCKOTHERS) && (rover->flags & FF_RENDERALL) && (rover->flags & FF_EXISTS) && GETSECSPECIAL(rover->master->frontsector->special, 4) == 12)
|
||||
{
|
||||
topheight = P_CameraGetFOFTopZ(thiscam, newsubsec->sector, rover, midx, midy, NULL);
|
||||
bottomheight = P_CameraGetFOFBottomZ(thiscam, newsubsec->sector, rover, midx, midy, NULL);
|
||||
|
@ -8703,72 +8617,39 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
}
|
||||
}
|
||||
|
||||
if (mo->type == MT_EGGTRAP)
|
||||
z = mo->z + 128*FRACUNIT + pviewheight + camheight;
|
||||
|
||||
if (thiscam->z < thiscam->floorz && !cameranoclip)
|
||||
thiscam->z = thiscam->floorz;
|
||||
|
||||
// point viewed by the camera
|
||||
// this point is just 64 unit forward the player
|
||||
dist = FixedMul(64 << FRACBITS, mapheaderinfo[gamemap-1]->mobj_scale);
|
||||
viewpointx = mo->x + FixedMul(FINECOSINE((angle>>ANGLETOFINESHIFT) & FINEMASK), dist);
|
||||
viewpointy = mo->y + FixedMul(FINESINE((angle>>ANGLETOFINESHIFT) & FINEMASK), dist);
|
||||
dist = 64*mapheaderinfo[gamemap-1]->mobj_scale;
|
||||
viewpointx = mo->x + FixedMul(FINECOSINE((angle>>ANGLETOFINESHIFT) & FINEMASK), dist) + xpan;
|
||||
viewpointy = mo->y + FixedMul(FINESINE((angle>>ANGLETOFINESHIFT) & FINEMASK), dist) + ypan;
|
||||
|
||||
if (!camstill && !resetcalled && !paused)
|
||||
thiscam->angle = R_PointToAngle2(thiscam->x, thiscam->y, viewpointx, viewpointy);
|
||||
|
||||
viewpointx = mo->x + FixedMul(FINECOSINE((angle>>ANGLETOFINESHIFT) & FINEMASK), dist);
|
||||
viewpointy = mo->y + FixedMul(FINESINE((angle>>ANGLETOFINESHIFT) & FINEMASK), dist);
|
||||
|
||||
/*
|
||||
if (twodlevel || (mo->flags2 & MF2_TWOD))
|
||||
thiscam->angle = angle;
|
||||
*/
|
||||
// follow the player
|
||||
/*if (player->playerstate != PST_DEAD && (camspeed) != 0)
|
||||
{
|
||||
if (P_AproxDistance(mo->x - thiscam->x, mo->y - thiscam->y) > (checkdist + P_AproxDistance(mo->momx, mo->momy)) * 4
|
||||
|| abs(mo->z - thiscam->z) > checkdist * 3)
|
||||
{
|
||||
if (!resetcalled)
|
||||
P_ResetCamera(player, thiscam);
|
||||
return true;
|
||||
}
|
||||
}*/
|
||||
|
||||
if (player->exiting)
|
||||
{
|
||||
thiscam->momx = 0;
|
||||
thiscam->momy = 0;
|
||||
thiscam->momz = 0;
|
||||
}
|
||||
else if (leveltime < starttime)
|
||||
{
|
||||
thiscam->momx = FixedMul(x - thiscam->x, camspeed);
|
||||
thiscam->momy = FixedMul(y - thiscam->y, camspeed);
|
||||
thiscam->momz = FixedMul(z - thiscam->z, camspeed);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (twodlevel || (mo->flags2 & MF2_TWOD))
|
||||
{
|
||||
thiscam->momx = x-thiscam->x;
|
||||
thiscam->momy = y-thiscam->y;
|
||||
thiscam->momz = z-thiscam->z;
|
||||
}
|
||||
else
|
||||
{
|
||||
thiscam->momx = FixedMul(x - thiscam->x, camspeed);
|
||||
thiscam->momy = FixedMul(y - thiscam->y, camspeed);
|
||||
|
||||
if ((GETSECSPECIAL(thiscam->subsector->sector->special, 1) == 6
|
||||
&& thiscam->z < thiscam->subsector->sector->floorheight + 256*FRACUNIT
|
||||
&& FixedMul(z - thiscam->z, camspeed) < 0)
|
||||
#if 0
|
||||
|| player->kartstuff[k_pogospring] // SRB2Kart: don't follow while bouncing, experimental
|
||||
#endif
|
||||
)
|
||||
thiscam->momz = 0; // Don't go down a death pit
|
||||
else
|
||||
thiscam->momz = FixedMul(z - thiscam->z, camspeed);
|
||||
}
|
||||
thiscam->momx = x - thiscam->x;
|
||||
thiscam->momy = y - thiscam->y;
|
||||
thiscam->momz = FixedMul(z - thiscam->z, camspeed/2);
|
||||
}
|
||||
|
||||
thiscam->pan = pan;
|
||||
|
||||
// compute aming to look the viewed point
|
||||
f1 = viewpointx-thiscam->x;
|
||||
f2 = viewpointy-thiscam->y;
|
||||
|
@ -8778,6 +8659,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
angle = R_PointToAngle2(0, thiscam->z + thiscam->height, dist, mo->z + mo->height - P_GetPlayerHeight(player));
|
||||
else
|
||||
angle = R_PointToAngle2(0, thiscam->z, dist, mo->z + P_GetPlayerHeight(player));
|
||||
|
||||
if (player->playerstate != PST_DEAD && !(player->pflags & PF_NIGHTSMODE && player->exiting))
|
||||
angle += (focusaiming < ANGLE_180 ? focusaiming/2 : InvAngle(InvAngle(focusaiming)/2)); // overcomplicated version of '((signed)focusaiming)/2;'
|
||||
|
||||
|
@ -8788,40 +8670,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
thiscam->aiming -= (dist>>3);
|
||||
}
|
||||
|
||||
// Make player translucent if camera is too close (only in single player).
|
||||
/*if (!(multiplayer || netgame) && !splitscreen)
|
||||
{
|
||||
fixed_t vx = 0, vy = 0;
|
||||
if (player->awayviewtics) {
|
||||
vx = player->awayviewmobj->x;
|
||||
vy = player->awayviewmobj->y;
|
||||
}
|
||||
else
|
||||
{
|
||||
vx = thiscam->x;
|
||||
vy = thiscam->y;
|
||||
}
|
||||
|
||||
if (P_AproxDistance(vx - player->mo->x, vy - player->mo->y) < FixedMul(48*FRACUNIT, mo->scale))
|
||||
player->mo->flags2 |= MF2_SHADOW;
|
||||
else
|
||||
player->mo->flags2 &= ~MF2_SHADOW;
|
||||
}
|
||||
else
|
||||
player->mo->flags2 &= ~MF2_SHADOW;*/
|
||||
|
||||
/* if (!resetcalled && (player->pflags & PF_NIGHTSMODE && player->exiting))
|
||||
{
|
||||
// Don't let the camera match your movement.
|
||||
thiscam->momz = 0;
|
||||
|
||||
// Only let the camera go a little bit upwards.
|
||||
if (mo->eflags & MFE_VERTICALFLIP && thiscam->aiming < ANGLE_315 && thiscam->aiming > ANGLE_180)
|
||||
thiscam->aiming = ANGLE_315;
|
||||
else if (!(mo->eflags & MFE_VERTICALFLIP) && thiscam->aiming > ANGLE_45 && thiscam->aiming < ANGLE_180)
|
||||
thiscam->aiming = ANGLE_45;
|
||||
}
|
||||
else */if (!resetcalled && (player->playerstate == PST_DEAD || player->playerstate == PST_REBORN))
|
||||
if (!resetcalled && (player->playerstate == PST_DEAD || player->playerstate == PST_REBORN))
|
||||
{
|
||||
// Don't let the camera match your movement.
|
||||
thiscam->momz = 0;
|
||||
|
@ -8833,17 +8682,6 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
thiscam->aiming = ANGLE_22h;
|
||||
}
|
||||
|
||||
#if 0
|
||||
// SRB2Kart: keep camera the same distance away from the player, while maintaining its angle
|
||||
{
|
||||
fixed_t xlen = (thiscam->x+thiscam->momx) - (mo->x+mo->momx);
|
||||
fixed_t ylen = (thiscam->y+thiscam->momy) - (mo->y+mo->momy);
|
||||
fixed_t xydist = P_AproxDistance(xlen, ylen);
|
||||
thiscam->momx = FixedMul(dist, FixedDiv(xlen, xydist));
|
||||
thiscam->momy = FixedMul(dist, FixedDiv(ylen, xydist));
|
||||
}
|
||||
#endif
|
||||
|
||||
return (x == thiscam->x && y == thiscam->y && z == thiscam->z && angle == thiscam->aiming);
|
||||
}
|
||||
|
||||
|
@ -9043,7 +8881,7 @@ static void P_CalcPostImg(player_t *player)
|
|||
}
|
||||
#endif
|
||||
|
||||
if (mirrormode) // srb2kart
|
||||
if (encoremode) // srb2kart
|
||||
*type = postimg_mirror;
|
||||
}
|
||||
|
||||
|
@ -9450,7 +9288,7 @@ void P_PlayerThink(player_t *player)
|
|||
#if 1
|
||||
// "Blur" a bit when you have speed shoes and are going fast enough
|
||||
if ((player->powers[pw_super] || player->powers[pw_sneakers]
|
||||
|| player->kartstuff[k_driftboost] || player->kartstuff[k_sneakertimer]) && !player->kartstuff[k_invincibilitytimer] // SRB2kart
|
||||
|| player->kartstuff[k_driftboost] || player->kartstuff[k_sneakertimer] || player->kartstuff[k_startboost]) && !player->kartstuff[k_invincibilitytimer] // SRB2kart
|
||||
&& (player->speed + abs(player->mo->momz)) > FixedMul(20*FRACUNIT,player->mo->scale))
|
||||
{
|
||||
mobj_t *gmobj = P_SpawnGhostMobj(player->mo);
|
||||
|
@ -9599,6 +9437,7 @@ void P_PlayerThink(player_t *player)
|
|||
if (!(player->pflags & PF_NIGHTSMODE
|
||||
|| player->kartstuff[k_hyudorotimer] // SRB2kart - fixes Hyudoro not flashing when it should.
|
||||
|| player->kartstuff[k_growshrinktimer] > 0 // Grow doesn't flash either.
|
||||
|| player->kartstuff[k_respawn] // Respawn timer (for drop dash effect)
|
||||
|| (G_BattleGametype() && player->kartstuff[k_bumper] <= 0 && player->kartstuff[k_comebacktimer])
|
||||
|| leveltime < starttime)) // Level intro
|
||||
{
|
||||
|
@ -9886,17 +9725,14 @@ void P_PlayerAfterThink(player_t *player)
|
|||
{
|
||||
player->mo->angle = player->mo->tracer->angle;
|
||||
|
||||
if (!demoplayback || P_AnalogMove(player))
|
||||
{
|
||||
if (player == &players[consoleplayer])
|
||||
localangle = player->mo->angle;
|
||||
else if (player == &players[secondarydisplayplayer])
|
||||
localangle2 = player->mo->angle;
|
||||
else if (player == &players[thirddisplayplayer])
|
||||
localangle3 = player->mo->angle;
|
||||
else if (player == &players[fourthdisplayplayer])
|
||||
localangle4 = player->mo->angle;
|
||||
}
|
||||
if (player == &players[consoleplayer])
|
||||
localangle = player->mo->angle;
|
||||
else if (player == &players[secondarydisplayplayer])
|
||||
localangle2 = player->mo->angle;
|
||||
else if (player == &players[thirddisplayplayer])
|
||||
localangle3 = player->mo->angle;
|
||||
else if (player == &players[fourthdisplayplayer])
|
||||
localangle4 = player->mo->angle;
|
||||
}
|
||||
|
||||
if (P_AproxDistance(player->mo->x - player->mo->tracer->x, player->mo->y - player->mo->tracer->y) > player->mo->radius)
|
||||
|
@ -9963,17 +9799,14 @@ void P_PlayerAfterThink(player_t *player)
|
|||
player->mo->tracer->target->health += cmd->sidemove;
|
||||
player->mo->angle += cmd->sidemove<<ANGLETOFINESHIFT; // 2048 --> ANGLE_MAX
|
||||
|
||||
if (!demoplayback || P_AnalogMove(player))
|
||||
{
|
||||
if (player == &players[consoleplayer])
|
||||
localangle = player->mo->angle; // Adjust the local control angle.
|
||||
else if (player == &players[secondarydisplayplayer])
|
||||
localangle2 = player->mo->angle;
|
||||
else if (player == &players[thirddisplayplayer])
|
||||
localangle3 = player->mo->angle;
|
||||
else if (player == &players[fourthdisplayplayer])
|
||||
localangle4 = player->mo->angle;
|
||||
}
|
||||
if (player == &players[consoleplayer])
|
||||
localangle = player->mo->angle; // Adjust the local control angle.
|
||||
else if (player == &players[secondarydisplayplayer])
|
||||
localangle2 = player->mo->angle;
|
||||
else if (player == &players[thirddisplayplayer])
|
||||
localangle3 = player->mo->angle;
|
||||
else if (player == &players[fourthdisplayplayer])
|
||||
localangle4 = player->mo->angle;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
32
src/r_bsp.c
32
src/r_bsp.c
|
@ -37,6 +37,26 @@ drawseg_t *ds_p = NULL;
|
|||
// indicates doors closed wrt automap bugfix:
|
||||
INT32 doorclosed;
|
||||
|
||||
static boolean R_NoEncore(sector_t *sector, boolean ceiling)
|
||||
{
|
||||
boolean invertencore = (GETSECSPECIAL(sector->special, 2) == 15);
|
||||
#if 0 // perfect implementation
|
||||
INT32 val = GETSECSPECIAL(sector->special, 3);
|
||||
if (val != 1 && val != 3 // spring panel
|
||||
#else // optimised, see #define GETSECSPECIAL(i,j) ((i >> ((j-1)*4))&15)
|
||||
if ((!(sector->special & (1<<8)) || (sector->special & ((4|8)<<8))) // spring panel
|
||||
#endif
|
||||
&& GETSECSPECIAL(sector->special, 4) != 6) // sneaker panel
|
||||
return invertencore;
|
||||
|
||||
if (invertencore)
|
||||
return false;
|
||||
|
||||
if (ceiling)
|
||||
return ((boolean)(sector->flags & SF_FLIPSPECIAL_CEILING));
|
||||
return ((boolean)(sector->flags & SF_FLIPSPECIAL_FLOOR));
|
||||
}
|
||||
|
||||
//
|
||||
// R_ClearDrawSegs
|
||||
//
|
||||
|
@ -935,7 +955,7 @@ static void R_Subsector(size_t num, UINT8 viewnumber)
|
|||
#ifdef ESLOPE
|
||||
, frontsector->f_slope
|
||||
#endif
|
||||
);
|
||||
, R_NoEncore(frontsector, false));
|
||||
}
|
||||
else
|
||||
floorplane = NULL;
|
||||
|
@ -957,7 +977,7 @@ static void R_Subsector(size_t num, UINT8 viewnumber)
|
|||
#ifdef ESLOPE
|
||||
, frontsector->c_slope
|
||||
#endif
|
||||
);
|
||||
, R_NoEncore(frontsector, true));
|
||||
}
|
||||
else
|
||||
ceilingplane = NULL;
|
||||
|
@ -1018,7 +1038,7 @@ static void R_Subsector(size_t num, UINT8 viewnumber)
|
|||
#ifdef ESLOPE
|
||||
, *rover->b_slope
|
||||
#endif
|
||||
);
|
||||
, R_NoEncore(rover->master->frontsector, true));
|
||||
|
||||
#ifdef ESLOPE
|
||||
ffloor[numffloors].slope = *rover->b_slope;
|
||||
|
@ -1064,7 +1084,7 @@ static void R_Subsector(size_t num, UINT8 viewnumber)
|
|||
#ifdef ESLOPE
|
||||
, *rover->t_slope
|
||||
#endif
|
||||
);
|
||||
, R_NoEncore(rover->master->frontsector, false));
|
||||
|
||||
#ifdef ESLOPE
|
||||
ffloor[numffloors].slope = *rover->t_slope;
|
||||
|
@ -1133,7 +1153,7 @@ static void R_Subsector(size_t num, UINT8 viewnumber)
|
|||
#ifdef ESLOPE
|
||||
, NULL // will ffloors be slopable eventually?
|
||||
#endif
|
||||
);
|
||||
, R_NoEncore(polysec, false));
|
||||
|
||||
ffloor[numffloors].height = polysec->floorheight;
|
||||
ffloor[numffloors].polyobj = po;
|
||||
|
@ -1179,7 +1199,7 @@ static void R_Subsector(size_t num, UINT8 viewnumber)
|
|||
#ifdef ESLOPE
|
||||
, NULL // will ffloors be slopable eventually?
|
||||
#endif
|
||||
);
|
||||
, R_NoEncore(polysec, true));
|
||||
|
||||
ffloor[numffloors].polyobj = po;
|
||||
ffloor[numffloors].height = polysec->ceilingheight;
|
||||
|
|
143
src/r_data.c
143
src/r_data.c
|
@ -112,6 +112,10 @@ INT32 *texturetranslation;
|
|||
sprcache_t *spritecachedinfo;
|
||||
|
||||
lighttable_t *colormaps;
|
||||
UINT8 *encoremap;
|
||||
#ifdef HASINVERT
|
||||
UINT8 invertmap[256];
|
||||
#endif
|
||||
|
||||
// for debugging/info purposes
|
||||
static size_t flatmemory, spritememory, texturememory;
|
||||
|
@ -932,7 +936,7 @@ static inline lumpnum_t R_CheckNumForNameList(const char *name, lumplist_t *list
|
|||
return LUMPERROR;
|
||||
}
|
||||
|
||||
static lumplist_t *colormaplumps = NULL; ///\todo free leak
|
||||
/*static lumplist_t *colormaplumps = NULL; ///\todo free leak
|
||||
static size_t numcolormaplumps = 0;
|
||||
|
||||
static void R_InitExtraColormaps(void)
|
||||
|
@ -966,7 +970,7 @@ static void R_InitExtraColormaps(void)
|
|||
numcolormaplumps++;
|
||||
}
|
||||
CONS_Printf(M_GetText("Number of Extra Colormaps: %s\n"), sizeu1(numcolormaplumps));
|
||||
}
|
||||
}*/
|
||||
|
||||
// 12/14/14 -- only take flats in F_START/F_END
|
||||
lumpnum_t R_GetFlatNumForName(const char *name)
|
||||
|
@ -1010,15 +1014,20 @@ static void R_InitColormaps(void)
|
|||
|
||||
// Load in the light tables
|
||||
lump = W_GetNumForName("COLORMAP");
|
||||
colormaps = Z_MallocAlign(W_LumpLength (lump), PU_STATIC, NULL, 8);
|
||||
//Z_MallocAlign(W_LumpLength (lump), PU_STATIC, NULL, 8);
|
||||
colormaps = Z_MallocAlign((256 * 64), PU_STATIC, NULL, 8);
|
||||
W_ReadLump(lump, colormaps);
|
||||
// no need to init encoremap at this stage
|
||||
|
||||
// Init Boom colormaps.
|
||||
R_ClearColormaps();
|
||||
R_InitExtraColormaps();
|
||||
//R_InitExtraColormaps();
|
||||
#ifdef HASINVERT
|
||||
R_MakeInvertmap(); // this isn't the BEST place to do it the first time, but whatever
|
||||
#endif
|
||||
}
|
||||
|
||||
void R_ReInitColormaps(UINT16 num)
|
||||
void R_ReInitColormaps(UINT16 num, lumpnum_t newencoremap)
|
||||
{
|
||||
char colormap[9] = "COLORMAP";
|
||||
lumpnum_t lump;
|
||||
|
@ -1032,6 +1041,30 @@ void R_ReInitColormaps(UINT16 num)
|
|||
lump = W_GetNumForName("COLORMAP");
|
||||
W_ReadLump(lump, colormaps);
|
||||
|
||||
// Encore mode.
|
||||
if (newencoremap != LUMPERROR)
|
||||
{
|
||||
lighttable_t *colormap_p, *colormap_p2;
|
||||
size_t p, i;
|
||||
|
||||
encoremap = Z_MallocAlign(256 + 10, PU_LEVEL, NULL, 8);
|
||||
W_ReadLump(newencoremap, encoremap);
|
||||
colormap_p = colormap_p2 = colormaps;
|
||||
colormap_p += (256 * 32);
|
||||
|
||||
for (p = 0; p < 32; p++)
|
||||
{
|
||||
for (i = 0; i < 256; i++)
|
||||
{
|
||||
*colormap_p = colormap_p2[encoremap[i]];
|
||||
colormap_p++;
|
||||
}
|
||||
colormap_p2 += 256;
|
||||
}
|
||||
}
|
||||
else
|
||||
encoremap = NULL;
|
||||
|
||||
// Init Boom colormaps.
|
||||
R_ClearColormaps();
|
||||
}
|
||||
|
@ -1060,7 +1093,7 @@ void R_ClearColormaps(void)
|
|||
memset(extra_colormaps, 0, sizeof (extra_colormaps));
|
||||
}
|
||||
|
||||
INT32 R_ColormapNumForName(char *name)
|
||||
/*INT32 R_ColormapNumForName(char *name)
|
||||
{
|
||||
lumpnum_t lump, i;
|
||||
|
||||
|
@ -1092,7 +1125,7 @@ INT32 R_ColormapNumForName(char *name)
|
|||
|
||||
num_extra_colormaps++;
|
||||
return (INT32)num_extra_colormaps - 1;
|
||||
}
|
||||
}*/
|
||||
|
||||
//
|
||||
// R_CreateColormap
|
||||
|
@ -1121,10 +1154,20 @@ INT32 R_CreateColormap(char *p1, char *p2, char *p3)
|
|||
if (p1[0] == '#')
|
||||
{
|
||||
cr = ((HEX2INT(p1[1]) * 16) + HEX2INT(p1[2]));
|
||||
cmaskr = cr;
|
||||
cg = ((HEX2INT(p1[3]) * 16) + HEX2INT(p1[4]));
|
||||
cmaskg = cg;
|
||||
cb = ((HEX2INT(p1[5]) * 16) + HEX2INT(p1[6]));
|
||||
|
||||
if (encoremap)
|
||||
{
|
||||
i = encoremap[NearestColor((UINT8)cr, (UINT8)cg, (UINT8)cb)];
|
||||
//CONS_Printf("R_CreateColormap: encoremap[%d] = %d\n", i, encoremap[i]); -- moved encoremap upwards for optimisation
|
||||
cr = pLocalPalette[i].s.red;
|
||||
cg = pLocalPalette[i].s.green;
|
||||
cb = pLocalPalette[i].s.blue;
|
||||
}
|
||||
|
||||
cmaskr = cr;
|
||||
cmaskg = cg;
|
||||
cmaskb = cb;
|
||||
// Create a rough approximation of the color (a 16 bit color)
|
||||
maskcolor = ((cb) >> 3) + (((cg) >> 2) << 5) + (((cr) >> 3) << 11);
|
||||
|
@ -1167,9 +1210,21 @@ INT32 R_CreateColormap(char *p1, char *p2, char *p3)
|
|||
|
||||
if (p3[0] == '#')
|
||||
{
|
||||
cdestr = cr = ((HEX2INT(p3[1]) * 16) + HEX2INT(p3[2]));
|
||||
cdestg = cg = ((HEX2INT(p3[3]) * 16) + HEX2INT(p3[4]));
|
||||
cdestb = cb = ((HEX2INT(p3[5]) * 16) + HEX2INT(p3[6]));
|
||||
cr = ((HEX2INT(p3[1]) * 16) + HEX2INT(p3[2]));
|
||||
cg = ((HEX2INT(p3[3]) * 16) + HEX2INT(p3[4]));
|
||||
cb = ((HEX2INT(p3[5]) * 16) + HEX2INT(p3[6]));
|
||||
|
||||
if (encoremap)
|
||||
{
|
||||
i = encoremap[NearestColor((UINT8)cr, (UINT8)cg, (UINT8)cb)];
|
||||
cr = pLocalPalette[i].s.red;
|
||||
cg = pLocalPalette[i].s.green;
|
||||
cb = pLocalPalette[i].s.blue;
|
||||
}
|
||||
|
||||
cdestr = cr;
|
||||
cdestg = cg;
|
||||
cdestb = cb;
|
||||
fadecolor = (((cb) >> 3) + (((cg) >> 2) << 5) + (((cr) >> 3) << 11));
|
||||
}
|
||||
else
|
||||
|
@ -1252,15 +1307,25 @@ void R_MakeColormaps(void)
|
|||
colormapFixingArray[i][2]);
|
||||
}
|
||||
|
||||
#ifdef HASINVERT
|
||||
void R_MakeInvertmap(void)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < 256; i++)
|
||||
invertmap[i] = NearestColor(256 - pLocalPalette[i].s.red, 256 - pLocalPalette[i].s.green, 256 - pLocalPalette[i].s.blue);
|
||||
}
|
||||
#endif
|
||||
|
||||
void R_CreateColormap2(char *p1, char *p2, char *p3)
|
||||
{
|
||||
double cmaskr, cmaskg, cmaskb, cdestr, cdestg, cdestb;
|
||||
double r, g, b, cbrightness;
|
||||
double maskamt = 0, othermask = 0;
|
||||
int mask, p, fog = 0;
|
||||
INT32 mask, p, fog = 0;
|
||||
size_t mapnum = num_extra_colormaps;
|
||||
size_t i;
|
||||
char *colormap_p;
|
||||
lighttable_t *colormap_p, *colormap_p2;
|
||||
UINT32 cr, cg, cb, maskcolor, fadecolor;
|
||||
UINT32 fadestart = 0, fadeend = 31, fadedist = 31;
|
||||
|
||||
|
@ -1268,10 +1333,19 @@ void R_CreateColormap2(char *p1, char *p2, char *p3)
|
|||
if (p1[0] == '#')
|
||||
{
|
||||
cr = ((HEX2INT(p1[1]) * 16) + HEX2INT(p1[2]));
|
||||
cmaskr = cr;
|
||||
cg = ((HEX2INT(p1[3]) * 16) + HEX2INT(p1[4]));
|
||||
cmaskg = cg;
|
||||
cb = ((HEX2INT(p1[5]) * 16) + HEX2INT(p1[6]));
|
||||
|
||||
if (encoremap)
|
||||
{
|
||||
i = encoremap[NearestColor((UINT8)cr, (UINT8)cg, (UINT8)cb)];
|
||||
cr = pLocalPalette[i].s.red;
|
||||
cg = pLocalPalette[i].s.green;
|
||||
cb = pLocalPalette[i].s.blue;
|
||||
}
|
||||
|
||||
cmaskr = cr;
|
||||
cmaskg = cg;
|
||||
cmaskb = cb;
|
||||
// Create a rough approximation of the color (a 16 bit color)
|
||||
maskcolor = ((cb) >> 3) + (((cg) >> 2) << 5) + (((cr) >> 3) << 11);
|
||||
|
@ -1314,9 +1388,21 @@ void R_CreateColormap2(char *p1, char *p2, char *p3)
|
|||
|
||||
if (p3[0] == '#')
|
||||
{
|
||||
cdestr = cr = ((HEX2INT(p3[1]) * 16) + HEX2INT(p3[2]));
|
||||
cdestg = cg = ((HEX2INT(p3[3]) * 16) + HEX2INT(p3[4]));
|
||||
cdestb = cb = ((HEX2INT(p3[5]) * 16) + HEX2INT(p3[6]));
|
||||
cr = ((HEX2INT(p3[1]) * 16) + HEX2INT(p3[2]));
|
||||
cg = ((HEX2INT(p3[3]) * 16) + HEX2INT(p3[4]));
|
||||
cb = ((HEX2INT(p3[5]) * 16) + HEX2INT(p3[6]));
|
||||
|
||||
if (encoremap)
|
||||
{
|
||||
i = encoremap[NearestColor((UINT8)cr, (UINT8)cg, (UINT8)cb)];
|
||||
cr = pLocalPalette[i].s.red;
|
||||
cg = pLocalPalette[i].s.green;
|
||||
cb = pLocalPalette[i].s.blue;
|
||||
}
|
||||
|
||||
cdestr = cr;
|
||||
cdestg = cg;
|
||||
cdestb = cb;
|
||||
fadecolor = (((cb) >> 3) + (((cg) >> 2) << 5) + (((cr) >> 3) << 11));
|
||||
}
|
||||
else
|
||||
|
@ -1383,10 +1469,10 @@ void R_CreateColormap2(char *p1, char *p2, char *p3)
|
|||
#define ABS2(x) ((x) < 0 ? -(x) : (x))
|
||||
if (rendermode == render_soft)
|
||||
{
|
||||
colormap_p = Z_MallocAlign((256 * 34) + 10, PU_LEVEL, NULL, 8);
|
||||
colormap_p = Z_MallocAlign((256 * (encoremap ? 64 : 32)) + 10, PU_LEVEL, NULL, 8);
|
||||
extra_colormaps[mapnum].colormap = (UINT8 *)colormap_p;
|
||||
|
||||
for (p = 0; p < 34; p++)
|
||||
for (p = 0; p < 32; p++)
|
||||
{
|
||||
for (i = 0; i < 256; i++)
|
||||
{
|
||||
|
@ -1414,6 +1500,21 @@ void R_CreateColormap2(char *p1, char *p2, char *p3)
|
|||
map[i][2] = cdestb;
|
||||
}
|
||||
}
|
||||
|
||||
if (!encoremap)
|
||||
return;
|
||||
|
||||
colormap_p2 = extra_colormaps[mapnum].colormap;
|
||||
|
||||
for (p = 0; p < 32; p++)
|
||||
{
|
||||
for (i = 0; i < 256; i++)
|
||||
{
|
||||
*colormap_p = colormap_p2[encoremap[i]];
|
||||
colormap_p++;
|
||||
}
|
||||
colormap_p2 += 256;
|
||||
}
|
||||
}
|
||||
#undef ABS2
|
||||
|
||||
|
|
|
@ -89,12 +89,15 @@ void R_ClearTextureNumCache(boolean btell);
|
|||
INT32 R_TextureNumForName(const char *name);
|
||||
INT32 R_CheckTextureNumForName(const char *name);
|
||||
|
||||
void R_ReInitColormaps(UINT16 num);
|
||||
void R_ReInitColormaps(UINT16 num, lumpnum_t newencoremap);
|
||||
void R_ClearColormaps(void);
|
||||
INT32 R_ColormapNumForName(char *name);
|
||||
INT32 R_CreateColormap(char *p1, char *p2, char *p3);
|
||||
void R_CreateColormap2(char *p1, char *p2, char *p3);
|
||||
void R_MakeColormaps(void);
|
||||
#ifdef HASINVERT
|
||||
void R_MakeInvertmap(void);
|
||||
#endif
|
||||
const char *R_ColormapNameForNum(INT32 num);
|
||||
|
||||
extern INT32 numtextures;
|
||||
|
|
|
@ -1375,6 +1375,8 @@ void R_DrawColumnShadowed_8(void)
|
|||
if (height <= dc_yl)
|
||||
{
|
||||
dc_colormap = dc_lightlist[i].rcolormap;
|
||||
if (encoremap)
|
||||
dc_colormap += (256*32);
|
||||
if (solid && dc_yl < bheight)
|
||||
dc_yl = bheight;
|
||||
continue;
|
||||
|
@ -1391,6 +1393,8 @@ void R_DrawColumnShadowed_8(void)
|
|||
dc_yl = dc_yh + 1;
|
||||
|
||||
dc_colormap = dc_lightlist[i].rcolormap;
|
||||
if (encoremap)
|
||||
dc_colormap += (256*32);
|
||||
}
|
||||
dc_yh = realyh;
|
||||
if (dc_yl <= realyh)
|
||||
|
|
|
@ -338,6 +338,8 @@ void R_MapPlane(INT32 y, INT32 x1, INT32 x2)
|
|||
else
|
||||
#endif
|
||||
ds_colormap = planezlight[pindex];
|
||||
if (encoremap && !currentplane->noencore)
|
||||
ds_colormap += (256*32);
|
||||
|
||||
if (currentplane->extra_colormap)
|
||||
ds_colormap = currentplane->extra_colormap->colormap + (ds_colormap - colormaps);
|
||||
|
@ -440,7 +442,7 @@ visplane_t *R_FindPlane(fixed_t height, INT32 picnum, INT32 lightlevel,
|
|||
#ifdef ESLOPE
|
||||
, pslope_t *slope
|
||||
#endif
|
||||
)
|
||||
, boolean noencore)
|
||||
{
|
||||
visplane_t *check;
|
||||
unsigned hash;
|
||||
|
@ -489,7 +491,7 @@ visplane_t *R_FindPlane(fixed_t height, INT32 picnum, INT32 lightlevel,
|
|||
#ifdef ESLOPE
|
||||
&& check->slope == slope
|
||||
#endif
|
||||
)
|
||||
&& check->noencore == noencore)
|
||||
{
|
||||
return check;
|
||||
}
|
||||
|
@ -517,6 +519,7 @@ visplane_t *R_FindPlane(fixed_t height, INT32 picnum, INT32 lightlevel,
|
|||
#ifdef ESLOPE
|
||||
check->slope = slope;
|
||||
#endif
|
||||
check->noencore = noencore;
|
||||
|
||||
memset(check->top, 0xff, sizeof (check->top));
|
||||
memset(check->bottom, 0x00, sizeof (check->bottom));
|
||||
|
@ -589,6 +592,7 @@ visplane_t *R_CheckPlane(visplane_t *pl, INT32 start, INT32 stop)
|
|||
#ifdef ESLOPE
|
||||
new_pl->slope = pl->slope;
|
||||
#endif
|
||||
new_pl->noencore = pl->noencore;
|
||||
pl = new_pl;
|
||||
pl->minx = start;
|
||||
pl->maxx = stop;
|
||||
|
@ -706,6 +710,8 @@ void R_DrawPlanes(void)
|
|||
// Because of this hack, sky is not affected
|
||||
// by INVUL inverse mapping.
|
||||
dc_colormap = colormaps;
|
||||
if (encoremap)
|
||||
dc_colormap += (256*32);
|
||||
dc_texturemid = skytexturemid;
|
||||
dc_texheight = textureheight[skytexture]
|
||||
>>FRACBITS;
|
||||
|
@ -720,7 +726,7 @@ void R_DrawPlanes(void)
|
|||
dc_iscale = FixedMul(skyscale, FINECOSINE(xtoviewangle[x]>>ANGLETOFINESHIFT));
|
||||
dc_x = x;
|
||||
dc_source =
|
||||
R_GetColumn(skytexture,
|
||||
R_GetColumn(texturetranslation[skytexture],
|
||||
angle);
|
||||
wallcolfunc();
|
||||
}
|
||||
|
|
|
@ -65,6 +65,8 @@ typedef struct visplane_s
|
|||
#ifdef ESLOPE
|
||||
pslope_t *slope;
|
||||
#endif
|
||||
|
||||
boolean noencore;
|
||||
} visplane_t;
|
||||
|
||||
extern visplane_t *floorplane;
|
||||
|
@ -103,7 +105,7 @@ visplane_t *R_FindPlane(fixed_t height, INT32 picnum, INT32 lightlevel, fixed_t
|
|||
#ifdef ESLOPE
|
||||
, pslope_t *slope
|
||||
#endif
|
||||
);
|
||||
, boolean noencore);
|
||||
visplane_t *R_CheckPlane(visplane_t *pl, INT32 start, INT32 stop);
|
||||
void R_ExpandPlane(visplane_t *pl, INT32 start, INT32 stop);
|
||||
void R_PlaneBounds(visplane_t *plane);
|
||||
|
|
20
src/r_segs.c
20
src/r_segs.c
|
@ -202,6 +202,8 @@ static void R_DrawWallSplats(void)
|
|||
if (pindex >= MAXLIGHTSCALE)
|
||||
pindex = MAXLIGHTSCALE - 1;
|
||||
dc_colormap = walllights[pindex];
|
||||
if (encoremap && !(seg->linedef->flags & ML_TFERLINE))
|
||||
dc_colormap += (256*32);
|
||||
|
||||
if (frontsector->extra_colormap)
|
||||
dc_colormap = frontsector->extra_colormap->colormap + (dc_colormap - colormaps);
|
||||
|
@ -596,6 +598,8 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
|||
if (height <= windowtop)
|
||||
{
|
||||
dc_colormap = rlight->rcolormap;
|
||||
if (encoremap && !(ldef->flags & ML_TFERLINE))
|
||||
dc_colormap += (256*32);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -615,6 +619,8 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
|||
colfunc_2s(col);
|
||||
windowtop = windowbottom + 1;
|
||||
dc_colormap = rlight->rcolormap;
|
||||
if (encoremap && !(ldef->flags & ML_TFERLINE))
|
||||
dc_colormap += (256*32);
|
||||
}
|
||||
windowbottom = realbot;
|
||||
if (windowtop < windowbottom)
|
||||
|
@ -631,6 +637,8 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
|||
pindex = MAXLIGHTSCALE - 1;
|
||||
|
||||
dc_colormap = walllights[pindex];
|
||||
if (encoremap && !(ldef->flags & ML_TFERLINE))
|
||||
dc_colormap += (256*32);
|
||||
|
||||
if (frontsector->extra_colormap)
|
||||
dc_colormap = frontsector->extra_colormap->colormap + (dc_colormap - colormaps);
|
||||
|
@ -1210,7 +1218,11 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
if (height <= windowtop)
|
||||
{
|
||||
if (lighteffect)
|
||||
{
|
||||
dc_colormap = rlight->rcolormap;
|
||||
if (encoremap && !(curline->linedef->flags & ML_TFERLINE))
|
||||
dc_colormap += (256*32);
|
||||
}
|
||||
if (solid && windowtop < bheight)
|
||||
windowtop = bheight;
|
||||
continue;
|
||||
|
@ -1236,7 +1248,11 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
else
|
||||
windowtop = windowbottom + 1;
|
||||
if (lighteffect)
|
||||
{
|
||||
dc_colormap = rlight->rcolormap;
|
||||
if (encoremap && !(curline->linedef->flags & ML_TFERLINE))
|
||||
dc_colormap += (256*32);
|
||||
}
|
||||
}
|
||||
windowbottom = sprbotscreen;
|
||||
if (windowtop < windowbottom)
|
||||
|
@ -1253,6 +1269,8 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
pindex = MAXLIGHTSCALE - 1;
|
||||
|
||||
dc_colormap = walllights[pindex];
|
||||
if (encoremap && !(curline->linedef->flags & ML_TFERLINE))
|
||||
dc_colormap += (256*32);
|
||||
if (frontsector->extra_colormap)
|
||||
dc_colormap = frontsector->extra_colormap->colormap + (dc_colormap - colormaps);
|
||||
if (pfloor->flags & FF_FOG && pfloor->master->frontsector->extra_colormap)
|
||||
|
@ -1483,6 +1501,8 @@ static void R_RenderSegLoop (void)
|
|||
pindex = MAXLIGHTSCALE-1;
|
||||
|
||||
dc_colormap = walllights[pindex];
|
||||
if (encoremap && !(curline->linedef->flags & ML_TFERLINE))
|
||||
dc_colormap += (256*32);
|
||||
dc_x = rw_x;
|
||||
dc_iscale = 0xffffffffu / (unsigned)rw_scale;
|
||||
|
||||
|
|
|
@ -38,6 +38,10 @@ typedef struct
|
|||
extern sprcache_t *spritecachedinfo;
|
||||
|
||||
extern lighttable_t *colormaps;
|
||||
extern UINT8 *encoremap;
|
||||
#ifdef HASINVERT
|
||||
extern UINT8 invertmap[256];
|
||||
#endif
|
||||
|
||||
// Boom colormaps.
|
||||
// Had to put a limit on colormaps :(
|
||||
|
|
|
@ -873,6 +873,9 @@ static void R_DrawVisSprite(vissprite_t *vis)
|
|||
if (!dc_colormap)
|
||||
dc_colormap = colormaps;
|
||||
|
||||
if (encoremap && !vis->mobj->color && !(vis->mobj->flags & MF_DONTENCOREMAP))
|
||||
dc_colormap += (256*32);
|
||||
|
||||
dc_texturemid = vis->texturemid;
|
||||
dc_texheight = 0;
|
||||
|
||||
|
@ -973,6 +976,8 @@ static void R_DrawPrecipitationVisSprite(vissprite_t *vis)
|
|||
}
|
||||
|
||||
dc_colormap = colormaps;
|
||||
if (encoremap)
|
||||
dc_colormap += (256*32);
|
||||
|
||||
dc_iscale = FixedDiv(FRACUNIT, vis->scale);
|
||||
dc_texturemid = vis->texturemid;
|
||||
|
|
|
@ -391,7 +391,7 @@ void S_StartSoundAtVolume(const void *origin_p, sfxenum_t sfx_id, INT32 volume)
|
|||
{
|
||||
INT32 sep, pitch, priority, cnum;
|
||||
sfxinfo_t *sfx;
|
||||
const boolean reverse = (stereoreverse.value ^ mirrormode);
|
||||
const boolean reverse = (stereoreverse.value ^ encoremode);
|
||||
const mobj_t *origin = (const mobj_t *)origin_p;
|
||||
|
||||
listener_t listener = {0,0,0,0};
|
||||
|
@ -1198,7 +1198,7 @@ INT32 S_AdjustSoundParams(const mobj_t *listener, const mobj_t *source, INT32 *v
|
|||
|
||||
listener_t listensource;
|
||||
|
||||
const boolean reverse = (stereoreverse.value ^ mirrormode);
|
||||
const boolean reverse = (stereoreverse.value ^ encoremode);
|
||||
|
||||
(void)pitch;
|
||||
if (!listener)
|
||||
|
|
|
@ -1,213 +1,100 @@
|
|||
/* XPM */
|
||||
static const char *SDL_icon_xpm[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"32 32 175 2 ",
|
||||
" c None",
|
||||
". c #2E2E2E",
|
||||
"X c #3C3C3C",
|
||||
"o c #493939",
|
||||
"O c #4E473F",
|
||||
"+ c #161658",
|
||||
"@ c #131369",
|
||||
"# c #06067B",
|
||||
"$ c #111173",
|
||||
"% c #16167F",
|
||||
"& c #252567",
|
||||
"* c #372B7C",
|
||||
"= c #3D3679",
|
||||
"- c #41414A",
|
||||
"; c #575655",
|
||||
": c #6A5841",
|
||||
"> c #5B4B72",
|
||||
", c #616160",
|
||||
"< c #7B7B7B",
|
||||
"1 c #906E49",
|
||||
"2 c #89685D",
|
||||
"3 c #A67B4A",
|
||||
"4 c #AA7F50",
|
||||
"5 c #9B7560",
|
||||
"6 c #856C78",
|
||||
"7 c #997B7D",
|
||||
"8 c #B48552",
|
||||
"9 c #BA8A55",
|
||||
"0 c #A48665",
|
||||
"q c #B98F67",
|
||||
"w c #B9946A",
|
||||
"e c #B7937A",
|
||||
"r c #C8955C",
|
||||
"t c #CA9966",
|
||||
"y c #DAA469",
|
||||
"u c #C9A37B",
|
||||
"i c #D7AB7B",
|
||||
"p c #DFB07D",
|
||||
"a c #EBAE6A",
|
||||
"s c #E5B27A",
|
||||
"d c #F1B779",
|
||||
"f c #0A0A83",
|
||||
"g c #05058B",
|
||||
"h c #060687",
|
||||
"j c #101089",
|
||||
"k c #131382",
|
||||
"l c #040494",
|
||||
"z c #02029D",
|
||||
"x c #0C0B9C",
|
||||
"c c #120F9E",
|
||||
"v c #19199B",
|
||||
"b c #382D84",
|
||||
"n c #39398D",
|
||||
"m c #222296",
|
||||
"M c #0101A6",
|
||||
"N c #0A0AA2",
|
||||
"B c #0202AC",
|
||||
"V c #1919A2",
|
||||
"C c #1616AD",
|
||||
"Z c #0000B5",
|
||||
"A c #0202BC",
|
||||
"S c #0C0CB6",
|
||||
"D c #1313B3",
|
||||
"F c #1011BD",
|
||||
"G c #1B1BBE",
|
||||
"H c #2B2BAC",
|
||||
"J c #3737A1",
|
||||
"K c #2A26BE",
|
||||
"L c #2A29B4",
|
||||
"P c #3B3BB8",
|
||||
"I c #48478B",
|
||||
"U c #57578A",
|
||||
"Y c #4A499A",
|
||||
"T c #524F95",
|
||||
"R c #565399",
|
||||
"E c #4C4CA8",
|
||||
"W c #524DA7",
|
||||
"Q c #5353A4",
|
||||
"! c #5555A9",
|
||||
"~ c #5555B4",
|
||||
"^ c #5656B7",
|
||||
"/ c #6464A6",
|
||||
"( c #6F67B5",
|
||||
") c #0404C3",
|
||||
"_ c #0707CA",
|
||||
"` c #1414CB",
|
||||
"' c #1A1AC6",
|
||||
"] c #0A0AD3",
|
||||
"[ c #0D0DDC",
|
||||
"{ c #1A1AD4",
|
||||
"} c #1010DF",
|
||||
"| c #1E1EDE",
|
||||
" . c #1817DE",
|
||||
".. c #221FCA",
|
||||
"X. c #2B2BCC",
|
||||
"o. c #2727C9",
|
||||
"O. c #3434C3",
|
||||
"+. c #3434D4",
|
||||
"@. c #0F0FE2",
|
||||
"#. c #1313E5",
|
||||
"$. c #1515ED",
|
||||
"%. c #1B1BEA",
|
||||
"&. c #1C1CE4",
|
||||
"*. c #1515F4",
|
||||
"=. c #1818F3",
|
||||
"-. c #1717FD",
|
||||
";. c #1818FF",
|
||||
":. c #2B2BE9",
|
||||
">. c #2424FF",
|
||||
",. c #2A2AFF",
|
||||
"<. c #2222F1",
|
||||
"1. c #3737FF",
|
||||
"2. c #5D5DC3",
|
||||
"3. c #5F5FC9",
|
||||
"4. c #5655C2",
|
||||
"5. c #4747D1",
|
||||
"6. c #5B5BD4",
|
||||
"7. c #6565C8",
|
||||
"8. c #6363DA",
|
||||
"9. c #4545FF",
|
||||
"0. c #4D4DFC",
|
||||
"q. c #5454FF",
|
||||
"w. c #5959FF",
|
||||
"e. c #6969E5",
|
||||
"r. c #6B6CEA",
|
||||
"t. c #6666E7",
|
||||
"y. c #6B6BFE",
|
||||
"u. c #6767F8",
|
||||
"i. c #7070F6",
|
||||
"p. c #7373FF",
|
||||
"a. c #7C7CFF",
|
||||
"s. c #91918F",
|
||||
"d. c #8F9090",
|
||||
"f. c #979797",
|
||||
"g. c #9C9C9C",
|
||||
"h. c #8585A1",
|
||||
"j. c #9C9CA7",
|
||||
"k. c #9292B6",
|
||||
"l. c #A4A4A4",
|
||||
"z. c #BDB2A4",
|
||||
"x. c #A4A4B1",
|
||||
"c. c #BFBFBD",
|
||||
"v. c #BABAB7",
|
||||
"b. c #C8AA87",
|
||||
"n. c #DAAE82",
|
||||
"m. c #DBB081",
|
||||
"M. c #EBBA85",
|
||||
"N. c #F3BF84",
|
||||
"B. c #F2BE88",
|
||||
"V. c #C2B3A3",
|
||||
"C. c #FBC386",
|
||||
"Z. c #FCC68C",
|
||||
"A. c #FFC88F",
|
||||
"S. c #F4C387",
|
||||
"D. c #FFC990",
|
||||
"F. c #C3C1BF",
|
||||
"G. c #8F8FCB",
|
||||
"H. c #BDBDC2",
|
||||
"J. c #BDBDD1",
|
||||
"K. c #8888F9",
|
||||
"L. c #A4A4FB",
|
||||
"P. c #CDCDCC",
|
||||
"I. c #CECAC6",
|
||||
"U. c #D3CFCA",
|
||||
"Y. c #D3D0CC",
|
||||
"T. c #C0C0D5",
|
||||
"R. c #D6D5D4",
|
||||
"E. c #D7D7DD",
|
||||
"W. c #E1E1DF",
|
||||
"Q. c #DEDEE1",
|
||||
"!. c #E4E4E4",
|
||||
"~. c #E8E8E8",
|
||||
"^. c #F0F0EE",
|
||||
"/. c #F5F5F2",
|
||||
"(. c #FFFFFF",
|
||||
/* pixels */
|
||||
"64 64 32 1",
|
||||
" c None",
|
||||
". c #E7E7E7",
|
||||
"+ c #DFDFDF",
|
||||
"@ c #AFAFAF",
|
||||
"# c #979797",
|
||||
"$ c #8F8F8F",
|
||||
"% c #B7B7B7",
|
||||
"& c #F7F7F7",
|
||||
"* c #D7D7D7",
|
||||
"= c #4F4F4F",
|
||||
"- c #0F0F0F",
|
||||
"; c #070707",
|
||||
"> c #575757",
|
||||
", c #C7C7C7",
|
||||
"' c #676767",
|
||||
") c #7F7F7F",
|
||||
"! c #5F5F5F",
|
||||
"~ c #777777",
|
||||
"{ c #474747",
|
||||
"] c #878787",
|
||||
"^ c #6F6F6F",
|
||||
"/ c #BFBFBF",
|
||||
"( c #373737",
|
||||
"_ c #1F1F1F",
|
||||
": c #272727",
|
||||
"< c #2F2F2F",
|
||||
"[ c #3F3F3F",
|
||||
"} c #EFEFEF",
|
||||
"| c #A7A7A7",
|
||||
"1 c #9F9F9F",
|
||||
"2 c #171717",
|
||||
"3 c #CFCFCF",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" I Q T = ",
|
||||
" Q 7.e.r.i.8.E E 3.r.6.J ",
|
||||
" H ~ n 4.r.p.p.p.p.8.R > 5.^ w.,.-.{ v ",
|
||||
" { 9.^ & P t.p.p.p.p.p.8.I 5 q K L <.;.;.;.-.' ",
|
||||
" { %.H +.y.p.p.p.p.p.e.Y 2 a n.K F $.*.$.@.} ] N ",
|
||||
" x D :.y.p.p.p.p.p.p.r.R 8 C.u ..F A ) A Z M h $ ",
|
||||
" f =.q.p.p.p.p.p.p.p.p.i.( e 6 $.` l B M g ",
|
||||
" ` ;.q.p.p.p.p.p.a.K.a.p.p.4.L -.` l N % ",
|
||||
" V =.-.>.q.y.p.p.p.L.L.K.i.w.,.-.;.$.<.q.u.2. ",
|
||||
" D { =.-.;.>.1.1.9.( h.h.Q &.-.-.-.;.9.p.p.p.r.! ",
|
||||
" U j.o.-.;.-.;.-.P x.Q.^.R.~ *.-.;.;.>.1.q.y.p.i.2. ",
|
||||
" H./.! *.;.;.;.o.x./.(.(.(.J.| -.-.;.-.-.;.,.9.u.p.7. ",
|
||||
" !.(.k.#.;.-.=./ !.(.(.(.(.Q.X.-.;.;.;.;.-.-.;.;.1.w.6. ",
|
||||
" ~.(.H.G ;.-.D j.(.(.(.(.(.!.O.-.-.;.;.;.-.;.-.;.-.;.,.O. ",
|
||||
" ~.(.v.@ *.$.+ d.(.(.(.(.(.E.o.-.-.;.;.-.;.;.;.*.=.=.*.$.v ",
|
||||
" ~.(.l.- Y T ; < (.(.(.(.(.J.&.-.;.;.$.@.[ ] _ ) ) Z B B f ",
|
||||
" P.(.F.X c.I.X f.(.(.(.(.(.G.=.-.=.] A Z Z Z Z z f $ ",
|
||||
" l.!.R.s.F.I.g.W.(.(.(.(.R.E .[ A Z Z Z B g $ ",
|
||||
" . , ; - 0 M.b.V.U.R.Y.z.u n.7 c Z Z B g # + ",
|
||||
" : w p Z.D.A.S.p u i M.A.A.S.* Z B h z ] C ",
|
||||
" s D.D.A.A.A.A.A.A.A.i B.B.b A Z Z @.-.` ",
|
||||
" 1 y C.D.A.A.A.A.A.M.u Z.e c A Z Z [ ;.&. ",
|
||||
" 8 y d C.A.A.A.C.B.t * B Z Z Z A #.=.m ",
|
||||
" 3 9 r t r 9 8 o @ $ # f j l B #.V ",
|
||||
" j k ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "
|
||||
};
|
||||
" .................... ",
|
||||
" ...+@##$$$$###@%&....... ",
|
||||
" ..*=-;;;-;;;;;;;;@........ ",
|
||||
" ..+-;;;;--;;;;;;;>.......... ",
|
||||
" ...,')!!'~>{!)$)>'....*]>^%&.. ",
|
||||
" ../(__(>:{<)$![[[%&...^!!!!!~*. ",
|
||||
" ..@;;;;;({=]:;;;;;~..*_;;;;;;;_.. ",
|
||||
" .}>;;;;;^#=;;;;;;>...<;;;;;;;;;|.. ",
|
||||
" ..*1)))))%]))))))%&..1])))))))))#}. ",
|
||||
" ..%[;;;;;[2;;;;;;;:..#;;;2[[-;;;;;=.. ",
|
||||
" .&:;[{;;;{;;;~={:;^.._;;'}...>;;;;;,. ",
|
||||
" .}<;;:{;_:2!'-;;;]*.&(_].|{=@.~___[/.. ",
|
||||
" ..*$))]@%//,111111}..|1*.@1111@.3111|&. ",
|
||||
" .,:;;;;;'#^;;;;;;;]./;;+);;;;;;$*;;;;.. ",
|
||||
" .^;;;;;;));;;;;;;;$.~;$*;;;;;;;-+^;;;#. ",
|
||||
" ..$;;;;;;>;;;;;;;;>}.^-.!;;;;;;;;)*:;;|. ",
|
||||
" .&@$|#)))|)))1||#]+..$/}]))))))))$.3))#.. ",
|
||||
" .#;;;[{;->;-^[;;;;].~;@];;;;;;;;;;1#;;-}. ",
|
||||
" .{;;;;{<[:(~-;;;;;$.(-.<;;;;;;;;;;{};;;3. ",
|
||||
" ..);;;;;~~[!;;;;;;-/.>=.>;;;;;;;;;;2}^;:3. ",
|
||||
" .&#)))))$}@)))))))@.}]3.*))))))))))).,)).. ",
|
||||
" .3;;;;;;;);;;;;;;;2+|;%.';;;;;;;;;;;]1;;1. ",
|
||||
" .1_(:;;;;{;;;[=[:;;.];}.);;;;;;;;;;;=,;;]. ",
|
||||
" .%2-(!2;2{;_':;;;;).1;..+:;;;;;;;;;;_.;;1. ",
|
||||
" .+))))@1$1#@))))))3.,@...1))))))))))].1#3. ",
|
||||
" .{;;;;;^<>);;;;;;;-.[). .-;;;;;;;;;;;3{;#. ",
|
||||
" ._;;;;;-~];;;;;;;;;};#. ._;;;;;;;;;;;/^;#. ",
|
||||
" .$'!!!!!1]!!!!!!!!%}[,. .'[[[[[[[[[[[,|>}. ",
|
||||
" ..'{::___!{___:(>___:[@...~[[[[[[[[[[[1#{,. ",
|
||||
" .+;-<=(;;[:;;(=-;;;;;;;;;;;;;;;;;;;;;;;;;). ",
|
||||
" .*;;;;[=;[_;{(;;;;;;;;;;;;;;;;;;;;;;;;;;-#. ",
|
||||
" .&)!!!!)$]~)$!!!!!!!!!!!!!!!!!!!!!!!!!!!^+. ",
|
||||
" .&(_____!$)!____________________________<3. ",
|
||||
" .%;;;;;;;@|;;;;;;;;;;;;==))))))))))))))]*&. ",
|
||||
" .*22;;;;;({;;;;;_-;;;;%.&.................. ",
|
||||
" .&+~#]!!!~]!=[!^>[[[[{}... ",
|
||||
" ../__:^^:(!_[$>[[[[[[{+. ",
|
||||
" .<;;;;<^2{;'2;;;;;;;;]. ",
|
||||
" .;;;;;;:~=>:;;;;;;;;;]. ",
|
||||
" .@!!!!!!]3|!!!!!!!!!!*. ",
|
||||
" .#_______#_____:<____~.. ",
|
||||
" .^_{[_;;;=2;;;<<-;;;;;,.................. ",
|
||||
" .@<;;{~2;_>;;((;;;;;;;3,-----------|.$-!. ",
|
||||
" ..@))))|@)|)$|)))))))#}&/))))))))))}./)/. ",
|
||||
" .&:;;;;;=>>;^;;;;;;;;;_.[;;;;;;;;;;^.{;|. ",
|
||||
" ..2;;;;;;{#<[;;;;;;;;;;+';;;;;;;;;;~*;;.. ",
|
||||
" .^;;;;;;;'%;;;;;;;;;;{&}#;;;;;;;;[+|;-.. ",
|
||||
" .&3$1$))))%))))1]))))]+&}$))))))@&./)@. ",
|
||||
" ..(;_<'{;;(-;;[2;;;;;;-@3;;;;;;;_}};;~. ",
|
||||
" .=;;;;:~<-(;-[;;;;;;;;:.=;;;;;;>.!;;,. ",
|
||||
" ./:;;;;;!!!;=-;;;;;;;;>.+$;;;;[.&_;=.. ",
|
||||
" ..&|)))))$,|%)))))))))]1&.|]]@&.|]]}. ",
|
||||
" .&;;;;;;;:@=;;;;;;;;;;;-/....3:;;;}. ",
|
||||
" ..!;;;;;;;([;;;;_2;;;;;;;>)){;;;;^.. ",
|
||||
" ..=2_:-;;;(;;;2<;;;;;;;;;;;;;;-).. ",
|
||||
" ...%$#@%#)#))|))))))))))))))|}&. ",
|
||||
" ..!;;;2!]{_-[;;;;;;;;;;;;;;;&.. ",
|
||||
" ..^-;;;;^)(:;;;;;;;;;;;;;;'.. ",
|
||||
" ..*'-;;;:]-;;;;;;;;;;;;-$.. ",
|
||||
" ....}./1))))))))))))]/... ",
|
||||
" ........}3||1#$$$]1... ",
|
||||
" ................... ",
|
||||
" "};
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 364 KiB After Width: | Height: | Size: 81 KiB |
Binary file not shown.
Before Width: | Height: | Size: 364 KiB After Width: | Height: | Size: 81 KiB |
13
src/sounds.c
13
src/sounds.c
|
@ -438,7 +438,7 @@ sfxinfo_t S_sfx[NUMSFX] =
|
|||
{"s3k59", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k5a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k5b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k5c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k5c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart Mine tick
|
||||
{"s3k5d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k5e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k5f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
|
@ -469,7 +469,7 @@ sfxinfo_t S_sfx[NUMSFX] =
|
|||
{"s3k78", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k79", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k7a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k7b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k7b", false, 64, 16, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart successful hit
|
||||
{"s3k7c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k7d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k7e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
|
@ -483,7 +483,7 @@ sfxinfo_t S_sfx[NUMSFX] =
|
|||
{"s3k86", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k87", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k88", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k89", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k89", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart Jawz target
|
||||
{"s3k8a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k8b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"s3k8c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
|
@ -645,7 +645,7 @@ sfxinfo_t S_sfx[NUMSFX] =
|
|||
{"cdfm36", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"cdfm37", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"cdfm38", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"cdfm39", false, 64, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // SS Mine deployed
|
||||
{"cdfm39", false, 64, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Mine deployed
|
||||
{"cdfm40", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"cdfm41", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"cdfm42", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
|
@ -810,7 +810,12 @@ sfxinfo_t S_sfx[NUMSFX] =
|
|||
{"yeeeah", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"noooo1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"noooo2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"ruby1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"ruby2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"hogbom", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"kpogos", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"ddash", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"itfree", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"dbgsal", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
|
||||
// SRB2kart - Skin sounds
|
||||
|
|
|
@ -882,7 +882,12 @@ typedef enum
|
|||
sfx_yeeeah,
|
||||
sfx_noooo1,
|
||||
sfx_noooo2,
|
||||
sfx_ruby1,
|
||||
sfx_ruby2,
|
||||
sfx_hogbom,
|
||||
sfx_kpogos,
|
||||
sfx_ddash,
|
||||
sfx_itfree,
|
||||
sfx_dbgsal,
|
||||
|
||||
sfx_kwin,
|
||||
|
|
|
@ -770,7 +770,7 @@ static void ST_drawLevelTitle(void)
|
|||
|
||||
lvlw = V_LevelNameWidth(lvlttl);
|
||||
|
||||
if (strlen(actnum) > 0)
|
||||
if (actnum[0])
|
||||
lvlttlxpos = ((BASEVIDWIDTH/2) - (lvlw/2)) - V_LevelNameWidth(actnum);
|
||||
else
|
||||
lvlttlxpos = ((BASEVIDWIDTH/2) - (lvlw/2));
|
||||
|
@ -802,6 +802,7 @@ static void ST_drawLevelTitle(void)
|
|||
V_DrawDiag(sub + ttlnumxpos + 1, bary, 11, 31);
|
||||
V_DrawFill(sub - dupcalc, bary, ttlnumxpos+dupcalc, 10, gtc);
|
||||
V_DrawDiag(sub + ttlnumxpos, bary, 10, gtc);
|
||||
|
||||
if (subttl[0])
|
||||
V_DrawRightAlignedString(sub + zonexpos - 8, bary+1, V_ALLOWLOWERCASE, subttl);
|
||||
//else
|
||||
|
|
|
@ -207,7 +207,7 @@ const char *R_GetPalname(UINT16 num)
|
|||
const char *GetPalette(void)
|
||||
{
|
||||
if (gamestate == GS_LEVEL)
|
||||
return R_GetPalname(mapheaderinfo[gamemap-1]->palette);
|
||||
return R_GetPalname((encoremode ? mapheaderinfo[gamemap-1]->encorepal : mapheaderinfo[gamemap-1]->palette));
|
||||
return "PLAYPAL";
|
||||
}
|
||||
|
||||
|
@ -248,6 +248,9 @@ void V_SetPaletteLump(const char *pal)
|
|||
#endif
|
||||
if (rendermode != render_none)
|
||||
I_SetPalette(pLocalPalette);
|
||||
#ifdef HASINVERT
|
||||
R_MakeInvertmap();
|
||||
#endif
|
||||
}
|
||||
|
||||
static void CV_usegamma_OnChange(void)
|
||||
|
@ -1248,27 +1251,41 @@ void V_DrawFadeConsBack(INT32 plines)
|
|||
|
||||
// Gets string colormap, used for 0x80 color codes
|
||||
//
|
||||
const UINT8 *V_GetStringColormap(INT32 colorflags)
|
||||
UINT8 *V_GetStringColormap(INT32 colorflags)
|
||||
{
|
||||
#if 0 // perfect
|
||||
switch ((colorflags & V_CHARCOLORMASK) >> V_CHARCOLORSHIFT)
|
||||
{
|
||||
case 1: // 0x81, purple
|
||||
case 1: // 0x81, purple
|
||||
return purplemap;
|
||||
case 2: // 0x82, yellow
|
||||
case 2: // 0x82, yellow
|
||||
return yellowmap;
|
||||
case 3: // 0x83, lgreen
|
||||
case 3: // 0x83, green
|
||||
return greenmap;
|
||||
case 4: // 0x84, blue
|
||||
case 4: // 0x84, blue
|
||||
return bluemap;
|
||||
case 5: // 0x85, red
|
||||
case 5: // 0x85, red
|
||||
return redmap;
|
||||
case 6: // 0x86, gray
|
||||
case 6: // 0x86, gray
|
||||
return graymap;
|
||||
case 7: // 0x87, orange
|
||||
case 7: // 0x87, orange
|
||||
return orangemap;
|
||||
case 8: // 0x88, sky
|
||||
case 8: // 0x88, sky
|
||||
return skymap;
|
||||
case 9: // 0x89, lavender
|
||||
return lavendermap;
|
||||
case 10: // 0x8A, gold
|
||||
return goldmap;
|
||||
case 11: // 0x8B, tea-green
|
||||
return teamap;
|
||||
case 12: // 0x8C, steel
|
||||
return steelmap;
|
||||
case 13: // 0x8D, pink
|
||||
return pinkmap;
|
||||
case 14: // 0x8E, teal
|
||||
return tealmap;
|
||||
case 15: // 0x8F, peach
|
||||
return peachmap;
|
||||
default: // reset
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1366,7 +1383,7 @@ char *V_WordWrap(INT32 x, INT32 w, INT32 option, const char *string)
|
|||
for (i = 0; i < slen; ++i)
|
||||
{
|
||||
c = newstring[i];
|
||||
if ((UINT8)c >= 0x80 && (UINT8)c <= 0x89) //color parsing! -Inuyasha 2.16.09
|
||||
if ((UINT8)c >= 0x80 && (UINT8)c <= 0x8F) //color parsing! -Inuyasha 2.16.09
|
||||
continue;
|
||||
|
||||
if (c == '\n')
|
||||
|
@ -1431,6 +1448,7 @@ void V_DrawString(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
}
|
||||
|
||||
charflags = (option & V_CHARCOLORMASK);
|
||||
colormap = V_GetStringColormap(charflags);
|
||||
|
||||
switch (option & V_SPACINGMASK)
|
||||
{
|
||||
|
@ -1454,7 +1472,10 @@ void V_DrawString(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
{
|
||||
// manually set flags override color codes
|
||||
if (!(option & V_CHARCOLORMASK))
|
||||
{
|
||||
charflags = ((*ch & 0x7f) << V_CHARCOLORSHIFT) & V_CHARCOLORMASK;
|
||||
colormap = V_GetStringColormap(charflags);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (*ch == '\n')
|
||||
|
@ -1497,7 +1518,6 @@ void V_DrawString(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
continue;
|
||||
}
|
||||
|
||||
colormap = V_GetStringColormap(charflags);
|
||||
V_DrawFixedPatch((cx + center)<<FRACBITS, cy<<FRACBITS, FRACUNIT, option, hu_font[c], colormap);
|
||||
|
||||
cx += w;
|
||||
|
@ -1530,6 +1550,7 @@ void V_DrawKartString(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
}
|
||||
|
||||
charflags = (option & V_CHARCOLORMASK);
|
||||
colormap = V_GetStringColormap(charflags);
|
||||
|
||||
switch (option & V_SPACINGMASK)
|
||||
{
|
||||
|
@ -1553,7 +1574,10 @@ void V_DrawKartString(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
{
|
||||
// manually set flags override color codes
|
||||
if (!(option & V_CHARCOLORMASK))
|
||||
{
|
||||
charflags = ((*ch & 0x7f) << V_CHARCOLORSHIFT) & V_CHARCOLORMASK;
|
||||
colormap = V_GetStringColormap(charflags);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (*ch == '\n')
|
||||
|
@ -1596,7 +1620,6 @@ void V_DrawKartString(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
continue;
|
||||
}
|
||||
|
||||
colormap = V_GetStringColormap(charflags);
|
||||
V_DrawFixedPatch((cx + center)<<FRACBITS, cy<<FRACBITS, FRACUNIT, option, kart_font[c], colormap);
|
||||
|
||||
cx += w;
|
||||
|
@ -1646,6 +1669,7 @@ void V_DrawSmallString(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
}
|
||||
|
||||
charflags = (option & V_CHARCOLORMASK);
|
||||
colormap = V_GetStringColormap(charflags);
|
||||
|
||||
switch (option & V_SPACINGMASK)
|
||||
{
|
||||
|
@ -1669,7 +1693,10 @@ void V_DrawSmallString(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
{
|
||||
// manually set flags override color codes
|
||||
if (!(option & V_CHARCOLORMASK))
|
||||
{
|
||||
charflags = ((*ch & 0x7f) << V_CHARCOLORSHIFT) & V_CHARCOLORMASK;
|
||||
colormap = V_GetStringColormap(charflags);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (*ch == '\n')
|
||||
|
@ -1710,7 +1737,6 @@ void V_DrawSmallString(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
continue;
|
||||
}
|
||||
|
||||
colormap = V_GetStringColormap(charflags);
|
||||
V_DrawFixedPatch((cx + center)<<FRACBITS, cy<<FRACBITS, FRACUNIT/2, option, hu_font[c], colormap);
|
||||
|
||||
cx += w;
|
||||
|
@ -1753,6 +1779,7 @@ void V_DrawThinString(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
}
|
||||
|
||||
charflags = (option & V_CHARCOLORMASK);
|
||||
colormap = V_GetStringColormap(charflags);
|
||||
|
||||
switch (option & V_SPACINGMASK)
|
||||
{
|
||||
|
@ -1762,8 +1789,9 @@ void V_DrawThinString(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
case V_OLDSPACING:
|
||||
charwidth = 5;
|
||||
break;
|
||||
case V_6WIDTHSPACE:
|
||||
spacewidth = 3;
|
||||
// Out of video flags, so we're reusing this for alternate charwidth instead
|
||||
/*case V_6WIDTHSPACE:
|
||||
spacewidth = 3;*/
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -1776,7 +1804,10 @@ void V_DrawThinString(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
{
|
||||
// manually set flags override color codes
|
||||
if (!(option & V_CHARCOLORMASK))
|
||||
{
|
||||
charflags = ((*ch & 0x7f) << V_CHARCOLORSHIFT) & V_CHARCOLORMASK;
|
||||
colormap = V_GetStringColormap(charflags);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (*ch == '\n')
|
||||
|
@ -1805,7 +1836,8 @@ void V_DrawThinString(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
if (charwidth)
|
||||
w = charwidth * dupx;
|
||||
else
|
||||
w = (SHORT(tny_font[c]->width) * dupx);
|
||||
w = ((option & V_6WIDTHSPACE ? max(1, SHORT(tny_font[c]->width)-1) // Reuse this flag for the alternate bunched-up spacing
|
||||
: SHORT(tny_font[c]->width)) * dupx);
|
||||
|
||||
if (cx > scrwidth)
|
||||
break;
|
||||
|
@ -1815,7 +1847,6 @@ void V_DrawThinString(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
continue;
|
||||
}
|
||||
|
||||
colormap = V_GetStringColormap(charflags);
|
||||
V_DrawFixedPatch(cx<<FRACBITS, cy<<FRACBITS, FRACUNIT, option, tny_font[c], colormap);
|
||||
|
||||
cx += w;
|
||||
|
@ -2158,7 +2189,7 @@ INT32 V_StringWidth(const char *string, INT32 option)
|
|||
for (i = 0; i < strlen(string); i++)
|
||||
{
|
||||
c = string[i];
|
||||
if ((UINT8)c >= 0x80 && (UINT8)c <= 0x89) //color parsing! -Inuyasha 2.16.09
|
||||
if ((UINT8)c >= 0x80 && (UINT8)c <= 0x8F) //color parsing! -Inuyasha 2.16.09
|
||||
continue;
|
||||
|
||||
c = toupper(c) - HU_FONTSTART;
|
||||
|
@ -2197,7 +2228,7 @@ INT32 V_SmallStringWidth(const char *string, INT32 option)
|
|||
for (i = 0; i < strlen(string); i++)
|
||||
{
|
||||
c = string[i];
|
||||
if ((UINT8)c >= 0x80 && (UINT8)c <= 0x89) //color parsing! -Inuyasha 2.16.09
|
||||
if ((UINT8)c >= 0x80 && (UINT8)c <= 0x8F) //color parsing! -Inuyasha 2.16.09
|
||||
continue;
|
||||
|
||||
c = toupper(c) - HU_FONTSTART;
|
||||
|
@ -2227,8 +2258,9 @@ INT32 V_ThinStringWidth(const char *string, INT32 option)
|
|||
case V_OLDSPACING:
|
||||
charwidth = 5;
|
||||
break;
|
||||
case V_6WIDTHSPACE:
|
||||
spacewidth = 3;
|
||||
// Out of video flags, so we're reusing this for alternate charwidth instead
|
||||
/*case V_6WIDTHSPACE:
|
||||
spacewidth = 3;*/
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -2236,14 +2268,15 @@ INT32 V_ThinStringWidth(const char *string, INT32 option)
|
|||
for (i = 0; i < strlen(string); i++)
|
||||
{
|
||||
c = string[i];
|
||||
if ((UINT8)c >= 0x80 && (UINT8)c <= 0x89) //color parsing! -Inuyasha 2.16.09
|
||||
if ((UINT8)c >= 0x80 && (UINT8)c <= 0x8F) //color parsing! -Inuyasha 2.16.09
|
||||
continue;
|
||||
|
||||
c = toupper(c) - HU_FONTSTART;
|
||||
if (c < 0 || c >= HU_FONTSIZE || !tny_font[c])
|
||||
w += spacewidth;
|
||||
else
|
||||
w += (charwidth ? charwidth : SHORT(tny_font[c]->width));
|
||||
w += (charwidth ? charwidth
|
||||
: (option & V_6WIDTHSPACE ? max(1, SHORT(tny_font[c]->width)-1) : SHORT(tny_font[c]->width))); // Reuse this flag for the alternate bunched-up spacing
|
||||
}
|
||||
|
||||
return w;
|
||||
|
|
|
@ -66,8 +66,6 @@ extern UINT8 hudtrans;
|
|||
#define V_MONOSPACE 0x00000C00 // Don't do width checks on characters, all characters 8 width
|
||||
|
||||
// use bits 13-16 for colors
|
||||
// though we only have 7 colors now, perhaps we can introduce
|
||||
// more as needed later
|
||||
#define V_CHARCOLORSHIFT 12
|
||||
#define V_CHARCOLORMASK 0x0000F000
|
||||
// for simplicity's sake, shortcuts to specific colors
|
||||
|
@ -79,6 +77,13 @@ extern UINT8 hudtrans;
|
|||
#define V_GRAYMAP 0x00006000
|
||||
#define V_ORANGEMAP 0x00007000
|
||||
#define V_SKYMAP 0x00008000
|
||||
#define V_LAVENDERMAP 0x00009000
|
||||
#define V_GOLDMAP 0x0000A000
|
||||
#define V_TEAMAP 0x0000B000
|
||||
#define V_STEELMAP 0x0000C000
|
||||
#define V_PINKMAP 0x0000D000
|
||||
#define V_TEALMAP 0x0000E000
|
||||
#define V_PEACHMAP 0x0000F000
|
||||
|
||||
// use bits 17-20 for alpha transparency
|
||||
#define V_ALPHASHIFT 16
|
||||
|
@ -157,7 +162,7 @@ void V_DrawFadeConsBack(INT32 plines);
|
|||
void V_DrawCharacter(INT32 x, INT32 y, INT32 c, boolean lowercaseallowed);
|
||||
// draw a single character, but for the chat
|
||||
void V_DrawChatCharacter(INT32 x, INT32 y, INT32 c, boolean lowercaseallowed, UINT8 *colormap);
|
||||
const UINT8 *V_GetStringColormap(INT32 colorflags);
|
||||
UINT8 *V_GetStringColormap(INT32 colorflags);
|
||||
|
||||
void V_DrawLevelTitle(INT32 x, INT32 y, INT32 option, const char *string);
|
||||
|
||||
|
|
23
src/w_wad.c
23
src/w_wad.c
|
@ -783,6 +783,29 @@ static size_t W_RawReadLumpHeader(UINT16 wad, UINT16 lump, void *dest, size_t si
|
|||
fseek(handle, (long)(l->position + offset), SEEK_SET);
|
||||
bytesread = fread(dest, 1, size, handle);
|
||||
|
||||
#if 1 // we're fucking sick of this
|
||||
if (bytesread < 67) // http://garethrees.org/2007/11/14/pngcrush/
|
||||
return bytesread;
|
||||
|
||||
#define sigcheck ((UINT8 *)dest)
|
||||
if (sigcheck[0] == 0x89
|
||||
&& sigcheck[1] == 0x50
|
||||
&& sigcheck[2] == 0x4e
|
||||
&& sigcheck[3] == 0x47
|
||||
&& sigcheck[4] == 0x0d
|
||||
&& sigcheck[5] == 0x0a
|
||||
&& sigcheck[6] == 0x1a
|
||||
&& sigcheck[7] == 0x0a)
|
||||
{
|
||||
char pnglump[9];
|
||||
strncpy(pnglump, l->name, 8);
|
||||
pnglump[8] = '\0';
|
||||
I_Error("W_Wad: Lump \"%s\" is a .PNG - have you tried converting to Doom or Flat (raw) image formats?", pnglump);
|
||||
}
|
||||
#undef sigcheck
|
||||
|
||||
#endif
|
||||
|
||||
return bytesread;
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 364 KiB After Width: | Height: | Size: 81 KiB |
214
src/y_inter.c
214
src/y_inter.c
|
@ -89,10 +89,12 @@ typedef union
|
|||
INT32 numplayers; // Number of players being displayed
|
||||
char levelstring[64]; // holds levelnames up to 64 characters
|
||||
// SRB2kart
|
||||
UINT8 increase[MAXPLAYERS]; //how much did the score increase by?
|
||||
UINT32 val[MAXPLAYERS]; //Gametype-specific value
|
||||
UINT8 increase[MAXPLAYERS]; // how much did the score increase by?
|
||||
UINT8 jitter[MAXPLAYERS]; // wiggle
|
||||
UINT32 val[MAXPLAYERS]; // Gametype-specific value
|
||||
UINT8 pos[MAXPLAYERS]; // player positions. used for ties
|
||||
boolean rankingsmode; // rankings mode
|
||||
boolean encore; // encore mode
|
||||
} match;
|
||||
} y_data;
|
||||
|
||||
|
@ -125,6 +127,7 @@ typedef struct
|
|||
UINT8 gtc;
|
||||
const char *gts;
|
||||
patch_t *pic;
|
||||
boolean encore;
|
||||
} y_votelvlinfo;
|
||||
|
||||
// Clientside & splitscreen player info.
|
||||
|
@ -155,6 +158,7 @@ static patch_t *cursor2 = NULL;
|
|||
static patch_t *cursor3 = NULL;
|
||||
static patch_t *cursor4 = NULL;
|
||||
static patch_t *randomlvl = NULL;
|
||||
static patch_t *rubyicon = NULL;
|
||||
|
||||
static void Y_UnloadVoteData(void);
|
||||
|
||||
|
@ -188,22 +192,28 @@ static void Y_CompareBattle(INT32 i)
|
|||
|
||||
static void Y_CompareRank(INT32 i)
|
||||
{
|
||||
if (!(data.match.val[data.match.numplayers] == UINT32_MAX || players[i].score > data.match.val[data.match.numplayers]))
|
||||
UINT8 increase = ((data.match.increase[i] == UINT8_MAX) ? 0 : data.match.increase[i]);
|
||||
if (!(data.match.val[data.match.numplayers] == UINT32_MAX || (players[i].score - increase) > data.match.val[data.match.numplayers]))
|
||||
return;
|
||||
|
||||
data.match.val[data.match.numplayers] = players[i].score;
|
||||
data.match.val[data.match.numplayers] = (players[i].score - increase);
|
||||
data.match.num[data.match.numplayers] = i;
|
||||
}
|
||||
|
||||
static void Y_CalculateMatchData(boolean rankingsmode, void (*comparison)(INT32))
|
||||
static void Y_CalculateMatchData(UINT8 rankingsmode, void (*comparison)(INT32))
|
||||
{
|
||||
INT32 i, j;
|
||||
boolean completed[MAXPLAYERS];
|
||||
INT32 numplayersingame = 0;
|
||||
|
||||
// Initialize variables
|
||||
if ((data.match.rankingsmode = rankingsmode))
|
||||
if (rankingsmode > 1)
|
||||
;
|
||||
else if ((data.match.rankingsmode = (boolean)rankingsmode))
|
||||
{
|
||||
sprintf(data.match.levelstring, "* Total Rankings *");
|
||||
data.match.encore = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// set up the levelstring
|
||||
|
@ -236,16 +246,24 @@ static void Y_CalculateMatchData(boolean rankingsmode, void (*comparison)(INT32)
|
|||
}
|
||||
|
||||
data.match.levelstring[sizeof data.match.levelstring - 1] = '\0';
|
||||
|
||||
data.match.encore = encoremode;
|
||||
|
||||
memset(data.match.jitter, 0, sizeof (data.match.jitter));
|
||||
}
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
data.match.val[i] = UINT32_MAX;
|
||||
if (!rankingsmode)
|
||||
data.match.increase[i] = UINT8_MAX;
|
||||
|
||||
if (!playeringame[i] || players[i].spectator)
|
||||
{
|
||||
data.match.increase[i] = UINT8_MAX;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!rankingsmode)
|
||||
data.match.increase[i] = UINT8_MAX;
|
||||
|
||||
numplayersingame++;
|
||||
}
|
||||
|
@ -395,7 +413,8 @@ void Y_IntermissionDrawer(void)
|
|||
}
|
||||
else*/ if (intertype == int_race || intertype == int_match)
|
||||
{
|
||||
INT32 y = 48;
|
||||
#define NUMFORNEWCOLUMN 8
|
||||
INT32 y = 48, gutter = ((data.match.numplayers > NUMFORNEWCOLUMN) ? 0 : (BASEVIDWIDTH/2));
|
||||
const char *timeheader;
|
||||
|
||||
if (data.match.rankingsmode)
|
||||
|
@ -407,7 +426,10 @@ void Y_IntermissionDrawer(void)
|
|||
V_DrawCenteredString(-4 + x + BASEVIDWIDTH/2, 20, 0, data.match.levelstring);
|
||||
V_DrawFill(x, 42, 312, 1, 0);
|
||||
|
||||
if (data.match.numplayers > 8)
|
||||
if (data.match.encore)
|
||||
V_DrawCenteredString(-4 + x + BASEVIDWIDTH/2, 20-8, hilicol, "ENCORE MODE");
|
||||
|
||||
if (!gutter)
|
||||
{
|
||||
V_DrawFill(x+156, 32, 1, 152, 0);
|
||||
|
||||
|
@ -424,10 +446,16 @@ void Y_IntermissionDrawer(void)
|
|||
|
||||
for (i = 0; i < data.match.numplayers; i++)
|
||||
{
|
||||
boolean dojitter = data.match.jitter[data.match.num[i]];
|
||||
data.match.jitter[data.match.num[i]] = 0;
|
||||
|
||||
if (data.match.num[i] != MAXPLAYERS && playeringame[data.match.num[i]] && !players[data.match.num[i]].spectator)
|
||||
{
|
||||
char strtime[MAXPLAYERNAME+1];
|
||||
|
||||
if (dojitter)
|
||||
y--;
|
||||
|
||||
V_DrawCenteredString(x+6, y, 0, va("%d", data.match.pos[i]));
|
||||
|
||||
if (data.match.color[i] == 0)
|
||||
|
@ -438,7 +466,7 @@ void Y_IntermissionDrawer(void)
|
|||
V_DrawSmallMappedPatch(x+16, y-4, 0,faceprefix[*data.match.character[i]], colormap);
|
||||
}
|
||||
|
||||
if (data.match.numplayers > 8)
|
||||
if (!gutter)
|
||||
strlcpy(strtime, data.match.name[i], 6);
|
||||
else
|
||||
STRBUFCPY(strtime, data.match.name[i]);
|
||||
|
@ -458,66 +486,46 @@ void Y_IntermissionDrawer(void)
|
|||
else
|
||||
snprintf(strtime, sizeof strtime, "(+ %d)", data.match.increase[data.match.num[i]]);
|
||||
|
||||
if (data.match.numplayers > 8)
|
||||
V_DrawRightAlignedString(x+120, y, 0, strtime);
|
||||
else
|
||||
V_DrawRightAlignedString(x+120+BASEVIDWIDTH/2, y, 0, strtime);
|
||||
|
||||
snprintf(strtime, sizeof strtime, "%d", data.match.val[i]-data.match.increase[data.match.num[i]]);
|
||||
V_DrawRightAlignedString(x+120+gutter, y, 0, strtime);
|
||||
}
|
||||
else
|
||||
snprintf(strtime, sizeof strtime, "%d", data.match.val[i]);
|
||||
|
||||
if (data.match.numplayers > 8)
|
||||
V_DrawRightAlignedString(x+152, y, 0, strtime);
|
||||
else
|
||||
V_DrawRightAlignedString(x+152+BASEVIDWIDTH/2, y, 0, strtime);
|
||||
snprintf(strtime, sizeof strtime, "%d", data.match.val[i]);
|
||||
|
||||
V_DrawRightAlignedString(x+152+gutter, y, 0, strtime);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (data.match.val[i] == (UINT32_MAX-1))
|
||||
{
|
||||
if (data.match.numplayers > 8)
|
||||
V_DrawRightAlignedThinString(x+152, y-1, 0, "NO CONTEST");
|
||||
else
|
||||
V_DrawRightAlignedThinString(x+152+BASEVIDWIDTH/2, y-1, 0, "NO CONTEST");
|
||||
}
|
||||
V_DrawRightAlignedThinString(x+152+gutter, y-1, 0, "NO CONTEST.");
|
||||
else
|
||||
{
|
||||
if (intertype == int_race)
|
||||
{
|
||||
snprintf(strtime, sizeof strtime, "%i:%02i.%02i", G_TicsToMinutes(data.match.val[i], true),
|
||||
snprintf(strtime, sizeof strtime, "%i'%02i\"%02i", G_TicsToMinutes(data.match.val[i], true),
|
||||
G_TicsToSeconds(data.match.val[i]), G_TicsToCentiseconds(data.match.val[i]));
|
||||
strtime[sizeof strtime - 1] = '\0';
|
||||
|
||||
if (data.match.numplayers > 8)
|
||||
V_DrawRightAlignedString(x+152, y, 0, strtime);
|
||||
else
|
||||
V_DrawRightAlignedString(x+152+BASEVIDWIDTH/2, y, 0, strtime);
|
||||
V_DrawRightAlignedString(x+152+gutter, y, 0, strtime);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (data.match.numplayers > 8)
|
||||
V_DrawRightAlignedString(x+152, y, 0, va("%i", data.match.val[i]));
|
||||
else
|
||||
V_DrawRightAlignedString(x+152+BASEVIDWIDTH/2, y, 0, va("%i", data.match.val[i]));
|
||||
}
|
||||
V_DrawRightAlignedString(x+152+gutter, y, 0, va("%i", data.match.val[i]));
|
||||
}
|
||||
}
|
||||
|
||||
if (dojitter)
|
||||
y++;
|
||||
}
|
||||
else
|
||||
{
|
||||
data.match.increase[data.match.num[i]] = 0;
|
||||
data.match.num[i] = MAXPLAYERS; // this should be the only field setting in this function
|
||||
}
|
||||
|
||||
y += 16;
|
||||
|
||||
if (i == 7)
|
||||
if (i == NUMFORNEWCOLUMN-1)
|
||||
{
|
||||
y = 48;
|
||||
x += BASEVIDWIDTH/2;
|
||||
}
|
||||
#undef NUMFORNEWCOLUMN
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -590,9 +598,9 @@ void Y_Ticker(void)
|
|||
else
|
||||
{
|
||||
if (!data.match.rankingsmode && (intertic >= sorttic + 8))
|
||||
Y_CalculateMatchData(true, Y_CompareRank);
|
||||
Y_CalculateMatchData(1, Y_CompareRank);
|
||||
|
||||
if (data.match.rankingsmode && intertic > sorttic+(2*TICRATE))
|
||||
if (data.match.rankingsmode && intertic > sorttic+16+(2*TICRATE))
|
||||
{
|
||||
INT32 q=0,r=0;
|
||||
boolean kaching = true;
|
||||
|
@ -604,14 +612,17 @@ void Y_Ticker(void)
|
|||
|| data.match.increase[data.match.num[q]] == UINT8_MAX)
|
||||
continue;
|
||||
|
||||
data.match.increase[data.match.num[q]]--;
|
||||
r++;
|
||||
if (data.match.increase[data.match.num[q]])
|
||||
data.match.jitter[data.match.num[q]] = 1;
|
||||
if (--data.match.increase[data.match.num[q]])
|
||||
kaching = false;
|
||||
}
|
||||
|
||||
if (r)
|
||||
{
|
||||
S_StartSound(NULL, (kaching ? sfx_chchng : sfx_ptally));
|
||||
Y_CalculateMatchData(2, Y_CompareRank);
|
||||
}
|
||||
else
|
||||
endtic = intertic + 3*TICRATE; // 3 second pause after end of tally
|
||||
}
|
||||
|
@ -754,7 +765,7 @@ void Y_StartIntermission(void)
|
|||
case int_match:
|
||||
{
|
||||
// Calculate who won
|
||||
Y_CalculateMatchData(false, Y_CompareBattle);
|
||||
Y_CalculateMatchData(0, Y_CompareBattle);
|
||||
if (cv_inttime.value > 0)
|
||||
S_ChangeMusicInternal("racent", true); // loop it
|
||||
break;
|
||||
|
@ -777,7 +788,7 @@ void Y_StartIntermission(void)
|
|||
}
|
||||
|
||||
// Calculate who won
|
||||
Y_CalculateMatchData(false, Y_CompareRace);
|
||||
Y_CalculateMatchData(0, Y_CompareRace);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -926,6 +937,7 @@ void Y_VoteDrawer(void)
|
|||
{
|
||||
INT32 i, x, y = 0, height = 0;
|
||||
UINT8 selected[4];
|
||||
fixed_t rubyheight = 0;
|
||||
|
||||
if (rendermode == render_none)
|
||||
return;
|
||||
|
@ -936,6 +948,11 @@ void Y_VoteDrawer(void)
|
|||
if (!voteclient.loaded)
|
||||
return;
|
||||
|
||||
{
|
||||
angle_t rubyfloattime = (ANGLE_MAX/NEWTICRATE)*(votetic % NEWTICRATE);
|
||||
rubyheight = FINESINE(rubyfloattime>>ANGLETOFINESHIFT);
|
||||
}
|
||||
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
||||
|
||||
if (widebgpatch && rendermode == render_soft && vid.width / vid.dupx > 320)
|
||||
|
@ -970,19 +987,18 @@ void Y_VoteDrawer(void)
|
|||
y = (200-height)/2;
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
char str[40];
|
||||
const char *str;
|
||||
patch_t *pic;
|
||||
UINT8 j, color;
|
||||
|
||||
if (i == 3)
|
||||
{
|
||||
snprintf(str, sizeof str, "%.32s", "RANDOM");
|
||||
str[sizeof str - 1] = '\0';
|
||||
str = "RANDOM";
|
||||
pic = randomlvl;
|
||||
}
|
||||
else
|
||||
{
|
||||
strcpy(str, levelinfo[i].str);
|
||||
str = levelinfo[i].str;
|
||||
pic = levelinfo[i].pic;
|
||||
}
|
||||
|
||||
|
@ -1047,8 +1063,16 @@ void Y_VoteDrawer(void)
|
|||
sizeadd--;
|
||||
}
|
||||
|
||||
V_DrawSmallScaledPatch(BASEVIDWIDTH-100, y, V_SNAPTORIGHT, pic);
|
||||
V_DrawRightAlignedThinString(BASEVIDWIDTH-20, 40+y, V_SNAPTORIGHT, str);
|
||||
if (!levelinfo[i].encore)
|
||||
V_DrawSmallScaledPatch(BASEVIDWIDTH-100, y, V_SNAPTORIGHT, pic);
|
||||
else
|
||||
{
|
||||
V_DrawFixedPatch((BASEVIDWIDTH-20)<<FRACBITS, (y)<<FRACBITS, FRACUNIT/2, V_FLIP|V_SNAPTORIGHT, pic, 0);
|
||||
V_DrawFixedPatch((BASEVIDWIDTH-60)<<FRACBITS, ((y+25)<<FRACBITS) - (rubyheight<<1), FRACUNIT, V_SNAPTORIGHT, rubyicon, NULL);
|
||||
}
|
||||
|
||||
V_DrawRightAlignedThinString(BASEVIDWIDTH-22, 40+y, V_SNAPTORIGHT|V_6WIDTHSPACE, str);
|
||||
|
||||
if (levelinfo[i].gts)
|
||||
{
|
||||
INT32 w = V_ThinStringWidth(levelinfo[i].gts, V_SNAPTORIGHT)+1;
|
||||
|
@ -1063,7 +1087,14 @@ void Y_VoteDrawer(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
V_DrawTinyScaledPatch(BASEVIDWIDTH-60, y, V_SNAPTORIGHT, pic);
|
||||
if (!levelinfo[i].encore)
|
||||
V_DrawTinyScaledPatch(BASEVIDWIDTH-60, y, V_SNAPTORIGHT, pic);
|
||||
else
|
||||
{
|
||||
V_DrawFixedPatch((BASEVIDWIDTH-20)<<FRACBITS, y<<FRACBITS, FRACUNIT/4, V_FLIP|V_SNAPTORIGHT, pic, 0);
|
||||
V_DrawFixedPatch((BASEVIDWIDTH-40)<<FRACBITS, (y<<FRACBITS) + (25<<(FRACBITS-1)) - rubyheight, FRACUNIT/2, V_SNAPTORIGHT, rubyicon, NULL);
|
||||
}
|
||||
|
||||
if (levelinfo[i].gts)
|
||||
{
|
||||
V_DrawDiag(BASEVIDWIDTH-60, y, 8, V_SNAPTORIGHT|31);
|
||||
|
@ -1101,7 +1132,14 @@ void Y_VoteDrawer(void)
|
|||
V_DrawFill(x-1, y-1, 42, 27, levelinfo[votes[i]].gtc|V_SNAPTOLEFT);
|
||||
}
|
||||
|
||||
V_DrawTinyScaledPatch(x, y, V_SNAPTOLEFT, pic);
|
||||
if (!levelinfo[votes[i]].encore)
|
||||
V_DrawTinyScaledPatch(x, y, V_SNAPTOLEFT, pic);
|
||||
else
|
||||
{
|
||||
V_DrawFixedPatch((x+40)<<FRACBITS, (y)<<FRACBITS, FRACUNIT/4, V_SNAPTOLEFT|V_FLIP, pic, 0);
|
||||
V_DrawFixedPatch((x+20)<<FRACBITS, (y<<FRACBITS) + (25<<(FRACBITS-1)) - rubyheight, FRACUNIT/2, V_SNAPTORIGHT, rubyicon, NULL);
|
||||
}
|
||||
|
||||
if (levelinfo[votes[i]].gts)
|
||||
{
|
||||
V_DrawDiag(x, y, 8, V_SNAPTOLEFT|31);
|
||||
|
@ -1166,6 +1204,8 @@ static void Y_VoteStops(SINT8 pick, SINT8 level)
|
|||
D_GameTypeChanged(lastgametype);
|
||||
forceresetplayers = true;
|
||||
}
|
||||
|
||||
deferencoremode = (levelinfo[level].encore);
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -1386,6 +1426,7 @@ void Y_StartVote(void)
|
|||
cursor3 = W_CachePatchName("P3CURSOR", PU_STATIC);
|
||||
cursor4 = W_CachePatchName("P4CURSOR", PU_STATIC);
|
||||
randomlvl = W_CachePatchName("RANDOMLV", PU_STATIC);
|
||||
rubyicon = W_CachePatchName("RUBYICON", PU_STATIC);
|
||||
|
||||
timer = cv_votetime.value*TICRATE;
|
||||
pickedvote = -1;
|
||||
|
@ -1409,37 +1450,42 @@ void Y_StartVote(void)
|
|||
{
|
||||
lumpnum_t lumpnum;
|
||||
|
||||
// set up the encore
|
||||
levelinfo[i].encore = (votelevels[i][1] & 0x80);
|
||||
votelevels[i][1] &= ~0x80;
|
||||
|
||||
// set up the str
|
||||
if (i == 4)
|
||||
levelinfo[i].str[0] = '\0';
|
||||
else
|
||||
{
|
||||
if (strlen(mapheaderinfo[votelevels[i][0]]->zonttl) > 0)
|
||||
// set up the levelstring
|
||||
if (mapheaderinfo[votelevels[i][0]]->levelflags & LF_NOZONE || !mapheaderinfo[votelevels[i][0]]->zonttl[0])
|
||||
{
|
||||
if (strlen(mapheaderinfo[votelevels[i][0]]->actnum) > 0)
|
||||
if (mapheaderinfo[votelevels[i][0]]->actnum[0])
|
||||
snprintf(levelinfo[i].str,
|
||||
sizeof levelinfo[i].str,
|
||||
"%.32s %.32s %s",
|
||||
mapheaderinfo[votelevels[i][0]]->lvlttl, mapheaderinfo[votelevels[i][0]]->zonttl, mapheaderinfo[votelevels[i][0]]->actnum);
|
||||
else
|
||||
snprintf(levelinfo[i].str,
|
||||
sizeof levelinfo[i].str,
|
||||
"%.32s %.32s",
|
||||
mapheaderinfo[votelevels[i][0]]->lvlttl, mapheaderinfo[votelevels[i][0]]->zonttl);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (strlen(mapheaderinfo[votelevels[i][0]]->actnum) > 0)
|
||||
snprintf(levelinfo[i].str,
|
||||
sizeof levelinfo[i].str,
|
||||
"%.32s %s",
|
||||
"%s %s",
|
||||
mapheaderinfo[votelevels[i][0]]->lvlttl, mapheaderinfo[votelevels[i][0]]->actnum);
|
||||
else
|
||||
snprintf(levelinfo[i].str,
|
||||
sizeof levelinfo[i].str,
|
||||
"%.32s",
|
||||
"%s",
|
||||
mapheaderinfo[votelevels[i][0]]->lvlttl);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mapheaderinfo[votelevels[i][0]]->actnum[0])
|
||||
snprintf(levelinfo[i].str,
|
||||
sizeof levelinfo[i].str,
|
||||
"%s %s %s",
|
||||
mapheaderinfo[votelevels[i][0]]->lvlttl, mapheaderinfo[votelevels[i][0]]->zonttl, mapheaderinfo[votelevels[i][0]]->actnum);
|
||||
else
|
||||
snprintf(levelinfo[i].str,
|
||||
sizeof levelinfo[i].str,
|
||||
"%s %s",
|
||||
mapheaderinfo[votelevels[i][0]]->lvlttl, mapheaderinfo[votelevels[i][0]]->zonttl);
|
||||
}
|
||||
|
||||
levelinfo[i].str[sizeof levelinfo[i].str - 1] = '\0';
|
||||
}
|
||||
|
@ -1489,6 +1535,7 @@ static void Y_UnloadVoteData(void)
|
|||
UNLOAD(cursor3);
|
||||
UNLOAD(cursor4);
|
||||
UNLOAD(randomlvl);
|
||||
UNLOAD(rubyicon);
|
||||
|
||||
UNLOAD(levelinfo[4].pic);
|
||||
UNLOAD(levelinfo[3].pic);
|
||||
|
@ -1502,13 +1549,13 @@ static void Y_UnloadVoteData(void)
|
|||
//
|
||||
void Y_SetupVoteFinish(SINT8 pick, SINT8 level)
|
||||
{
|
||||
if (!voteclient.loaded)
|
||||
return;
|
||||
|
||||
if (pick == -1) // No other votes? We gotta get out of here, then!
|
||||
{
|
||||
if (voteclient.loaded)
|
||||
{
|
||||
Y_EndVote();
|
||||
Y_FollowIntermission();
|
||||
}
|
||||
Y_EndVote();
|
||||
Y_FollowIntermission();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1554,11 +1601,8 @@ void Y_SetupVoteFinish(SINT8 pick, SINT8 level)
|
|||
}
|
||||
else if (endtype == 0) // Might as well put this here, too.
|
||||
{
|
||||
if (voteclient.loaded)
|
||||
{
|
||||
Y_EndVote();
|
||||
Y_FollowIntermission();
|
||||
}
|
||||
Y_EndVote();
|
||||
Y_FollowIntermission();
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue