mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +00:00
Change splitscreen into UINT8, fix HUD slightly more
This commit is contained in:
parent
6346058f35
commit
349b27e0de
30 changed files with 474 additions and 649 deletions
|
@ -95,8 +95,8 @@ UINT32 playerpingtable[MAXPLAYERS]; //table of player latency values.
|
||||||
#endif
|
#endif
|
||||||
SINT8 nodetoplayer[MAXNETNODES];
|
SINT8 nodetoplayer[MAXNETNODES];
|
||||||
SINT8 nodetoplayer2[MAXNETNODES]; // say the numplayer for this node if any (splitscreen)
|
SINT8 nodetoplayer2[MAXNETNODES]; // say the numplayer for this node if any (splitscreen)
|
||||||
SINT8 nodetoplayer3[MAXNETNODES]; // say the numplayer for this node if any (splitscreen3)
|
SINT8 nodetoplayer3[MAXNETNODES]; // say the numplayer for this node if any (splitscreen == 2)
|
||||||
SINT8 nodetoplayer4[MAXNETNODES]; // say the numplayer for this node if any (splitscreen4)
|
SINT8 nodetoplayer4[MAXNETNODES]; // say the numplayer for this node if any (splitscreen == 3)
|
||||||
UINT8 playerpernode[MAXNETNODES]; // used specialy for splitscreen
|
UINT8 playerpernode[MAXNETNODES]; // used specialy for splitscreen
|
||||||
boolean nodeingame[MAXNETNODES]; // set false as nodes leave game
|
boolean nodeingame[MAXNETNODES]; // set false as nodes leave game
|
||||||
static tic_t nettics[MAXNETNODES]; // what tic the client have received
|
static tic_t nettics[MAXNETNODES]; // what tic the client have received
|
||||||
|
@ -129,8 +129,8 @@ static UINT8 mynode; // my address pointofview server
|
||||||
|
|
||||||
static UINT8 localtextcmd[MAXTEXTCMD];
|
static UINT8 localtextcmd[MAXTEXTCMD];
|
||||||
static UINT8 localtextcmd2[MAXTEXTCMD]; // splitscreen
|
static UINT8 localtextcmd2[MAXTEXTCMD]; // splitscreen
|
||||||
static UINT8 localtextcmd3[MAXTEXTCMD]; // splitscreen3
|
static UINT8 localtextcmd3[MAXTEXTCMD]; // splitscreen == 2
|
||||||
static UINT8 localtextcmd4[MAXTEXTCMD]; // splitscreen4
|
static UINT8 localtextcmd4[MAXTEXTCMD]; // splitscreen == 3
|
||||||
static tic_t neededtic;
|
static tic_t neededtic;
|
||||||
SINT8 servernode = 0; // the number of the server node
|
SINT8 servernode = 0; // the number of the server node
|
||||||
/// \brief do we accept new players?
|
/// \brief do we accept new players?
|
||||||
|
@ -1254,11 +1254,9 @@ static boolean CL_SendJoin(void)
|
||||||
CONS_Printf(M_GetText("Sending join request...\n"));
|
CONS_Printf(M_GetText("Sending join request...\n"));
|
||||||
netbuffer->packettype = PT_CLIENTJOIN;
|
netbuffer->packettype = PT_CLIENTJOIN;
|
||||||
|
|
||||||
if ((splitscreen || splitscreen3 || splitscreen4) || botingame)
|
if (splitscreen)
|
||||||
localplayers++;
|
localplayers += splitscreen;
|
||||||
if (splitscreen3 || splitscreen4)
|
else if (botingame)
|
||||||
localplayers++;
|
|
||||||
if (splitscreen4)
|
|
||||||
localplayers++;
|
localplayers++;
|
||||||
|
|
||||||
netbuffer->u.clientcfg.localplayers = localplayers;
|
netbuffer->u.clientcfg.localplayers = localplayers;
|
||||||
|
@ -2357,7 +2355,7 @@ static void Command_connect(void)
|
||||||
CONS_Alert(CONS_ERROR, M_GetText("There is no network driver\n"));
|
CONS_Alert(CONS_ERROR, M_GetText("There is no network driver\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
splitscreen = splitscreen3 = splitscreen4 = false;
|
splitscreen = 0;
|
||||||
SplitScreen_OnChange();
|
SplitScreen_OnChange();
|
||||||
botingame = false;
|
botingame = false;
|
||||||
botskin = 0;
|
botskin = 0;
|
||||||
|
@ -3133,7 +3131,7 @@ static void Got_AddPlayer(UINT8 **p, INT32 playernum)
|
||||||
|
|
||||||
// Clear player before joining, lest some things get set incorrectly
|
// Clear player before joining, lest some things get set incorrectly
|
||||||
// HACK: don't do this for splitscreen, it relies on preset values
|
// HACK: don't do this for splitscreen, it relies on preset values
|
||||||
if (!(splitscreen || splitscreen3 || splitscreen4) && !botingame)
|
if (!splitscreen && !botingame)
|
||||||
CL_ClearPlayer(newplayernum);
|
CL_ClearPlayer(newplayernum);
|
||||||
playeringame[newplayernum] = true;
|
playeringame[newplayernum] = true;
|
||||||
G_AddPlayer(newplayernum);
|
G_AddPlayer(newplayernum);
|
||||||
|
@ -3228,7 +3226,7 @@ static boolean SV_AddWaitingPlayers(void)
|
||||||
|
|
||||||
for (node = 0; node < MAXNETNODES; node++)
|
for (node = 0; node < MAXNETNODES; node++)
|
||||||
{
|
{
|
||||||
// splitscreen can allow 2 player in one node
|
// splitscreen can allow 2+ players in one node
|
||||||
for (; nodewaiting[node] > 0; nodewaiting[node]--)
|
for (; nodewaiting[node] > 0; nodewaiting[node]--)
|
||||||
{
|
{
|
||||||
newplayer = true;
|
newplayer = true;
|
||||||
|
@ -3371,7 +3369,7 @@ void SV_StartSinglePlayerServer(void)
|
||||||
// no more tic the game with this settings!
|
// no more tic the game with this settings!
|
||||||
SV_StopServer();
|
SV_StopServer();
|
||||||
|
|
||||||
if (splitscreen || splitscreen3 || splitscreen4)
|
if (splitscreen)
|
||||||
multiplayer = true;
|
multiplayer = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4381,22 +4379,21 @@ static void CL_SendClientCmd(void)
|
||||||
{
|
{
|
||||||
netbuffer->packettype += 2;
|
netbuffer->packettype += 2;
|
||||||
G_MoveTiccmd(&netbuffer->u.client2pak.cmd2, &localcmds2, 1);
|
G_MoveTiccmd(&netbuffer->u.client2pak.cmd2, &localcmds2, 1);
|
||||||
packetsize = sizeof (client2cmd_pak);
|
if (splitscreen > 1)
|
||||||
}
|
{
|
||||||
else if (splitscreen3)
|
netbuffer->packettype += 2;
|
||||||
{
|
G_MoveTiccmd(&netbuffer->u.client3pak.cmd3, &localcmds3, 1);
|
||||||
netbuffer->packettype += 4;
|
if (splitscreen > 2)
|
||||||
G_MoveTiccmd(&netbuffer->u.client2pak.cmd2, &localcmds2, 1);
|
{
|
||||||
G_MoveTiccmd(&netbuffer->u.client3pak.cmd3, &localcmds3, 1);
|
netbuffer->packettype += 2;
|
||||||
packetsize = sizeof (client3cmd_pak);
|
G_MoveTiccmd(&netbuffer->u.client4pak.cmd4, &localcmds4, 1);
|
||||||
}
|
packetsize = sizeof (client4cmd_pak);
|
||||||
else if (splitscreen4)
|
}
|
||||||
{
|
else
|
||||||
netbuffer->packettype += 6;
|
packetsize = sizeof (client3cmd_pak);
|
||||||
G_MoveTiccmd(&netbuffer->u.client2pak.cmd2, &localcmds2, 1);
|
}
|
||||||
G_MoveTiccmd(&netbuffer->u.client3pak.cmd3, &localcmds3, 1);
|
else
|
||||||
G_MoveTiccmd(&netbuffer->u.client4pak.cmd4, &localcmds4, 1);
|
packetsize = sizeof (client2cmd_pak);
|
||||||
packetsize = sizeof (client4cmd_pak);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
packetsize = sizeof (clientcmd_pak);
|
packetsize = sizeof (clientcmd_pak);
|
||||||
|
@ -4416,7 +4413,7 @@ static void CL_SendClientCmd(void)
|
||||||
localtextcmd[0] = 0;
|
localtextcmd[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send extra data if needed for player 2 (splitscreen)
|
// Send extra data if needed for player 2 (splitscreen == 1)
|
||||||
if (localtextcmd2[0])
|
if (localtextcmd2[0])
|
||||||
{
|
{
|
||||||
netbuffer->packettype = PT_TEXTCMD2;
|
netbuffer->packettype = PT_TEXTCMD2;
|
||||||
|
@ -4426,7 +4423,7 @@ static void CL_SendClientCmd(void)
|
||||||
localtextcmd2[0] = 0;
|
localtextcmd2[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send extra data if needed for player 3 (splitscreen3)
|
// Send extra data if needed for player 3 (splitscreen == 2)
|
||||||
if (localtextcmd3[0])
|
if (localtextcmd3[0])
|
||||||
{
|
{
|
||||||
netbuffer->packettype = PT_TEXTCMD3;
|
netbuffer->packettype = PT_TEXTCMD3;
|
||||||
|
@ -4436,7 +4433,7 @@ static void CL_SendClientCmd(void)
|
||||||
localtextcmd3[0] = 0;
|
localtextcmd3[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send extra data if needed for player 4 (splitscreen4)
|
// Send extra data if needed for player 4 (splitscreen == 3)
|
||||||
if (localtextcmd4[0])
|
if (localtextcmd4[0])
|
||||||
{
|
{
|
||||||
netbuffer->packettype = PT_TEXTCMD4;
|
netbuffer->packettype = PT_TEXTCMD4;
|
||||||
|
@ -4576,13 +4573,13 @@ static void Local_Maketic(INT32 realtics)
|
||||||
if (!dedicated) rendergametic = gametic;
|
if (!dedicated) rendergametic = gametic;
|
||||||
// translate inputs (keyboard/mouse/joystick) into game controls
|
// translate inputs (keyboard/mouse/joystick) into game controls
|
||||||
G_BuildTiccmd(&localcmds, realtics, 1);
|
G_BuildTiccmd(&localcmds, realtics, 1);
|
||||||
if ((splitscreen || splitscreen3 || splitscreen4) || botingame)
|
if (splitscreen || botingame)
|
||||||
{
|
{
|
||||||
G_BuildTiccmd(&localcmds2, realtics, 2);
|
G_BuildTiccmd(&localcmds2, realtics, 2);
|
||||||
if (splitscreen3 || splitscreen4)
|
if (splitscreen > 1)
|
||||||
{
|
{
|
||||||
G_BuildTiccmd(&localcmds3, realtics, 3);
|
G_BuildTiccmd(&localcmds3, realtics, 3);
|
||||||
if (splitscreen4)
|
if (splitscreen > 2)
|
||||||
G_BuildTiccmd(&localcmds4, realtics, 4);
|
G_BuildTiccmd(&localcmds4, realtics, 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,7 +113,7 @@ typedef struct
|
||||||
ticcmd_t cmd, cmd2;
|
ticcmd_t cmd, cmd2;
|
||||||
} ATTRPACK client2cmd_pak;
|
} ATTRPACK client2cmd_pak;
|
||||||
|
|
||||||
// Splitscreen3 packet
|
// 3P Splitscreen packet
|
||||||
// WARNING: must have the same format of clientcmd_pak, for more easy use
|
// WARNING: must have the same format of clientcmd_pak, for more easy use
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -123,7 +123,7 @@ typedef struct
|
||||||
ticcmd_t cmd, cmd2, cmd3;
|
ticcmd_t cmd, cmd2, cmd3;
|
||||||
} ATTRPACK client3cmd_pak;
|
} ATTRPACK client3cmd_pak;
|
||||||
|
|
||||||
// Splitscreen4 packet
|
// 4P Splitscreen packet
|
||||||
// WARNING: must have the same format of clientcmd_pak, for more easy use
|
// WARNING: must have the same format of clientcmd_pak, for more easy use
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|
26
src/d_main.c
26
src/d_main.c
|
@ -404,7 +404,7 @@ static void D_Display(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
// render the second screen
|
// render the second screen
|
||||||
if ((splitscreen || splitscreen3 || splitscreen4) && players[secondarydisplayplayer].mo)
|
if (splitscreen && players[secondarydisplayplayer].mo)
|
||||||
{
|
{
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
if (rendermode != render_soft)
|
if (rendermode != render_soft)
|
||||||
|
@ -413,7 +413,7 @@ static void D_Display(void)
|
||||||
#endif
|
#endif
|
||||||
if (rendermode != render_none)
|
if (rendermode != render_none)
|
||||||
{
|
{
|
||||||
if (splitscreen3 || splitscreen4)
|
if (splitscreen > 1)
|
||||||
{
|
{
|
||||||
viewwindowx = viewwidth;
|
viewwindowx = viewwidth;
|
||||||
viewwindowy = 0;
|
viewwindowy = 0;
|
||||||
|
@ -436,7 +436,7 @@ static void D_Display(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
// render the third screen
|
// render the third screen
|
||||||
if ((splitscreen3 || splitscreen4) && players[thirddisplayplayer].mo)
|
if (splitscreen > 1 && players[thirddisplayplayer].mo)
|
||||||
{
|
{
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
if (rendermode != render_soft)
|
if (rendermode != render_soft)
|
||||||
|
@ -458,9 +458,7 @@ static void D_Display(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (splitscreen3) // Fill up the fourth screen in 3P mode so you aren't gazing into the abyss :V
|
if (splitscreen > 2 && players[fourthdisplayplayer].mo) // render the fourth screen
|
||||||
//V_DrawFill(viewwidth, viewheight, viewwidth, viewheight, 31);
|
|
||||||
if (splitscreen4 && players[fourthdisplayplayer].mo) // render the fourth screen
|
|
||||||
{
|
{
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
if (rendermode != render_soft)
|
if (rendermode != render_soft)
|
||||||
|
@ -695,14 +693,14 @@ void D_SRB2Loop(void)
|
||||||
// Lagless camera! Yay!
|
// Lagless camera! Yay!
|
||||||
if (gamestate == GS_LEVEL && netgame)
|
if (gamestate == GS_LEVEL && netgame)
|
||||||
{
|
{
|
||||||
if ((splitscreen || splitscreen3 || splitscreen4) && camera2.chase)
|
|
||||||
P_MoveChaseCamera(&players[secondarydisplayplayer], &camera2, false);
|
|
||||||
if ((splitscreen3 || splitscreen4) && camera3.chase)
|
|
||||||
P_MoveChaseCamera(&players[thirddisplayplayer], &camera3, false);
|
|
||||||
if (splitscreen4 && camera4.chase)
|
|
||||||
P_MoveChaseCamera(&players[fourthdisplayplayer], &camera4, false);
|
|
||||||
if (camera.chase)
|
if (camera.chase)
|
||||||
P_MoveChaseCamera(&players[displayplayer], &camera, false);
|
P_MoveChaseCamera(&players[displayplayer], &camera, false);
|
||||||
|
if (splitscreen && camera2.chase)
|
||||||
|
P_MoveChaseCamera(&players[secondarydisplayplayer], &camera2, false);
|
||||||
|
if (splitscreen > 1 && camera3.chase)
|
||||||
|
P_MoveChaseCamera(&players[thirddisplayplayer], &camera3, false);
|
||||||
|
if (splitscreen > 2 && camera4.chase)
|
||||||
|
P_MoveChaseCamera(&players[fourthdisplayplayer], &camera4, false);
|
||||||
}
|
}
|
||||||
D_Display();
|
D_Display();
|
||||||
|
|
||||||
|
@ -776,9 +774,7 @@ void D_StartTitle(void)
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
CL_ClearPlayer(i);
|
CL_ClearPlayer(i);
|
||||||
|
|
||||||
splitscreen = false;
|
splitscreen = 0;
|
||||||
splitscreen3 = false;
|
|
||||||
splitscreen4 = false;
|
|
||||||
SplitScreen_OnChange();
|
SplitScreen_OnChange();
|
||||||
botingame = false;
|
botingame = false;
|
||||||
botskin = 0;
|
botskin = 0;
|
||||||
|
|
|
@ -36,8 +36,8 @@ extern INT64 sendbytes; // Realtime updated
|
||||||
|
|
||||||
extern SINT8 nodetoplayer[MAXNETNODES];
|
extern SINT8 nodetoplayer[MAXNETNODES];
|
||||||
extern SINT8 nodetoplayer2[MAXNETNODES]; // Say the numplayer for this node if any (splitscreen)
|
extern SINT8 nodetoplayer2[MAXNETNODES]; // Say the numplayer for this node if any (splitscreen)
|
||||||
extern SINT8 nodetoplayer3[MAXNETNODES]; // Say the numplayer for this node if any (splitscreen3)
|
extern SINT8 nodetoplayer3[MAXNETNODES]; // Say the numplayer for this node if any (splitscreen == 2)
|
||||||
extern SINT8 nodetoplayer4[MAXNETNODES]; // Say the numplayer for this node if any (splitscreen4)
|
extern SINT8 nodetoplayer4[MAXNETNODES]; // Say the numplayer for this node if any (splitscreen == 3)
|
||||||
extern UINT8 playerpernode[MAXNETNODES]; // Used specially for splitscreen
|
extern UINT8 playerpernode[MAXNETNODES]; // Used specially for splitscreen
|
||||||
extern boolean nodeingame[MAXNETNODES]; // Set false as nodes leave game
|
extern boolean nodeingame[MAXNETNODES]; // Set false as nodes leave game
|
||||||
|
|
||||||
|
|
|
@ -433,9 +433,7 @@ consvar_t cv_mute = {"mute", "Off", CV_NETVAR|CV_CALL, CV_OnOff, Mute_OnChange,
|
||||||
consvar_t cv_sleep = {"cpusleep", "-1", CV_SAVE, sleeping_cons_t, NULL, -1, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_sleep = {"cpusleep", "-1", CV_SAVE, sleeping_cons_t, NULL, -1, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
INT16 gametype = GT_RACE; // SRB2kart
|
INT16 gametype = GT_RACE; // SRB2kart
|
||||||
boolean splitscreen = false;
|
UINT8 splitscreen = 0;
|
||||||
boolean splitscreen3 = false;
|
|
||||||
boolean splitscreen4 = false;
|
|
||||||
boolean circuitmap = true; // SRB2kart
|
boolean circuitmap = true; // SRB2kart
|
||||||
INT32 adminplayers[MAXPLAYERS];
|
INT32 adminplayers[MAXPLAYERS];
|
||||||
|
|
||||||
|
@ -1306,7 +1304,7 @@ static void SendNameAndColor2(void)
|
||||||
{
|
{
|
||||||
INT32 secondplaya;
|
INT32 secondplaya;
|
||||||
|
|
||||||
if (!(splitscreen || splitscreen3 || splitscreen4) && !botingame)
|
if (!splitscreen && !botingame)
|
||||||
return; // can happen if skin2/color2/name2 changed
|
return; // can happen if skin2/color2/name2 changed
|
||||||
|
|
||||||
if (secondarydisplayplayer != consoleplayer)
|
if (secondarydisplayplayer != consoleplayer)
|
||||||
|
@ -1403,7 +1401,7 @@ static void SendNameAndColor3(void)
|
||||||
{
|
{
|
||||||
INT32 thirdplaya;
|
INT32 thirdplaya;
|
||||||
|
|
||||||
if (!(splitscreen3 || splitscreen4))
|
if (splitscreen < 2)
|
||||||
return; // can happen if skin3/color3/name3 changed
|
return; // can happen if skin3/color3/name3 changed
|
||||||
|
|
||||||
if (thirddisplayplayer != consoleplayer)
|
if (thirddisplayplayer != consoleplayer)
|
||||||
|
@ -1492,7 +1490,7 @@ static void SendNameAndColor4(void)
|
||||||
{
|
{
|
||||||
INT32 fourthplaya;
|
INT32 fourthplaya;
|
||||||
|
|
||||||
if (!splitscreen4)
|
if (splitscreen < 3)
|
||||||
return; // can happen if skin4/color4/name4 changed
|
return; // can happen if skin4/color4/name4 changed
|
||||||
|
|
||||||
if (fourthdisplayplayer != consoleplayer)
|
if (fourthdisplayplayer != consoleplayer)
|
||||||
|
@ -1735,18 +1733,18 @@ static void Got_WeaponPref(UINT8 **cp,INT32 playernum)
|
||||||
void D_SendPlayerConfig(void)
|
void D_SendPlayerConfig(void)
|
||||||
{
|
{
|
||||||
SendNameAndColor();
|
SendNameAndColor();
|
||||||
if ((splitscreen || splitscreen3 || splitscreen4) || botingame)
|
if (splitscreen || botingame)
|
||||||
SendNameAndColor2();
|
SendNameAndColor2();
|
||||||
if (splitscreen3 || splitscreen4)
|
if (splitscreen > 1)
|
||||||
SendNameAndColor3();
|
SendNameAndColor3();
|
||||||
if (splitscreen4)
|
if (splitscreen > 2)
|
||||||
SendNameAndColor4();
|
SendNameAndColor4();
|
||||||
SendWeaponPref();
|
SendWeaponPref();
|
||||||
if (splitscreen || splitscreen3 || splitscreen4)
|
if (splitscreen)
|
||||||
SendWeaponPref2();
|
SendWeaponPref2();
|
||||||
if (splitscreen3 || splitscreen4)
|
if (splitscreen > 1)
|
||||||
SendWeaponPref3();
|
SendWeaponPref3();
|
||||||
if (splitscreen4)
|
if (splitscreen > 2)
|
||||||
SendWeaponPref4();
|
SendWeaponPref4();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4383,9 +4381,7 @@ void Command_ExitGame_f(void)
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
CL_ClearPlayer(i);
|
CL_ClearPlayer(i);
|
||||||
|
|
||||||
splitscreen = false;
|
splitscreen = 0;
|
||||||
splitscreen3 = false;
|
|
||||||
splitscreen4 = false;
|
|
||||||
SplitScreen_OnChange();
|
SplitScreen_OnChange();
|
||||||
botingame = false;
|
botingame = false;
|
||||||
botskin = 0;
|
botskin = 0;
|
||||||
|
@ -4634,7 +4630,7 @@ static void Skin_OnChange(void)
|
||||||
*/
|
*/
|
||||||
static void Skin2_OnChange(void)
|
static void Skin2_OnChange(void)
|
||||||
{
|
{
|
||||||
if (!Playing() || !(splitscreen || splitscreen3 || splitscreen4))
|
if (!Playing() || !splitscreen)
|
||||||
return; // do whatever you want
|
return; // do whatever you want
|
||||||
|
|
||||||
if (CanChangeSkin(secondarydisplayplayer) && !P_PlayerMoving(secondarydisplayplayer))
|
if (CanChangeSkin(secondarydisplayplayer) && !P_PlayerMoving(secondarydisplayplayer))
|
||||||
|
@ -4648,7 +4644,7 @@ static void Skin2_OnChange(void)
|
||||||
|
|
||||||
static void Skin3_OnChange(void)
|
static void Skin3_OnChange(void)
|
||||||
{
|
{
|
||||||
if (!Playing() || !(splitscreen3 || splitscreen4))
|
if (!Playing() || splitscreen < 2)
|
||||||
return; // do whatever you want
|
return; // do whatever you want
|
||||||
|
|
||||||
if (CanChangeSkin(thirddisplayplayer) && !P_PlayerMoving(thirddisplayplayer))
|
if (CanChangeSkin(thirddisplayplayer) && !P_PlayerMoving(thirddisplayplayer))
|
||||||
|
@ -4662,7 +4658,7 @@ static void Skin3_OnChange(void)
|
||||||
|
|
||||||
static void Skin4_OnChange(void)
|
static void Skin4_OnChange(void)
|
||||||
{
|
{
|
||||||
if (!Playing() || !splitscreen4)
|
if (!Playing() || splitscreen < 3)
|
||||||
return; // do whatever you want
|
return; // do whatever you want
|
||||||
|
|
||||||
if (CanChangeSkin(fourthdisplayplayer) && !P_PlayerMoving(fourthdisplayplayer))
|
if (CanChangeSkin(fourthdisplayplayer) && !P_PlayerMoving(fourthdisplayplayer))
|
||||||
|
@ -4708,7 +4704,7 @@ static void Color_OnChange(void)
|
||||||
*/
|
*/
|
||||||
static void Color2_OnChange(void)
|
static void Color2_OnChange(void)
|
||||||
{
|
{
|
||||||
if (!Playing() || !(splitscreen || splitscreen3 || splitscreen4))
|
if (!Playing() || !splitscreen)
|
||||||
return; // do whatever you want
|
return; // do whatever you want
|
||||||
|
|
||||||
if (!P_PlayerMoving(secondarydisplayplayer))
|
if (!P_PlayerMoving(secondarydisplayplayer))
|
||||||
|
@ -4725,7 +4721,7 @@ static void Color2_OnChange(void)
|
||||||
|
|
||||||
static void Color3_OnChange(void)
|
static void Color3_OnChange(void)
|
||||||
{
|
{
|
||||||
if (!Playing() || !(splitscreen3 || splitscreen4))
|
if (!Playing() || splitscreen < 2)
|
||||||
return; // do whatever you want
|
return; // do whatever you want
|
||||||
|
|
||||||
if (!P_PlayerMoving(thirddisplayplayer))
|
if (!P_PlayerMoving(thirddisplayplayer))
|
||||||
|
@ -4742,7 +4738,7 @@ static void Color3_OnChange(void)
|
||||||
|
|
||||||
static void Color4_OnChange(void)
|
static void Color4_OnChange(void)
|
||||||
{
|
{
|
||||||
if (!Playing() || !splitscreen4)
|
if (!Playing() || splitscreen < 3)
|
||||||
return; // do whatever you want
|
return; // do whatever you want
|
||||||
|
|
||||||
if (!P_PlayerMoving(fourthdisplayplayer))
|
if (!P_PlayerMoving(fourthdisplayplayer))
|
||||||
|
|
|
@ -8756,13 +8756,7 @@ static inline int lib_getenum(lua_State *L)
|
||||||
lua_pushboolean(L, modeattacking);
|
lua_pushboolean(L, modeattacking);
|
||||||
return 1;
|
return 1;
|
||||||
} else if (fastcmp(word,"splitscreen")) {
|
} else if (fastcmp(word,"splitscreen")) {
|
||||||
lua_pushboolean(L, splitscreen);
|
lua_pushinteger(L, splitscreen);
|
||||||
return 1;
|
|
||||||
} else if (fastcmp(word,"splitscreen3")) {
|
|
||||||
lua_pushboolean(L, splitscreen3);
|
|
||||||
return 1;
|
|
||||||
} else if (fastcmp(word,"splitscreen4")) {
|
|
||||||
lua_pushboolean(L, splitscreen4);
|
|
||||||
return 1;
|
return 1;
|
||||||
} else if (fastcmp(word,"gamecomplete")) {
|
} else if (fastcmp(word,"gamecomplete")) {
|
||||||
lua_pushboolean(L, gamecomplete);
|
lua_pushboolean(L, gamecomplete);
|
||||||
|
|
|
@ -77,9 +77,7 @@ extern boolean addedtogame; // true after the server has added you
|
||||||
extern boolean multiplayer;
|
extern boolean multiplayer;
|
||||||
|
|
||||||
extern INT16 gametype;
|
extern INT16 gametype;
|
||||||
extern boolean splitscreen;
|
extern UINT8 splitscreen;
|
||||||
extern boolean splitscreen3;
|
|
||||||
extern boolean splitscreen4;
|
|
||||||
extern boolean circuitmap; // Does this level have 'circuit mode'?
|
extern boolean circuitmap; // Does this level have 'circuit mode'?
|
||||||
extern boolean fromlevelselect;
|
extern boolean fromlevelselect;
|
||||||
|
|
||||||
|
|
114
src/g_game.c
114
src/g_game.c
|
@ -1703,7 +1703,7 @@ static void Analog_OnChange(void)
|
||||||
|
|
||||||
static void Analog2_OnChange(void)
|
static void Analog2_OnChange(void)
|
||||||
{
|
{
|
||||||
if (!((splitscreen || splitscreen3 || splitscreen4) || botingame) || !cv_cam2_dist.string)
|
if (!(splitscreen || botingame) || !cv_cam2_dist.string)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// cameras are not initialized at this point
|
// cameras are not initialized at this point
|
||||||
|
@ -1723,7 +1723,7 @@ static void Analog2_OnChange(void)
|
||||||
|
|
||||||
static void Analog3_OnChange(void)
|
static void Analog3_OnChange(void)
|
||||||
{
|
{
|
||||||
if (!(splitscreen3 || splitscreen4) || !cv_cam3_dist.string)
|
if (splitscreen < 2 || !cv_cam3_dist.string)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// cameras are not initialized at this point
|
// cameras are not initialized at this point
|
||||||
|
@ -1743,7 +1743,7 @@ static void Analog3_OnChange(void)
|
||||||
|
|
||||||
static void Analog4_OnChange(void)
|
static void Analog4_OnChange(void)
|
||||||
{
|
{
|
||||||
if (!(splitscreen4) || !cv_cam4_dist.string)
|
if (splitscreen < 3 || !cv_cam4_dist.string)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// cameras are not initialized at this point
|
// cameras are not initialized at this point
|
||||||
|
@ -1799,11 +1799,11 @@ void G_DoLoadLevel(boolean resetplayer)
|
||||||
P_FindEmerald();
|
P_FindEmerald();
|
||||||
|
|
||||||
displayplayer = consoleplayer; // view the guy you are playing
|
displayplayer = consoleplayer; // view the guy you are playing
|
||||||
if (!(splitscreen || splitscreen3 || splitscreen4) && !botingame)
|
if (!splitscreen && !botingame)
|
||||||
secondarydisplayplayer = consoleplayer;
|
secondarydisplayplayer = consoleplayer;
|
||||||
if (!(splitscreen3 || splitscreen4))
|
if (splitscreen < 2)
|
||||||
thirddisplayplayer = consoleplayer;
|
thirddisplayplayer = consoleplayer;
|
||||||
if (!splitscreen4)
|
if (splitscreen < 3)
|
||||||
fourthdisplayplayer = consoleplayer;
|
fourthdisplayplayer = consoleplayer;
|
||||||
|
|
||||||
gameaction = ga_nothing;
|
gameaction = ga_nothing;
|
||||||
|
@ -1813,11 +1813,11 @@ void G_DoLoadLevel(boolean resetplayer)
|
||||||
|
|
||||||
if (camera.chase)
|
if (camera.chase)
|
||||||
P_ResetCamera(&players[displayplayer], &camera);
|
P_ResetCamera(&players[displayplayer], &camera);
|
||||||
if (camera2.chase && (splitscreen || splitscreen3 || splitscreen4))
|
if (camera2.chase && splitscreen)
|
||||||
P_ResetCamera(&players[secondarydisplayplayer], &camera2);
|
P_ResetCamera(&players[secondarydisplayplayer], &camera2);
|
||||||
if (camera3.chase && (splitscreen3 || splitscreen4))
|
if (camera3.chase && splitscreen > 1)
|
||||||
P_ResetCamera(&players[thirddisplayplayer], &camera3);
|
P_ResetCamera(&players[thirddisplayplayer], &camera3);
|
||||||
if (camera4.chase && splitscreen4)
|
if (camera4.chase && splitscreen > 2)
|
||||||
P_ResetCamera(&players[fourthdisplayplayer], &camera4);
|
P_ResetCamera(&players[fourthdisplayplayer], &camera4);
|
||||||
|
|
||||||
// clear cmd building stuff
|
// clear cmd building stuff
|
||||||
|
@ -1848,7 +1848,7 @@ boolean G_Responder(event_t *ev)
|
||||||
// allow spy mode changes even during the demo
|
// allow spy mode changes even during the demo
|
||||||
if (gamestate == GS_LEVEL && ev->type == ev_keydown && ev->data1 == KEY_F12)
|
if (gamestate == GS_LEVEL && ev->type == ev_keydown && ev->data1 == KEY_F12)
|
||||||
{
|
{
|
||||||
if ((splitscreen || splitscreen3 || splitscreen4) || !netgame)
|
if (splitscreen || !netgame)
|
||||||
displayplayer = consoleplayer;
|
displayplayer = consoleplayer;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2595,18 +2595,18 @@ void G_SpawnPlayer(INT32 playernum, boolean starpost)
|
||||||
if (nummapthings)
|
if (nummapthings)
|
||||||
{
|
{
|
||||||
if (playernum == consoleplayer
|
if (playernum == consoleplayer
|
||||||
|| ((splitscreen || splitscreen3 || splitscreen4) && playernum == secondarydisplayplayer)
|
|| (splitscreen && playernum == secondarydisplayplayer)
|
||||||
|| ((splitscreen3 || splitscreen4) && playernum == thirddisplayplayer)
|
|| (splitscreen > 1 && playernum == thirddisplayplayer)
|
||||||
|| (splitscreen4 && playernum == fourthdisplayplayer))
|
|| (splitscreen > 2 && playernum == fourthdisplayplayer))
|
||||||
CONS_Alert(CONS_ERROR, M_GetText("No player spawns found, spawning at the first mapthing!\n"));
|
CONS_Alert(CONS_ERROR, M_GetText("No player spawns found, spawning at the first mapthing!\n"));
|
||||||
spawnpoint = &mapthings[0];
|
spawnpoint = &mapthings[0];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (playernum == consoleplayer
|
if (playernum == consoleplayer
|
||||||
|| ((splitscreen || splitscreen3 || splitscreen4) && playernum == secondarydisplayplayer)
|
|| (splitscreen && playernum == secondarydisplayplayer)
|
||||||
|| ((splitscreen3 || splitscreen4) && playernum == thirddisplayplayer)
|
|| (splitscreen > 1 && playernum == thirddisplayplayer)
|
||||||
|| (splitscreen4 && playernum == fourthdisplayplayer))
|
|| (splitscreen > 2 && playernum == fourthdisplayplayer))
|
||||||
CONS_Alert(CONS_ERROR, M_GetText("No player spawns found, spawning at the origin!\n"));
|
CONS_Alert(CONS_ERROR, M_GetText("No player spawns found, spawning at the origin!\n"));
|
||||||
//P_MovePlayerToSpawn handles this fine if the spawnpoint is NULL.
|
//P_MovePlayerToSpawn handles this fine if the spawnpoint is NULL.
|
||||||
}
|
}
|
||||||
|
@ -2626,9 +2626,9 @@ mapthing_t *G_FindCTFStart(INT32 playernum)
|
||||||
if (!numredctfstarts && !numbluectfstarts) //why even bother, eh?
|
if (!numredctfstarts && !numbluectfstarts) //why even bother, eh?
|
||||||
{
|
{
|
||||||
if (playernum == consoleplayer
|
if (playernum == consoleplayer
|
||||||
|| ((splitscreen || splitscreen3 || splitscreen4) && playernum == secondarydisplayplayer)
|
|| (splitscreen && playernum == secondarydisplayplayer)
|
||||||
|| ((splitscreen3 || splitscreen4) && playernum == thirddisplayplayer)
|
|| (splitscreen > 1 && playernum == thirddisplayplayer)
|
||||||
|| (splitscreen4 && playernum == fourthdisplayplayer))
|
|| (splitscreen > 2 && playernum == fourthdisplayplayer))
|
||||||
CONS_Alert(CONS_WARNING, M_GetText("No CTF starts in this map!\n"));
|
CONS_Alert(CONS_WARNING, M_GetText("No CTF starts in this map!\n"));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -2638,9 +2638,9 @@ mapthing_t *G_FindCTFStart(INT32 playernum)
|
||||||
if (!numredctfstarts)
|
if (!numredctfstarts)
|
||||||
{
|
{
|
||||||
if (playernum == consoleplayer
|
if (playernum == consoleplayer
|
||||||
|| ((splitscreen || splitscreen3 || splitscreen4) && playernum == secondarydisplayplayer)
|
|| (splitscreen && playernum == secondarydisplayplayer)
|
||||||
|| ((splitscreen3 || splitscreen4) && playernum == thirddisplayplayer)
|
|| (splitscreen > 1 && playernum == thirddisplayplayer)
|
||||||
|| (splitscreen4 && playernum == fourthdisplayplayer))
|
|| (splitscreen > 2 && playernum == fourthdisplayplayer))
|
||||||
CONS_Alert(CONS_WARNING, M_GetText("No Red Team starts in this map!\n"));
|
CONS_Alert(CONS_WARNING, M_GetText("No Red Team starts in this map!\n"));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -2653,9 +2653,9 @@ mapthing_t *G_FindCTFStart(INT32 playernum)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playernum == consoleplayer
|
if (playernum == consoleplayer
|
||||||
|| ((splitscreen || splitscreen3 || splitscreen4) && playernum == secondarydisplayplayer)
|
|| (splitscreen && playernum == secondarydisplayplayer)
|
||||||
|| ((splitscreen3 || splitscreen4) && playernum == thirddisplayplayer)
|
|| (splitscreen > 1 && playernum == thirddisplayplayer)
|
||||||
|| (splitscreen4 && playernum == fourthdisplayplayer))
|
|| (splitscreen > 2 && playernum == fourthdisplayplayer))
|
||||||
CONS_Alert(CONS_WARNING, M_GetText("Could not spawn at any Red Team starts!\n"));
|
CONS_Alert(CONS_WARNING, M_GetText("Could not spawn at any Red Team starts!\n"));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -2664,9 +2664,9 @@ mapthing_t *G_FindCTFStart(INT32 playernum)
|
||||||
if (!numbluectfstarts)
|
if (!numbluectfstarts)
|
||||||
{
|
{
|
||||||
if (playernum == consoleplayer
|
if (playernum == consoleplayer
|
||||||
|| ((splitscreen || splitscreen3 || splitscreen4) && playernum == secondarydisplayplayer)
|
|| (splitscreen && playernum == secondarydisplayplayer)
|
||||||
|| ((splitscreen3 || splitscreen4) && playernum == thirddisplayplayer)
|
|| (splitscreen > 1 && playernum == thirddisplayplayer)
|
||||||
|| (splitscreen4 && playernum == fourthdisplayplayer))
|
|| (splitscreen > 2 && playernum == fourthdisplayplayer))
|
||||||
CONS_Alert(CONS_WARNING, M_GetText("No Blue Team starts in this map!\n"));
|
CONS_Alert(CONS_WARNING, M_GetText("No Blue Team starts in this map!\n"));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -2678,9 +2678,9 @@ mapthing_t *G_FindCTFStart(INT32 playernum)
|
||||||
return bluectfstarts[i];
|
return bluectfstarts[i];
|
||||||
}
|
}
|
||||||
if (playernum == consoleplayer
|
if (playernum == consoleplayer
|
||||||
|| ((splitscreen || splitscreen3 || splitscreen4) && playernum == secondarydisplayplayer)
|
|| (splitscreen && playernum == secondarydisplayplayer)
|
||||||
|| ((splitscreen3 || splitscreen4) && playernum == thirddisplayplayer)
|
|| (splitscreen > 1 && playernum == thirddisplayplayer)
|
||||||
|| (splitscreen4 && playernum == fourthdisplayplayer))
|
|| (splitscreen > 2 && playernum == fourthdisplayplayer))
|
||||||
CONS_Alert(CONS_WARNING, M_GetText("Could not spawn at any Blue Team starts!\n"));
|
CONS_Alert(CONS_WARNING, M_GetText("Could not spawn at any Blue Team starts!\n"));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -2701,17 +2701,17 @@ mapthing_t *G_FindMatchStart(INT32 playernum)
|
||||||
return deathmatchstarts[i];
|
return deathmatchstarts[i];
|
||||||
}
|
}
|
||||||
if (playernum == consoleplayer
|
if (playernum == consoleplayer
|
||||||
|| ((splitscreen || splitscreen3 || splitscreen4) && playernum == secondarydisplayplayer)
|
|| (splitscreen && playernum == secondarydisplayplayer)
|
||||||
|| ((splitscreen3 || splitscreen4) && playernum == thirddisplayplayer)
|
|| (splitscreen > 1 && playernum == thirddisplayplayer)
|
||||||
|| (splitscreen4 && playernum == fourthdisplayplayer))
|
|| (splitscreen > 2 && playernum == fourthdisplayplayer))
|
||||||
CONS_Alert(CONS_WARNING, M_GetText("Could not spawn at any Deathmatch starts!\n"));
|
CONS_Alert(CONS_WARNING, M_GetText("Could not spawn at any Deathmatch starts!\n"));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playernum == consoleplayer
|
if (playernum == consoleplayer
|
||||||
|| ((splitscreen || splitscreen3 || splitscreen4) && playernum == secondarydisplayplayer)
|
|| (splitscreen && playernum == secondarydisplayplayer)
|
||||||
|| ((splitscreen3 || splitscreen4) && playernum == thirddisplayplayer)
|
|| (splitscreen > 1 && playernum == thirddisplayplayer)
|
||||||
|| (splitscreen4 && playernum == fourthdisplayplayer))
|
|| (splitscreen > 2 && playernum == fourthdisplayplayer))
|
||||||
CONS_Alert(CONS_WARNING, M_GetText("No Deathmatch starts in this map!\n"));
|
CONS_Alert(CONS_WARNING, M_GetText("No Deathmatch starts in this map!\n"));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -2730,9 +2730,9 @@ mapthing_t *G_FindCoopStart(INT32 playernum)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playernum == consoleplayer
|
if (playernum == consoleplayer
|
||||||
|| ((splitscreen || splitscreen3 || splitscreen4) && playernum == secondarydisplayplayer)
|
|| (splitscreen && playernum == secondarydisplayplayer)
|
||||||
|| ((splitscreen3 || splitscreen4) && playernum == thirddisplayplayer)
|
|| (splitscreen > 1 && playernum == thirddisplayplayer)
|
||||||
|| (splitscreen4 && playernum == fourthdisplayplayer))
|
|| (splitscreen > 2 && playernum == fourthdisplayplayer))
|
||||||
CONS_Alert(CONS_WARNING, M_GetText("No Co-op starts in this map!\n"));
|
CONS_Alert(CONS_WARNING, M_GetText("No Co-op starts in this map!\n"));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -2829,11 +2829,11 @@ void G_DoReborn(INT32 playernum)
|
||||||
|
|
||||||
if (camera.chase)
|
if (camera.chase)
|
||||||
P_ResetCamera(&players[displayplayer], &camera);
|
P_ResetCamera(&players[displayplayer], &camera);
|
||||||
if (camera2.chase && (splitscreen || splitscreen3 || splitscreen4))
|
if (camera2.chase && splitscreen > 0)
|
||||||
P_ResetCamera(&players[secondarydisplayplayer], &camera2);
|
P_ResetCamera(&players[secondarydisplayplayer], &camera2);
|
||||||
if (camera3.chase && (splitscreen3 || splitscreen4))
|
if (camera3.chase && splitscreen > 1)
|
||||||
P_ResetCamera(&players[thirddisplayplayer], &camera3);
|
P_ResetCamera(&players[thirddisplayplayer], &camera3);
|
||||||
if (camera4.chase && splitscreen4)
|
if (camera4.chase && splitscreen > 2)
|
||||||
P_ResetCamera(&players[fourthdisplayplayer], &camera4);
|
P_ResetCamera(&players[fourthdisplayplayer], &camera4);
|
||||||
|
|
||||||
// clear cmd building stuff
|
// clear cmd building stuff
|
||||||
|
@ -3645,7 +3645,8 @@ static void M_ForceLoadGameResponse(INT32 ch)
|
||||||
cursaveslot = -1;
|
cursaveslot = -1;
|
||||||
|
|
||||||
displayplayer = consoleplayer;
|
displayplayer = consoleplayer;
|
||||||
multiplayer = splitscreen = splitscreen3 = splitscreen4 = false;
|
multiplayer = false;
|
||||||
|
splitscreen = 0;
|
||||||
|
|
||||||
if (setsizeneeded)
|
if (setsizeneeded)
|
||||||
R_ExecuteSetViewSize();
|
R_ExecuteSetViewSize();
|
||||||
|
@ -3733,7 +3734,8 @@ void G_LoadGame(UINT32 slot, INT16 mapoverride)
|
||||||
// gameaction = ga_nothing;
|
// gameaction = ga_nothing;
|
||||||
// G_SetGamestate(GS_LEVEL);
|
// G_SetGamestate(GS_LEVEL);
|
||||||
displayplayer = consoleplayer;
|
displayplayer = consoleplayer;
|
||||||
multiplayer = splitscreen = splitscreen3 = splitscreen4 = false;
|
multiplayer = false;
|
||||||
|
splitscreen = 0;
|
||||||
|
|
||||||
// G_DeferedInitNew(sk_medium, G_BuildMapName(1), 0, 0, 1);
|
// G_DeferedInitNew(sk_medium, G_BuildMapName(1), 0, 0, 1);
|
||||||
if (setsizeneeded)
|
if (setsizeneeded)
|
||||||
|
@ -3816,27 +3818,9 @@ void G_DeferedInitNew(boolean pultmode, const char *mapname, INT32 pickedchar, U
|
||||||
botcolor = savedata.botcolor;
|
botcolor = savedata.botcolor;
|
||||||
botingame = (botskin != 0);
|
botingame = (botskin != 0);
|
||||||
}
|
}
|
||||||
else if (!splitscreen4 && ssplayers == 4)
|
else if (splitscreen != ssplayers)
|
||||||
{
|
{
|
||||||
splitscreen4 = true;
|
splitscreen = ssplayers;
|
||||||
splitscreen = splitscreen3 = false;
|
|
||||||
SplitScreen_OnChange();
|
|
||||||
}
|
|
||||||
else if (!splitscreen3 && ssplayers == 3)
|
|
||||||
{
|
|
||||||
splitscreen3 = true;
|
|
||||||
splitscreen = splitscreen4 = false;
|
|
||||||
SplitScreen_OnChange();
|
|
||||||
}
|
|
||||||
else if (!splitscreen && ssplayers == 2)
|
|
||||||
{
|
|
||||||
splitscreen = true;
|
|
||||||
splitscreen3 = splitscreen4 = false;
|
|
||||||
SplitScreen_OnChange();
|
|
||||||
}
|
|
||||||
else if ((splitscreen || splitscreen3 || splitscreen4) && ssplayers == 1)
|
|
||||||
{
|
|
||||||
splitscreen = splitscreen3 = splitscreen4 = false;
|
|
||||||
SplitScreen_OnChange();
|
SplitScreen_OnChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ typedef struct
|
||||||
FLOAT anglex,angley; // aimingangle / viewangle
|
FLOAT anglex,angley; // aimingangle / viewangle
|
||||||
FLOAT scalex,scaley,scalez;
|
FLOAT scalex,scaley,scalez;
|
||||||
FLOAT fovxangle, fovyangle;
|
FLOAT fovxangle, fovyangle;
|
||||||
INT32 splitscreen;
|
UINT8 splitscreen;
|
||||||
boolean flip; // screenflip
|
boolean flip; // screenflip
|
||||||
boolean mirror; // SRB2Kart: Mirror Mode
|
boolean mirror; // SRB2Kart: Mirror Mode
|
||||||
} FTransform;
|
} FTransform;
|
||||||
|
|
|
@ -4059,18 +4059,12 @@ static void HWR_DrawSpriteShadow(gr_vissprite_t *spr, GLPatch_t *gpatch, float t
|
||||||
angle_t shadowdir;
|
angle_t shadowdir;
|
||||||
|
|
||||||
// Set direction
|
// Set direction
|
||||||
if ((splitscreen || splitscreen3 || splitscreen4) && stplyr == &players[secondarydisplayplayer])
|
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
||||||
{
|
|
||||||
shadowdir = localangle2 + FixedAngle(cv_cam2_rotate.value);
|
shadowdir = localangle2 + FixedAngle(cv_cam2_rotate.value);
|
||||||
|
else if (splitscreen > 1 && stplyr == &players[thirddisplayplayer])
|
||||||
if ((splitscreen3 || splitscreen4) && stplyr == &players[thirddisplayplayer])
|
shadowdir = localangle3 + FixedAngle(cv_cam3_rotate.value);
|
||||||
{
|
else if (splitscreen > 2 && stplyr == &players[fourthdisplayplayer])
|
||||||
shadowdir = localangle3 + FixedAngle(cv_cam3_rotate.value);
|
shadowdir = localangle4 + FixedAngle(cv_cam4_rotate.value);
|
||||||
|
|
||||||
if (splitscreen4 && stplyr == &players[fourthdisplayplayer])
|
|
||||||
shadowdir = localangle4 + FixedAngle(cv_cam4_rotate.value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
shadowdir = localangle + FixedAngle(cv_cam_rotate.value);
|
shadowdir = localangle + FixedAngle(cv_cam_rotate.value);
|
||||||
|
|
||||||
|
@ -5516,10 +5510,10 @@ void HWR_SetViewSize(void)
|
||||||
gr_viewwidth = (float)vid.width;
|
gr_viewwidth = (float)vid.width;
|
||||||
gr_viewheight = (float)vid.height;
|
gr_viewheight = (float)vid.height;
|
||||||
|
|
||||||
if (splitscreen || splitscreen3 || splitscreen4)
|
if (splitscreen)
|
||||||
gr_viewheight /= 2;
|
gr_viewheight /= 2;
|
||||||
|
|
||||||
if (splitscreen3 || splitscreen4)
|
if (splitscreen > 1)
|
||||||
gr_viewwidth /= 2;
|
gr_viewwidth /= 2;
|
||||||
|
|
||||||
gr_basecenterx = gr_viewwidth / 2;
|
gr_basecenterx = gr_viewwidth / 2;
|
||||||
|
@ -5544,11 +5538,11 @@ void HWR_RenderSkyboxView(INT32 viewnumber, player_t *player)
|
||||||
FTransform stransform;
|
FTransform stransform;
|
||||||
postimg_t *type;
|
postimg_t *type;
|
||||||
|
|
||||||
if ((splitscreen || splitscreen3 || splitscreen4) && player == &players[secondarydisplayplayer])
|
if (splitscreen && player == &players[secondarydisplayplayer])
|
||||||
type = &postimgtype2;
|
type = &postimgtype2;
|
||||||
else if ((splitscreen3 || splitscreen4) && player == &players[thirddisplayplayer])
|
else if (splitscreen > 1 && player == &players[thirddisplayplayer])
|
||||||
type = &postimgtype3;
|
type = &postimgtype3;
|
||||||
else if (splitscreen4 && player == &players[fourthdisplayplayer])
|
else if (splitscreen > 2 && player == &players[fourthdisplayplayer])
|
||||||
type = &postimgtype4;
|
type = &postimgtype4;
|
||||||
else
|
else
|
||||||
type = &postimgtype;
|
type = &postimgtype;
|
||||||
|
@ -5581,13 +5575,13 @@ void HWR_RenderSkyboxView(INT32 viewnumber, player_t *player)
|
||||||
gr_viewwindowy = gr_baseviewwindowy;
|
gr_viewwindowy = gr_baseviewwindowy;
|
||||||
gr_windowcentery = gr_basewindowcentery;
|
gr_windowcentery = gr_basewindowcentery;
|
||||||
|
|
||||||
if ((splitscreen && viewnumber == 1) || ((splitscreen3 || splitscreen4) && viewnumber >= 2))
|
if ((splitscreen == 1 && viewnumber == 1) || (splitscreen > 1 && viewnumber > 1))
|
||||||
{
|
{
|
||||||
gr_viewwindowy += gr_viewheight;
|
gr_viewwindowy += gr_viewheight;
|
||||||
gr_windowcentery += gr_viewheight;
|
gr_windowcentery += gr_viewheight;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((splitscreen3 || splitscreen4) && (viewnumber == 1 || viewnumber == 3))
|
if (splitscreen > 1 && viewnumber & 1)
|
||||||
{
|
{
|
||||||
gr_viewwindowx += gr_viewwidth;
|
gr_viewwindowx += gr_viewwidth;
|
||||||
gr_windowcenterx += gr_viewwidth;
|
gr_windowcenterx += gr_viewwidth;
|
||||||
|
@ -5628,15 +5622,7 @@ void HWR_RenderSkyboxView(INT32 viewnumber, player_t *player)
|
||||||
atransform.scalez = 1;
|
atransform.scalez = 1;
|
||||||
atransform.fovxangle = fpov; // Tails
|
atransform.fovxangle = fpov; // Tails
|
||||||
atransform.fovyangle = fpov; // Tails
|
atransform.fovyangle = fpov; // Tails
|
||||||
|
atransform.splitscreen = splitscreen;
|
||||||
if (splitscreen4)
|
|
||||||
atransform.splitscreen = 3;
|
|
||||||
else if (splitscreen3)
|
|
||||||
atransform.splitscreen = 2;
|
|
||||||
else if (splitscreen)
|
|
||||||
atransform.splitscreen = 1;
|
|
||||||
else
|
|
||||||
atransform.splitscreen = 0;
|
|
||||||
|
|
||||||
// Transform for sprites
|
// Transform for sprites
|
||||||
stransform.anglex = 0.0f;
|
stransform.anglex = 0.0f;
|
||||||
|
@ -5660,15 +5646,7 @@ void HWR_RenderSkyboxView(INT32 viewnumber, player_t *player)
|
||||||
stransform.scalez = 1;
|
stransform.scalez = 1;
|
||||||
stransform.fovxangle = 90.0f;
|
stransform.fovxangle = 90.0f;
|
||||||
stransform.fovyangle = 90.0f;
|
stransform.fovyangle = 90.0f;
|
||||||
|
stransform.splitscreen = splitscreen;
|
||||||
if (splitscreen4)
|
|
||||||
stransform.splitscreen = 3;
|
|
||||||
else if (splitscreen3)
|
|
||||||
stransform.splitscreen = 2;
|
|
||||||
else if (splitscreen)
|
|
||||||
stransform.splitscreen = 1;
|
|
||||||
else
|
|
||||||
stransform.splitscreen = 0;
|
|
||||||
|
|
||||||
gr_fovlud = (float)(1.0l/tan((double)(fpov*M_PIl/360l)));
|
gr_fovlud = (float)(1.0l/tan((double)(fpov*M_PIl/360l)));
|
||||||
|
|
||||||
|
@ -5691,7 +5669,7 @@ if (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//Hurdler: it doesn't work in splitscreen mode
|
//Hurdler: it doesn't work in splitscreen mode
|
||||||
drawsky = (splitscreen || splitscreen3 || splitscreen4);
|
drawsky = splitscreen;
|
||||||
|
|
||||||
HWR_ClearSprites();
|
HWR_ClearSprites();
|
||||||
|
|
||||||
|
@ -5711,11 +5689,11 @@ if (0)
|
||||||
// Make a viewangle int so we can render things based on mouselook
|
// Make a viewangle int so we can render things based on mouselook
|
||||||
if (player == &players[consoleplayer])
|
if (player == &players[consoleplayer])
|
||||||
viewangle = localaiming;
|
viewangle = localaiming;
|
||||||
else if ((splitscreen || splitscreen3 || splitscreen4) && player == &players[secondarydisplayplayer])
|
else if (splitscreen && player == &players[secondarydisplayplayer])
|
||||||
viewangle = localaiming2;
|
viewangle = localaiming2;
|
||||||
else if ((splitscreen3 || splitscreen4) && player == &players[thirddisplayplayer])
|
else if (splitscreen > 1 && player == &players[thirddisplayplayer])
|
||||||
viewangle = localaiming3;
|
viewangle = localaiming3;
|
||||||
else if (splitscreen4 && player == &players[fourthdisplayplayer])
|
else if (splitscreen > 2 && player == &players[fourthdisplayplayer])
|
||||||
viewangle = localaiming4;
|
viewangle = localaiming4;
|
||||||
|
|
||||||
// Handle stuff when you are looking farther up or down.
|
// Handle stuff when you are looking farther up or down.
|
||||||
|
@ -5807,11 +5785,11 @@ void HWR_RenderPlayerView(INT32 viewnumber, player_t *player)
|
||||||
|
|
||||||
FRGBAFloat ClearColor;
|
FRGBAFloat ClearColor;
|
||||||
|
|
||||||
if ((splitscreen || splitscreen3 || splitscreen4) && player == &players[secondarydisplayplayer])
|
if (splitscreen && player == &players[secondarydisplayplayer])
|
||||||
type = &postimgtype2;
|
type = &postimgtype2;
|
||||||
else if ((splitscreen3 || splitscreen4) && player == &players[thirddisplayplayer])
|
else if (splitscreen > 1 && player == &players[thirddisplayplayer])
|
||||||
type = &postimgtype3;
|
type = &postimgtype3;
|
||||||
else if (splitscreen4 && player == &players[fourthdisplayplayer])
|
else if (splitscreen > 2 && player == &players[fourthdisplayplayer])
|
||||||
type = &postimgtype4;
|
type = &postimgtype4;
|
||||||
else
|
else
|
||||||
type = &postimgtype;
|
type = &postimgtype;
|
||||||
|
@ -5855,13 +5833,13 @@ void HWR_RenderPlayerView(INT32 viewnumber, player_t *player)
|
||||||
gr_viewwindowy = gr_baseviewwindowy;
|
gr_viewwindowy = gr_baseviewwindowy;
|
||||||
gr_windowcentery = gr_basewindowcentery;
|
gr_windowcentery = gr_basewindowcentery;
|
||||||
|
|
||||||
if ((splitscreen && viewnumber == 1) || ((splitscreen3 || splitscreen4) && viewnumber >= 2))
|
if ((splitscreen == 1 && viewnumber == 1) || (splitscreen > 1 && viewnumber > 1))
|
||||||
{
|
{
|
||||||
gr_viewwindowy += gr_viewheight;
|
gr_viewwindowy += gr_viewheight;
|
||||||
gr_windowcentery += gr_viewheight;
|
gr_windowcentery += gr_viewheight;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((splitscreen3 || splitscreen4) && (viewnumber == 1 || viewnumber == 3))
|
if (splitscreen > 1 && viewnumber & 1)
|
||||||
{
|
{
|
||||||
gr_viewwindowx += gr_viewwidth;
|
gr_viewwindowx += gr_viewwidth;
|
||||||
gr_windowcenterx += gr_viewwidth;
|
gr_windowcenterx += gr_viewwidth;
|
||||||
|
@ -5902,15 +5880,7 @@ void HWR_RenderPlayerView(INT32 viewnumber, player_t *player)
|
||||||
atransform.scalez = 1;
|
atransform.scalez = 1;
|
||||||
atransform.fovxangle = fpov; // Tails
|
atransform.fovxangle = fpov; // Tails
|
||||||
atransform.fovyangle = fpov; // Tails
|
atransform.fovyangle = fpov; // Tails
|
||||||
|
atransform.splitscreen = splitscreen;
|
||||||
if (splitscreen4)
|
|
||||||
atransform.splitscreen = 3;
|
|
||||||
else if (splitscreen3)
|
|
||||||
atransform.splitscreen = 2;
|
|
||||||
else if (splitscreen)
|
|
||||||
atransform.splitscreen = 1;
|
|
||||||
else
|
|
||||||
atransform.splitscreen = 0;
|
|
||||||
|
|
||||||
// Transform for sprites
|
// Transform for sprites
|
||||||
stransform.anglex = 0.0f;
|
stransform.anglex = 0.0f;
|
||||||
|
@ -5934,15 +5904,7 @@ void HWR_RenderPlayerView(INT32 viewnumber, player_t *player)
|
||||||
stransform.scalez = 1;
|
stransform.scalez = 1;
|
||||||
stransform.fovxangle = 90.0f;
|
stransform.fovxangle = 90.0f;
|
||||||
stransform.fovyangle = 90.0f;
|
stransform.fovyangle = 90.0f;
|
||||||
|
stransform.splitscreen = splitscreen;
|
||||||
if (splitscreen4)
|
|
||||||
stransform.splitscreen = 3;
|
|
||||||
else if (splitscreen3)
|
|
||||||
stransform.splitscreen = 2;
|
|
||||||
else if (splitscreen)
|
|
||||||
stransform.splitscreen = 1;
|
|
||||||
else
|
|
||||||
stransform.splitscreen = 0;
|
|
||||||
|
|
||||||
gr_fovlud = (float)(1.0l/tan((double)(fpov*M_PIl/360l)));
|
gr_fovlud = (float)(1.0l/tan((double)(fpov*M_PIl/360l)));
|
||||||
|
|
||||||
|
@ -5965,7 +5927,7 @@ if (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//Hurdler: it doesn't work in splitscreen mode
|
//Hurdler: it doesn't work in splitscreen mode
|
||||||
drawsky = (splitscreen || splitscreen3 || splitscreen4);
|
drawsky = splitscreen;
|
||||||
|
|
||||||
HWR_ClearSprites();
|
HWR_ClearSprites();
|
||||||
|
|
||||||
|
@ -5985,11 +5947,11 @@ if (0)
|
||||||
// Make a viewangle int so we can render things based on mouselook
|
// Make a viewangle int so we can render things based on mouselook
|
||||||
if (player == &players[consoleplayer])
|
if (player == &players[consoleplayer])
|
||||||
viewangle = localaiming;
|
viewangle = localaiming;
|
||||||
else if ((splitscreen || splitscreen3 || splitscreen4) && player == &players[secondarydisplayplayer])
|
else if (splitscreen && player == &players[secondarydisplayplayer])
|
||||||
viewangle = localaiming2;
|
viewangle = localaiming2;
|
||||||
else if ((splitscreen3 || splitscreen4) && player == &players[thirddisplayplayer])
|
else if (splitscreen > 1 && player == &players[thirddisplayplayer])
|
||||||
viewangle = localaiming3;
|
viewangle = localaiming3;
|
||||||
else if (splitscreen4 && player == &players[fourthdisplayplayer])
|
else if (splitscreen > 2 && player == &players[fourthdisplayplayer])
|
||||||
viewangle = localaiming4;
|
viewangle = localaiming4;
|
||||||
|
|
||||||
// Handle stuff when you are looking farther up or down.
|
// Handle stuff when you are looking farther up or down.
|
||||||
|
@ -6477,11 +6439,11 @@ void HWR_DoPostProcessor(player_t *player)
|
||||||
{
|
{
|
||||||
postimg_t *type;
|
postimg_t *type;
|
||||||
|
|
||||||
if (splitscreen4 && player == &players[fourthdisplayplayer])
|
if (splitscreen > 2 && player == &players[fourthdisplayplayer])
|
||||||
type = &postimgtype4;
|
type = &postimgtype4;
|
||||||
else if ((splitscreen3 || splitscreen4) && player == &players[thirddisplayplayer])
|
else if (splitscreen > 1 && player == &players[thirddisplayplayer])
|
||||||
type = &postimgtype3;
|
type = &postimgtype3;
|
||||||
else if ((splitscreen || splitscreen3 || splitscreen4) && player == &players[secondarydisplayplayer])
|
else if (splitscreen && player == &players[secondarydisplayplayer])
|
||||||
type = &postimgtype2;
|
type = &postimgtype2;
|
||||||
else
|
else
|
||||||
type = &postimgtype;
|
type = &postimgtype;
|
||||||
|
@ -6515,7 +6477,7 @@ void HWR_DoPostProcessor(player_t *player)
|
||||||
if(gamestate != GS_INTERMISSION)
|
if(gamestate != GS_INTERMISSION)
|
||||||
HWD.pfnMakeScreenTexture();
|
HWD.pfnMakeScreenTexture();
|
||||||
|
|
||||||
if (splitscreen || splitscreen3 || splitscreen4) // Not supported in splitscreen - someone want to add support?
|
if (splitscreen) // Not supported in splitscreen - someone want to add support?
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef SHUFFLE
|
#ifdef SHUFFLE
|
||||||
|
|
|
@ -2006,7 +2006,7 @@ EXPORT void HWRAPI(DrawMD2) (INT32 *gl_cmd_buffer, md2_frame_t *frame, FTransfor
|
||||||
// -----------------+
|
// -----------------+
|
||||||
EXPORT void HWRAPI(SetTransform) (FTransform *stransform)
|
EXPORT void HWRAPI(SetTransform) (FTransform *stransform)
|
||||||
{
|
{
|
||||||
static INT32 special_splitscreen;
|
static boolean special_splitscreen;
|
||||||
pglLoadIdentity();
|
pglLoadIdentity();
|
||||||
if (stransform)
|
if (stransform)
|
||||||
{
|
{
|
||||||
|
@ -2027,8 +2027,8 @@ EXPORT void HWRAPI(SetTransform) (FTransform *stransform)
|
||||||
pglMatrixMode(GL_PROJECTION);
|
pglMatrixMode(GL_PROJECTION);
|
||||||
pglLoadIdentity();
|
pglLoadIdentity();
|
||||||
if (stransform->splitscreen == 1 && stransform->fovxangle == 90.0f);
|
if (stransform->splitscreen == 1 && stransform->fovxangle == 90.0f);
|
||||||
special_splitscreen = stransform->splitscreen;
|
special_splitscreen = true;
|
||||||
if (special_splitscreen == 1)
|
if (special_splitscreen)
|
||||||
GLPerspective(53.13l, 2*ASPECT_RATIO); // 53.13 = 2*atan(0.5)
|
GLPerspective(53.13l, 2*ASPECT_RATIO); // 53.13 = 2*atan(0.5)
|
||||||
else
|
else
|
||||||
GLPerspective(stransform->fovxangle, ASPECT_RATIO);
|
GLPerspective(stransform->fovxangle, ASPECT_RATIO);
|
||||||
|
@ -2043,7 +2043,7 @@ EXPORT void HWRAPI(SetTransform) (FTransform *stransform)
|
||||||
|
|
||||||
pglMatrixMode(GL_PROJECTION);
|
pglMatrixMode(GL_PROJECTION);
|
||||||
pglLoadIdentity();
|
pglLoadIdentity();
|
||||||
if (special_splitscreen == 1)
|
if (special_splitscreen)
|
||||||
GLPerspective(53.13l, 2*ASPECT_RATIO); // 53.13 = 2*atan(0.5)
|
GLPerspective(53.13l, 2*ASPECT_RATIO); // 53.13 = 2*atan(0.5)
|
||||||
else
|
else
|
||||||
//Hurdler: is "fov" correct?
|
//Hurdler: is "fov" correct?
|
||||||
|
|
|
@ -1805,7 +1805,7 @@ static void HU_DrawRankings(void)
|
||||||
HU_DrawDualTabRankings(32, 32, tab, scorelines, whiteplayer);
|
HU_DrawDualTabRankings(32, 32, tab, scorelines, whiteplayer);
|
||||||
|
|
||||||
// draw spectators in a ticker across the bottom
|
// draw spectators in a ticker across the bottom
|
||||||
if (!(splitscreen || splitscreen3 || splitscreen4) && G_GametypeHasSpectators())
|
if (!splitscreen && G_GametypeHasSpectators())
|
||||||
HU_DrawSpectatorTicker();
|
HU_DrawSpectatorTicker();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
284
src/k_kart.c
284
src/k_kart.c
|
@ -3551,13 +3551,13 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
if (player->kartstuff[k_bootimer] > 0)
|
if (player->kartstuff[k_bootimer] > 0)
|
||||||
{
|
{
|
||||||
if ((player == &players[displayplayer]
|
if ((player == &players[displayplayer]
|
||||||
|| ((splitscreen || splitscreen3 || splitscreen4) && player == &players[secondarydisplayplayer])
|
|| (splitscreen && player == &players[secondarydisplayplayer])
|
||||||
|| ((splitscreen3 || splitscreen4) && player == &players[thirddisplayplayer])
|
|| (splitscreen > 1 && player == &players[thirddisplayplayer])
|
||||||
|| (splitscreen4 && player == &players[fourthdisplayplayer]))
|
|| (splitscreen > 2 && player == &players[fourthdisplayplayer]))
|
||||||
|| (!(player == &players[displayplayer]
|
|| (!(player == &players[displayplayer]
|
||||||
|| ((splitscreen || splitscreen3 || splitscreen4) && player == &players[secondarydisplayplayer])
|
|| (splitscreen && player == &players[secondarydisplayplayer])
|
||||||
|| ((splitscreen3 || splitscreen4) && player == &players[thirddisplayplayer])
|
|| (splitscreen > 1 && player == &players[thirddisplayplayer])
|
||||||
|| (splitscreen4 && player == &players[fourthdisplayplayer]))
|
|| (splitscreen > 2 && player == &players[fourthdisplayplayer]))
|
||||||
&& (player->kartstuff[k_bootimer] < 1*TICRATE/2 || player->kartstuff[k_bootimer] > bootime-(1*TICRATE/2))))
|
&& (player->kartstuff[k_bootimer] < 1*TICRATE/2 || player->kartstuff[k_bootimer] > bootime-(1*TICRATE/2))))
|
||||||
{
|
{
|
||||||
if (leveltime & 1)
|
if (leveltime & 1)
|
||||||
|
@ -3704,12 +3704,7 @@ void K_CheckBalloons(void)
|
||||||
UINT8 numingame = 0;
|
UINT8 numingame = 0;
|
||||||
INT8 winnernum = -1;
|
INT8 winnernum = -1;
|
||||||
|
|
||||||
// Set to 1 if you need to test comeback in splitscreen
|
if (!multiplayer)
|
||||||
#if 0
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!(multiplayer || netgame))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (gametype == GT_RACE)
|
if (gametype == GT_RACE)
|
||||||
|
@ -4098,7 +4093,7 @@ static void K_initKartHUD(void)
|
||||||
// CHECK graphic
|
// CHECK graphic
|
||||||
CHEK_Y = BASEVIDHEIGHT; // 200
|
CHEK_Y = BASEVIDHEIGHT; // 200
|
||||||
|
|
||||||
if (splitscreen || splitscreen3 || splitscreen4) // Splitscreen
|
if (splitscreen) // Splitscreen
|
||||||
{
|
{
|
||||||
ITEM_X = 9;
|
ITEM_X = 9;
|
||||||
ITEM_Y = 24;
|
ITEM_Y = 24;
|
||||||
|
@ -4109,7 +4104,7 @@ static void K_initKartHUD(void)
|
||||||
|
|
||||||
POSI_Y = (BASEVIDHEIGHT/2)-56;
|
POSI_Y = (BASEVIDHEIGHT/2)-56;
|
||||||
|
|
||||||
if (splitscreen3 || splitscreen4) // 3P/4P Small Splitscreen
|
if (splitscreen > 1) // 3P/4P Small Splitscreen
|
||||||
{
|
{
|
||||||
ITEM_X = 4;
|
ITEM_X = 4;
|
||||||
ITEM_Y = 4;
|
ITEM_Y = 4;
|
||||||
|
@ -4127,6 +4122,39 @@ static void K_initKartHUD(void)
|
||||||
POSI_Y = SCX(POSI_Y);*/
|
POSI_Y = SCX(POSI_Y);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static INT32 K_calcSplitFlags(INT32 snapflags)
|
||||||
|
{
|
||||||
|
INT32 splitflags = 0;
|
||||||
|
|
||||||
|
if (!splitscreen)
|
||||||
|
return snapflags;
|
||||||
|
|
||||||
|
if (stplyr != &players[displayplayer])
|
||||||
|
{
|
||||||
|
if (splitscreen == 1 && stplyr == &players[secondarydisplayplayer])
|
||||||
|
splitflags |= V_SPLITSCREEN;
|
||||||
|
else if (splitscreen > 1)
|
||||||
|
{
|
||||||
|
if (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||||
|
splitflags |= V_SPLITSCREEN;
|
||||||
|
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||||
|
splitflags |= V_HORZSCREEN;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (splitflags & V_SPLITSCREEN)
|
||||||
|
snapflags &= ~V_SNAPTOTOP;
|
||||||
|
else
|
||||||
|
snapflags &= ~V_SNAPTOBOTTOM;
|
||||||
|
|
||||||
|
if (splitflags & V_HORZSCREEN)
|
||||||
|
snapflags &= ~V_SNAPTOLEFT;
|
||||||
|
else
|
||||||
|
snapflags &= ~V_SNAPTORIGHT;
|
||||||
|
|
||||||
|
return (splitflags|snapflags);
|
||||||
|
}
|
||||||
|
|
||||||
static void K_drawKartItemClose(void)
|
static void K_drawKartItemClose(void)
|
||||||
{
|
{
|
||||||
// ITEM_X = BASEVIDWIDTH-50; // 270
|
// ITEM_X = BASEVIDWIDTH-50; // 270
|
||||||
|
@ -4136,19 +4164,9 @@ static void K_drawKartItemClose(void)
|
||||||
// Set to 'no draw' just in case.
|
// Set to 'no draw' just in case.
|
||||||
patch_t *localpatch = kp_nodraw;
|
patch_t *localpatch = kp_nodraw;
|
||||||
|
|
||||||
INT32 splitflags = 0;
|
INT32 splitflags = K_calcSplitFlags(V_SNAPTOTOP|V_SNAPTOLEFT);
|
||||||
if (stplyr != &players[displayplayer])
|
if (!splitscreen)
|
||||||
{
|
splitflags = V_SNAPTOTOP|V_SNAPTORIGHT;
|
||||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
|
||||||
splitflags |= V_SPLITSCREEN;
|
|
||||||
else if (splitscreen3 || splitscreen4)
|
|
||||||
{
|
|
||||||
if (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
|
||||||
splitflags |= V_SPLITSCREEN;
|
|
||||||
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
|
||||||
splitflags |= V_HORZSCREEN;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*if ()
|
/*if ()
|
||||||
switch (stplyr->kartstuff[k_itemclose])
|
switch (stplyr->kartstuff[k_itemclose])
|
||||||
|
@ -4172,7 +4190,7 @@ static void K_drawKartItemClose(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (localpatch != kp_nodraw)
|
if (localpatch != kp_nodraw)
|
||||||
V_DrawScaledPatch(ITEM_X, ITEM_Y, V_SNAPTORIGHT|V_SNAPTOTOP|splitflags, localpatch);
|
V_DrawScaledPatch(ITEM_X, ITEM_Y, splitflags, localpatch);
|
||||||
}
|
}
|
||||||
|
|
||||||
void K_drawMinimap(void)
|
void K_drawMinimap(void)
|
||||||
|
@ -4244,7 +4262,7 @@ void K_drawMinimap(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!(splitscreen || splitscreen3 || splitscreen4) && maptol & TOL_KART && !hu_showscores)
|
if (!splitscreen && maptol & TOL_KART && !hu_showscores)
|
||||||
HU_DrawRaceRankings();
|
HU_DrawRaceRankings();
|
||||||
}*/
|
}*/
|
||||||
;
|
;
|
||||||
|
@ -4259,19 +4277,10 @@ static void K_drawKartItemRoulette(void)
|
||||||
// Set to 'no item' just in case.
|
// Set to 'no item' just in case.
|
||||||
patch_t *localpatch = kp_nodraw;
|
patch_t *localpatch = kp_nodraw;
|
||||||
|
|
||||||
INT32 splitflags = 0;
|
INT32 splitflags = K_calcSplitFlags(V_SNAPTOTOP|V_SNAPTOLEFT);
|
||||||
if (stplyr != &players[displayplayer])
|
if (!splitscreen)
|
||||||
{
|
splitflags = V_SNAPTOTOP|V_SNAPTORIGHT;
|
||||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
|
||||||
splitflags |= V_SPLITSCREEN;
|
|
||||||
else if (splitscreen3 || splitscreen4)
|
|
||||||
{
|
|
||||||
if (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
|
||||||
splitflags |= V_SPLITSCREEN;
|
|
||||||
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
|
||||||
splitflags |= V_HORZSCREEN;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/*if ()
|
/*if ()
|
||||||
switch(stplyr->kartstuff[k_itemroulette] % 53)
|
switch(stplyr->kartstuff[k_itemroulette] % 53)
|
||||||
{
|
{
|
||||||
|
@ -4323,7 +4332,7 @@ static void K_drawKartItemRoulette(void)
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
V_DrawScaledPatch(ITEM_X, ITEM_Y, V_SNAPTORIGHT|V_SNAPTOTOP|splitflags, localpatch);
|
V_DrawScaledPatch(ITEM_X, ITEM_Y, splitflags, localpatch);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void K_drawKartRetroItem(void)
|
static void K_drawKartRetroItem(void)
|
||||||
|
@ -4335,19 +4344,9 @@ static void K_drawKartRetroItem(void)
|
||||||
// Set to 'no item' just in case.
|
// Set to 'no item' just in case.
|
||||||
patch_t *localpatch = kp_nodraw;
|
patch_t *localpatch = kp_nodraw;
|
||||||
|
|
||||||
INT32 splitflags = 0;
|
INT32 splitflags = K_calcSplitFlags(V_SNAPTOTOP|V_SNAPTOLEFT);
|
||||||
if (stplyr != &players[displayplayer])
|
if (!splitscreen)
|
||||||
{
|
splitflags = V_SNAPTOTOP|V_SNAPTORIGHT;
|
||||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
|
||||||
splitflags |= V_SPLITSCREEN;
|
|
||||||
else if (splitscreen3 || splitscreen4)
|
|
||||||
{
|
|
||||||
if (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
|
||||||
splitflags |= V_SPLITSCREEN;
|
|
||||||
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
|
||||||
splitflags |= V_HORZSCREEN;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// I'm doing this a little weird and drawing mostly in reverse order
|
// I'm doing this a little weird and drawing mostly in reverse order
|
||||||
// The only actual reason is to make triple/double/single mushrooms line up this way in the code below
|
// The only actual reason is to make triple/double/single mushrooms line up this way in the code below
|
||||||
|
@ -4382,7 +4381,7 @@ static void K_drawKartRetroItem(void)
|
||||||
else if (stplyr->kartstuff[k_boo] == 1) localpatch = kp_boo;
|
else if (stplyr->kartstuff[k_boo] == 1) localpatch = kp_boo;
|
||||||
else if (stplyr->kartstuff[k_magnet] == 1) localpatch = kp_magnet;
|
else if (stplyr->kartstuff[k_magnet] == 1) localpatch = kp_magnet;
|
||||||
|
|
||||||
V_DrawScaledPatch(ITEM_X, ITEM_Y, V_SNAPTORIGHT|V_SNAPTOTOP|splitflags, localpatch);
|
V_DrawScaledPatch(ITEM_X, ITEM_Y, splitflags, localpatch);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -4490,22 +4489,9 @@ static void K_drawKartTimestamp(void)
|
||||||
// TIME_Y = 6; // 6
|
// TIME_Y = 6; // 6
|
||||||
|
|
||||||
INT32 TIME_XB;
|
INT32 TIME_XB;
|
||||||
|
INT32 splitflags = K_calcSplitFlags(V_SNAPTOTOP|V_SNAPTORIGHT);
|
||||||
|
|
||||||
INT32 splitflags = 0;
|
V_DrawScaledPatch(TIME_X, TIME_Y, splitflags, kp_timestickerwide);
|
||||||
if (stplyr != &players[displayplayer])
|
|
||||||
{
|
|
||||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
|
||||||
splitflags |= V_SPLITSCREEN;
|
|
||||||
else if (splitscreen3 || splitscreen4)
|
|
||||||
{
|
|
||||||
if (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
|
||||||
splitflags |= V_SPLITSCREEN;
|
|
||||||
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
|
||||||
splitflags |= V_HORZSCREEN;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
V_DrawScaledPatch(TIME_X, TIME_Y, V_SNAPTOTOP|V_SNAPTORIGHT|splitflags, kp_timestickerwide);
|
|
||||||
|
|
||||||
TIME_XB = TIME_X+33;
|
TIME_XB = TIME_X+33;
|
||||||
|
|
||||||
|
@ -4514,44 +4500,44 @@ static void K_drawKartTimestamp(void)
|
||||||
// zero minute
|
// zero minute
|
||||||
if (stplyr->realtime/(60*TICRATE) < 10)
|
if (stplyr->realtime/(60*TICRATE) < 10)
|
||||||
{
|
{
|
||||||
V_DrawKartString(TIME_XB, TIME_Y+3, V_SNAPTOTOP|V_SNAPTORIGHT|splitflags, va("0"));
|
V_DrawKartString(TIME_XB, TIME_Y+3, splitflags, va("0"));
|
||||||
// minutes time 0 __ __
|
// minutes time 0 __ __
|
||||||
V_DrawKartString(TIME_XB+12, TIME_Y+3, V_SNAPTOTOP|V_SNAPTORIGHT|splitflags, va("%d", stplyr->realtime/(60*TICRATE)));
|
V_DrawKartString(TIME_XB+12, TIME_Y+3, splitflags, va("%d", stplyr->realtime/(60*TICRATE)));
|
||||||
}
|
}
|
||||||
// minutes time 0 __ __
|
// minutes time 0 __ __
|
||||||
else
|
else
|
||||||
V_DrawKartString(TIME_XB, TIME_Y+3, V_SNAPTOTOP|V_SNAPTORIGHT|splitflags, va("%d", stplyr->realtime/(60*TICRATE)));
|
V_DrawKartString(TIME_XB, TIME_Y+3, splitflags, va("%d", stplyr->realtime/(60*TICRATE)));
|
||||||
|
|
||||||
// apostrophe location _'__ __
|
// apostrophe location _'__ __
|
||||||
V_DrawKartString(TIME_XB+24, TIME_Y+3, V_SNAPTOTOP|V_SNAPTORIGHT|splitflags, va("'"));
|
V_DrawKartString(TIME_XB+24, TIME_Y+3, splitflags, va("'"));
|
||||||
|
|
||||||
// zero second _ 0_ __
|
// zero second _ 0_ __
|
||||||
if ((stplyr->realtime/TICRATE % 60) < 10)
|
if ((stplyr->realtime/TICRATE % 60) < 10)
|
||||||
{
|
{
|
||||||
V_DrawKartString(TIME_XB+36, TIME_Y+3, V_SNAPTOTOP|V_SNAPTORIGHT|splitflags, va("0"));
|
V_DrawKartString(TIME_XB+36, TIME_Y+3, splitflags, va("0"));
|
||||||
// seconds time _ _0 __
|
// seconds time _ _0 __
|
||||||
V_DrawKartString(TIME_XB+48, TIME_Y+3, V_SNAPTOTOP|V_SNAPTORIGHT|splitflags, va("%d", stplyr->realtime/TICRATE % 60));
|
V_DrawKartString(TIME_XB+48, TIME_Y+3, splitflags, va("%d", stplyr->realtime/TICRATE % 60));
|
||||||
}
|
}
|
||||||
// zero second _ 00 __
|
// zero second _ 00 __
|
||||||
else
|
else
|
||||||
V_DrawKartString(TIME_XB+36, TIME_Y+3, V_SNAPTOTOP|V_SNAPTORIGHT|splitflags, va("%d", stplyr->realtime/TICRATE % 60));
|
V_DrawKartString(TIME_XB+36, TIME_Y+3, splitflags, va("%d", stplyr->realtime/TICRATE % 60));
|
||||||
|
|
||||||
// quotation mark location _ __"__
|
// quotation mark location _ __"__
|
||||||
V_DrawKartString(TIME_XB+60, TIME_Y+3, V_SNAPTOTOP|V_SNAPTORIGHT|splitflags, va("\""));
|
V_DrawKartString(TIME_XB+60, TIME_Y+3, splitflags, va("\""));
|
||||||
|
|
||||||
// zero tick _ __ 0_
|
// zero tick _ __ 0_
|
||||||
if (G_TicsToCentiseconds(stplyr->realtime) < 10)
|
if (G_TicsToCentiseconds(stplyr->realtime) < 10)
|
||||||
{
|
{
|
||||||
V_DrawKartString(TIME_XB+72, TIME_Y+3, V_SNAPTOTOP|V_SNAPTORIGHT|splitflags, va("0"));
|
V_DrawKartString(TIME_XB+72, TIME_Y+3, splitflags, va("0"));
|
||||||
// tics _ __ _0
|
// tics _ __ _0
|
||||||
V_DrawKartString(TIME_XB+84, TIME_Y+3, V_SNAPTOTOP|V_SNAPTORIGHT|splitflags, va("%d", G_TicsToCentiseconds(stplyr->realtime)));
|
V_DrawKartString(TIME_XB+84, TIME_Y+3, splitflags, va("%d", G_TicsToCentiseconds(stplyr->realtime)));
|
||||||
}
|
}
|
||||||
// zero tick _ __ 00
|
// zero tick _ __ 00
|
||||||
if (G_TicsToCentiseconds(stplyr->realtime) >= 10)
|
if (G_TicsToCentiseconds(stplyr->realtime) >= 10)
|
||||||
V_DrawKartString(TIME_XB+72, TIME_Y+3, V_SNAPTOTOP|V_SNAPTORIGHT|splitflags, va("%d", G_TicsToCentiseconds(stplyr->realtime)));
|
V_DrawKartString(TIME_XB+72, TIME_Y+3, splitflags, va("%d", G_TicsToCentiseconds(stplyr->realtime)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
V_DrawKartString(TIME_XB, TIME_Y+3, V_SNAPTORIGHT|V_SNAPTOTOP|splitflags, va("99'59\"99"));
|
V_DrawKartString(TIME_XB, TIME_Y+3, splitflags, va("99'59\"99"));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void K_DrawKartPositionNum(INT32 num)
|
static void K_DrawKartPositionNum(INT32 num)
|
||||||
|
@ -4563,24 +4549,12 @@ static void K_DrawKartPositionNum(INT32 num)
|
||||||
INT32 W = SHORT(kp_positionnum[0][0]->width);
|
INT32 W = SHORT(kp_positionnum[0][0]->width);
|
||||||
patch_t *localpatch = kp_positionnum[0][0];
|
patch_t *localpatch = kp_positionnum[0][0];
|
||||||
|
|
||||||
INT32 splitflags = 0;
|
INT32 splitflags = K_calcSplitFlags(V_SNAPTOBOTTOM|V_SNAPTORIGHT);
|
||||||
if (stplyr != &players[displayplayer])
|
|
||||||
{
|
|
||||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
|
||||||
splitflags |= V_SPLITSCREEN;
|
|
||||||
else if (splitscreen3 || splitscreen4)
|
|
||||||
{
|
|
||||||
if (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
|
||||||
splitflags |= V_SPLITSCREEN;
|
|
||||||
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
|
||||||
splitflags |= V_HORZSCREEN;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Special case for 0
|
// Special case for 0
|
||||||
if (!num)
|
if (!num)
|
||||||
{
|
{
|
||||||
V_DrawTranslucentPatch(X-W, POSI_Y, V_TRANSLUCENT|V_SNAPTORIGHT|V_SNAPTOBOTTOM|splitflags, kp_positionnum[0][0]);
|
V_DrawTranslucentPatch(X-W, POSI_Y, V_TRANSLUCENT|splitflags, kp_positionnum[0][0]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4628,19 +4602,19 @@ static void K_DrawKartPositionNum(INT32 num)
|
||||||
switch (leveltime % 9)
|
switch (leveltime % 9)
|
||||||
{
|
{
|
||||||
case 1: case 2: case 3:
|
case 1: case 2: case 3:
|
||||||
if (stplyr->kartstuff[k_position] >= 4 || (splitscreen && stplyr->kartstuff[k_position] >= 2))
|
if (stplyr->kartstuff[k_position] >= 4 || (splitscreen && stplyr->kartstuff[k_position] >= splitscreen+1))
|
||||||
localpatch = kp_positionnum[num % 10][4];
|
localpatch = kp_positionnum[num % 10][4];
|
||||||
else
|
else
|
||||||
localpatch = kp_positionnum[num % 10][1];
|
localpatch = kp_positionnum[num % 10][1];
|
||||||
break;
|
break;
|
||||||
case 4: case 5: case 6:
|
case 4: case 5: case 6:
|
||||||
if (stplyr->kartstuff[k_position] >= 4 || (splitscreen && stplyr->kartstuff[k_position] >= 2))
|
if (stplyr->kartstuff[k_position] >= 4 || (splitscreen && stplyr->kartstuff[k_position] >= splitscreen+1))
|
||||||
localpatch = kp_positionnum[num % 10][5];
|
localpatch = kp_positionnum[num % 10][5];
|
||||||
else
|
else
|
||||||
localpatch = kp_positionnum[num % 10][2];
|
localpatch = kp_positionnum[num % 10][2];
|
||||||
break;
|
break;
|
||||||
case 7: case 8: case 9:
|
case 7: case 8: case 9:
|
||||||
if (stplyr->kartstuff[k_position] >= 4 || (splitscreen && stplyr->kartstuff[k_position] >= 2))
|
if (stplyr->kartstuff[k_position] >= 4 || (splitscreen && stplyr->kartstuff[k_position] >= splitscreen+1))
|
||||||
localpatch = kp_positionnum[num % 10][6];
|
localpatch = kp_positionnum[num % 10][6];
|
||||||
else
|
else
|
||||||
localpatch = kp_positionnum[num % 10][3];
|
localpatch = kp_positionnum[num % 10][3];
|
||||||
|
@ -4653,7 +4627,7 @@ static void K_DrawKartPositionNum(INT32 num)
|
||||||
else
|
else
|
||||||
localpatch = kp_positionnum[num % 10][0];
|
localpatch = kp_positionnum[num % 10][0];
|
||||||
|
|
||||||
V_DrawTranslucentPatch(X, POSI_Y, V_TRANSLUCENT|V_SNAPTORIGHT|V_SNAPTOBOTTOM|splitflags, localpatch);
|
V_DrawTranslucentPatch(X, POSI_Y, V_TRANSLUCENT|splitflags, localpatch);
|
||||||
num /= 10;
|
num /= 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4798,100 +4772,62 @@ static void K_drawKartPositionFaces(void)
|
||||||
|
|
||||||
static void K_drawKartLaps(void)
|
static void K_drawKartLaps(void)
|
||||||
{
|
{
|
||||||
INT32 splitflags = 0;
|
INT32 splitflags = K_calcSplitFlags(V_SNAPTOBOTTOM|V_SNAPTOLEFT);
|
||||||
if (stplyr != &players[displayplayer])
|
|
||||||
{
|
|
||||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
|
||||||
splitflags |= V_SPLITSCREEN;
|
|
||||||
else if (splitscreen3 || splitscreen4)
|
|
||||||
{
|
|
||||||
if (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
|
||||||
splitflags |= V_SPLITSCREEN;
|
|
||||||
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
|
||||||
splitflags |= V_HORZSCREEN;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
V_DrawScaledPatch(LAPS_X, LAPS_Y, V_SNAPTOLEFT|V_SNAPTOBOTTOM|splitflags, kp_lapsticker);
|
V_DrawScaledPatch(LAPS_X, LAPS_Y, splitflags, kp_lapsticker);
|
||||||
|
|
||||||
if (stplyr->exiting)
|
if (stplyr->exiting)
|
||||||
V_DrawKartString(LAPS_X+33, LAPS_Y+3, V_SNAPTOLEFT|V_SNAPTOBOTTOM|splitflags, "FIN");
|
V_DrawKartString(LAPS_X+33, LAPS_Y+3, splitflags, "FIN");
|
||||||
else
|
else
|
||||||
V_DrawKartString(LAPS_X+33, LAPS_Y+3, V_SNAPTOLEFT|V_SNAPTOBOTTOM|splitflags, va("%d/%d", stplyr->laps+1, cv_numlaps.value));
|
V_DrawKartString(LAPS_X+33, LAPS_Y+3, splitflags, va("%d/%d", stplyr->laps+1, cv_numlaps.value));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void K_drawKartSpeedometer(void)
|
static void K_drawKartSpeedometer(void)
|
||||||
{
|
{
|
||||||
fixed_t convSpeed;
|
fixed_t convSpeed;
|
||||||
|
INT32 splitflags = K_calcSplitFlags(V_SNAPTOBOTTOM|V_SNAPTOLEFT);
|
||||||
INT32 splitflags = 0;
|
|
||||||
if (stplyr != &players[displayplayer])
|
|
||||||
{
|
|
||||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
|
||||||
splitflags |= V_SPLITSCREEN;
|
|
||||||
else if (splitscreen3 || splitscreen4)
|
|
||||||
{
|
|
||||||
if (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
|
||||||
splitflags |= V_SPLITSCREEN;
|
|
||||||
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
|
||||||
splitflags |= V_HORZSCREEN;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cv_speedometer.value == 1)
|
if (cv_speedometer.value == 1)
|
||||||
{
|
{
|
||||||
convSpeed = FixedMul(stplyr->speed, 142371)/FRACUNIT; // 2.172409058
|
convSpeed = FixedMul(stplyr->speed, 142371)/FRACUNIT; // 2.172409058
|
||||||
V_DrawKartString(SPDM_X, SPDM_Y, V_SNAPTOLEFT|V_SNAPTOBOTTOM|splitflags, va("%3d km/h", convSpeed));
|
V_DrawKartString(SPDM_X, SPDM_Y, splitflags, va("%3d km/h", convSpeed));
|
||||||
}
|
}
|
||||||
else if (cv_speedometer.value == 2)
|
else if (cv_speedometer.value == 2)
|
||||||
{
|
{
|
||||||
convSpeed = FixedMul(stplyr->speed, 88465)/FRACUNIT; // 1.349868774
|
convSpeed = FixedMul(stplyr->speed, 88465)/FRACUNIT; // 1.349868774
|
||||||
V_DrawKartString(SPDM_X, SPDM_Y, V_SNAPTOLEFT|V_SNAPTOBOTTOM|splitflags, va("%3d mph", convSpeed));
|
V_DrawKartString(SPDM_X, SPDM_Y, splitflags, va("%3d mph", convSpeed));
|
||||||
}
|
}
|
||||||
else if (cv_speedometer.value == 3)
|
else if (cv_speedometer.value == 3)
|
||||||
{
|
{
|
||||||
convSpeed = stplyr->speed/FRACUNIT;
|
convSpeed = stplyr->speed/FRACUNIT;
|
||||||
V_DrawKartString(SPDM_X, SPDM_Y, V_SNAPTOLEFT|V_SNAPTOBOTTOM|splitflags, va("%3d fu/s", convSpeed));
|
V_DrawKartString(SPDM_X, SPDM_Y, splitflags, va("%3d fu/s", convSpeed));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void K_drawKartBalloonsOrKarma(void)
|
static void K_drawKartBalloonsOrKarma(void)
|
||||||
{
|
{
|
||||||
UINT8 *colormap = R_GetTranslationColormap(-1, stplyr->skincolor, 0);
|
UINT8 *colormap = R_GetTranslationColormap(-1, stplyr->skincolor, 0);
|
||||||
|
INT32 splitflags = K_calcSplitFlags(V_SNAPTOBOTTOM|V_SNAPTOLEFT);
|
||||||
INT32 splitflags = 0;
|
|
||||||
if (stplyr != &players[displayplayer])
|
|
||||||
{
|
|
||||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
|
||||||
splitflags |= V_SPLITSCREEN;
|
|
||||||
else if (splitscreen3 || splitscreen4)
|
|
||||||
{
|
|
||||||
if (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
|
||||||
splitflags |= V_SPLITSCREEN;
|
|
||||||
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
|
||||||
splitflags |= V_HORZSCREEN;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stplyr->kartstuff[k_balloon] <= 0)
|
if (stplyr->kartstuff[k_balloon] <= 0)
|
||||||
{
|
{
|
||||||
V_DrawMappedPatch(LAPS_X, LAPS_Y, V_SNAPTOLEFT|V_SNAPTOBOTTOM|splitflags, kp_karmasticker, colormap);
|
V_DrawMappedPatch(LAPS_X, LAPS_Y, splitflags, kp_karmasticker, colormap);
|
||||||
V_DrawKartString(LAPS_X+58, LAPS_Y+3, V_SNAPTOLEFT|V_SNAPTOBOTTOM|splitflags, va("%d", stplyr->kartstuff[k_comebackpoints]));
|
V_DrawKartString(LAPS_X+58, LAPS_Y+3, splitflags, va("%d", stplyr->kartstuff[k_comebackpoints]));
|
||||||
V_DrawKartString(LAPS_X+85, LAPS_Y+3, V_SNAPTOLEFT|V_SNAPTOBOTTOM|splitflags, va("3"));
|
V_DrawKartString(LAPS_X+85, LAPS_Y+3, splitflags, va("3"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (cv_kartballoons.value > 9)
|
if (cv_kartballoons.value > 9)
|
||||||
{
|
{
|
||||||
V_DrawMappedPatch(LAPS_X, LAPS_Y, V_SNAPTOLEFT|V_SNAPTOBOTTOM|splitflags, kp_balloonstickerwide, colormap);
|
V_DrawMappedPatch(LAPS_X, LAPS_Y, splitflags, kp_balloonstickerwide, colormap);
|
||||||
V_DrawKartString(LAPS_X+46, LAPS_Y+3, V_SNAPTOLEFT|V_SNAPTOBOTTOM|splitflags, va("%2d", stplyr->kartstuff[k_balloon]));
|
V_DrawKartString(LAPS_X+46, LAPS_Y+3, splitflags, va("%2d", stplyr->kartstuff[k_balloon]));
|
||||||
V_DrawKartString(LAPS_X+83, LAPS_Y+3, V_SNAPTOLEFT|V_SNAPTOBOTTOM|splitflags, va("%2d", cv_kartballoons.value));
|
V_DrawKartString(LAPS_X+83, LAPS_Y+3, splitflags, va("%2d", cv_kartballoons.value));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
V_DrawMappedPatch(LAPS_X, LAPS_Y, V_SNAPTOLEFT|V_SNAPTOBOTTOM|splitflags, kp_balloonsticker, colormap);
|
V_DrawMappedPatch(LAPS_X, LAPS_Y, splitflags, kp_balloonsticker, colormap);
|
||||||
V_DrawKartString(LAPS_X+46, LAPS_Y+3, V_SNAPTOLEFT|V_SNAPTOBOTTOM|splitflags, va("%d", stplyr->kartstuff[k_balloon]));
|
V_DrawKartString(LAPS_X+46, LAPS_Y+3, splitflags, va("%d", stplyr->kartstuff[k_balloon]));
|
||||||
V_DrawKartString(LAPS_X+73, LAPS_Y+3, V_SNAPTOLEFT|V_SNAPTOBOTTOM|splitflags, va("%d", cv_kartballoons.value));
|
V_DrawKartString(LAPS_X+73, LAPS_Y+3, splitflags, va("%d", cv_kartballoons.value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4918,7 +4854,7 @@ fixed_t K_FindCheckX(fixed_t px, fixed_t py, angle_t ang, fixed_t mx, fixed_t my
|
||||||
if (cv_kartmirror.value)
|
if (cv_kartmirror.value)
|
||||||
x = 320-x;
|
x = 320-x;
|
||||||
|
|
||||||
if (splitscreen3 || splitscreen4)
|
if (splitscreen > 1)
|
||||||
x /= 2;
|
x /= 2;
|
||||||
|
|
||||||
return x;
|
return x;
|
||||||
|
@ -4931,19 +4867,7 @@ static void K_drawKartPlayerCheck(void)
|
||||||
INT32 x;
|
INT32 x;
|
||||||
patch_t *localpatch;
|
patch_t *localpatch;
|
||||||
|
|
||||||
INT32 splitflags = 0;
|
INT32 splitflags = K_calcSplitFlags(V_SNAPTOBOTTOM);
|
||||||
if (stplyr != &players[displayplayer])
|
|
||||||
{
|
|
||||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
|
||||||
splitflags |= V_SPLITSCREEN;
|
|
||||||
else if (splitscreen3 || splitscreen4)
|
|
||||||
{
|
|
||||||
if (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
|
||||||
splitflags |= V_SPLITSCREEN;
|
|
||||||
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
|
||||||
splitflags |= V_HORZSCREEN;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(stplyr->mo))
|
if (!(stplyr->mo))
|
||||||
return;
|
return;
|
||||||
|
@ -4986,7 +4910,7 @@ static void K_drawKartPlayerCheck(void)
|
||||||
x = 306;
|
x = 306;
|
||||||
|
|
||||||
colormap = R_GetTranslationColormap(-1, players[i].mo->color, 0);
|
colormap = R_GetTranslationColormap(-1, players[i].mo->color, 0);
|
||||||
V_DrawMappedPatch(x, CHEK_Y, V_SNAPTOBOTTOM|splitflags, localpatch, colormap);
|
V_DrawMappedPatch(x, CHEK_Y, splitflags, localpatch, colormap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4995,10 +4919,10 @@ static void K_drawBattleFullscreen(void)
|
||||||
{
|
{
|
||||||
INT32 y = -64+(stplyr->kartstuff[k_cardanimation]); // card animation goes from 0 to 164, 164 is the middle of the screen
|
INT32 y = -64+(stplyr->kartstuff[k_cardanimation]); // card animation goes from 0 to 164, 164 is the middle of the screen
|
||||||
|
|
||||||
if (splitscreen || splitscreen3 || splitscreen4)
|
if (splitscreen)
|
||||||
{
|
{
|
||||||
if ((splitscreen && stplyr == &players[secondarydisplayplayer])
|
if ((splitscreen == 1 && stplyr == &players[secondarydisplayplayer])
|
||||||
|| ((splitscreen3 || splitscreen4) && (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])))
|
|| (splitscreen > 1 && (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])))
|
||||||
y = 232-(stplyr->kartstuff[k_cardanimation]/2);
|
y = 232-(stplyr->kartstuff[k_cardanimation]/2);
|
||||||
else
|
else
|
||||||
y = -32+(stplyr->kartstuff[k_cardanimation]/2);
|
y = -32+(stplyr->kartstuff[k_cardanimation]/2);
|
||||||
|
@ -5008,7 +4932,7 @@ static void K_drawBattleFullscreen(void)
|
||||||
|
|
||||||
if (stplyr->exiting)
|
if (stplyr->exiting)
|
||||||
{
|
{
|
||||||
if (splitscreen)
|
if (splitscreen == 1)
|
||||||
{
|
{
|
||||||
if (stplyr == &players[displayplayer])
|
if (stplyr == &players[displayplayer])
|
||||||
V_DrawFadeScreen();
|
V_DrawFadeScreen();
|
||||||
|
@ -5178,7 +5102,7 @@ void K_drawKartHUD(void)
|
||||||
// Draw Lakitu
|
// Draw Lakitu
|
||||||
// This is done first so that regardless of HUD layers,
|
// This is done first so that regardless of HUD layers,
|
||||||
// he'll appear to be in the 'real world'
|
// he'll appear to be in the 'real world'
|
||||||
if (!(splitscreen || splitscreen3 || splitscreen4))
|
if (!splitscreen)
|
||||||
{
|
{
|
||||||
if (leveltime < 178)
|
if (leveltime < 178)
|
||||||
K_drawStartLakitu();
|
K_drawStartLakitu();
|
||||||
|
@ -5207,13 +5131,13 @@ void K_drawKartHUD(void)
|
||||||
//K_DrawKartTripleItem();
|
//K_DrawKartTripleItem();
|
||||||
|
|
||||||
// If not splitscreen, draw...
|
// If not splitscreen, draw...
|
||||||
if (!(splitscreen3 || splitscreen4)) // Tiny screen, don't clutter it too much
|
if (splitscreen < 2) // Tiny screen, don't clutter it too much
|
||||||
{
|
{
|
||||||
// Draw the timestamp
|
// Draw the timestamp
|
||||||
K_drawKartTimestamp();
|
K_drawKartTimestamp();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(splitscreen || splitscreen3 || splitscreen4) && !modeattacking) // Unnecessary stuff
|
if (!splitscreen && !modeattacking) // Unnecessary stuff
|
||||||
{
|
{
|
||||||
// The little triple-item icons at the bottom
|
// The little triple-item icons at the bottom
|
||||||
// The top-four faces on the left
|
// The top-four faces on the left
|
||||||
|
|
|
@ -716,11 +716,11 @@ void LUAh_GameHUD(player_t *stplayr)
|
||||||
lua_remove(gL, -3); // pop HUD
|
lua_remove(gL, -3); // pop HUD
|
||||||
LUA_PushUserdata(gL, stplayr, META_PLAYER);
|
LUA_PushUserdata(gL, stplayr, META_PLAYER);
|
||||||
|
|
||||||
if (splitscreen4 && stplayr == &players[fourthdisplayplayer])
|
if (splitscreen > 2 && stplayr == &players[fourthdisplayplayer])
|
||||||
LUA_PushUserdata(gL, &camera4, META_CAMERA);
|
LUA_PushUserdata(gL, &camera4, META_CAMERA);
|
||||||
else if ((splitscreen3 || splitscreen4) && stplayr == &players[thirddisplayplayer])
|
else if (splitscreen > 1 && stplayr == &players[thirddisplayplayer])
|
||||||
LUA_PushUserdata(gL, &camera3, META_CAMERA);
|
LUA_PushUserdata(gL, &camera3, META_CAMERA);
|
||||||
else if ((splitscreen || splitscreen3 || splitscreen4) && stplayr == &players[secondarydisplayplayer])
|
else if (splitscreen && stplayr == &players[secondarydisplayplayer])
|
||||||
LUA_PushUserdata(gL, &camera2, META_CAMERA);
|
LUA_PushUserdata(gL, &camera2, META_CAMERA);
|
||||||
else
|
else
|
||||||
LUA_PushUserdata(gL, &camera, META_CAMERA);
|
LUA_PushUserdata(gL, &camera, META_CAMERA);
|
||||||
|
|
31
src/m_menu.c
31
src/m_menu.c
|
@ -6329,14 +6329,14 @@ static INT32 M_FindFirstMap(INT32 gtype)
|
||||||
|
|
||||||
static void M_StartServer(INT32 choice)
|
static void M_StartServer(INT32 choice)
|
||||||
{
|
{
|
||||||
UINT8 ssplayers = 1;
|
UINT8 ssplayers = 0;
|
||||||
|
|
||||||
if (currentMenu == &MP_SplitServerDef)
|
if (currentMenu == &MP_SplitServerDef)
|
||||||
ssplayers = 2;
|
ssplayers = 1;
|
||||||
else if (currentMenu == &MP_3PServerDef)
|
else if (currentMenu == &MP_3PServerDef)
|
||||||
ssplayers = 3;
|
ssplayers = 2;
|
||||||
else if (currentMenu == &MP_4PServerDef)
|
else if (currentMenu == &MP_4PServerDef)
|
||||||
ssplayers = 4;
|
ssplayers = 3;
|
||||||
|
|
||||||
(void)choice;
|
(void)choice;
|
||||||
if (ssplayers < 2)
|
if (ssplayers < 2)
|
||||||
|
@ -6352,7 +6352,7 @@ static void M_StartServer(INT32 choice)
|
||||||
if (metalrecording)
|
if (metalrecording)
|
||||||
G_StopMetalDemo();
|
G_StopMetalDemo();
|
||||||
|
|
||||||
if (ssplayers < 2)
|
if (ssplayers < 1)
|
||||||
{
|
{
|
||||||
D_MapChange(cv_nextmap.value, cv_newgametype.value, false, 1, 1, false, false);
|
D_MapChange(cv_nextmap.value, cv_newgametype.value, false, 1, 1, false, false);
|
||||||
COM_BufAddText("dummyconsvar 1\n");
|
COM_BufAddText("dummyconsvar 1\n");
|
||||||
|
@ -6362,22 +6362,9 @@ static void M_StartServer(INT32 choice)
|
||||||
paused = false;
|
paused = false;
|
||||||
SV_StartSinglePlayerServer();
|
SV_StartSinglePlayerServer();
|
||||||
|
|
||||||
if (!splitscreen4 && ssplayers == 4)
|
if (splitscreen != ssplayers)
|
||||||
{
|
{
|
||||||
splitscreen4 = true;
|
splitscreen = ssplayers;
|
||||||
splitscreen = splitscreen3 = false;
|
|
||||||
SplitScreen_OnChange();
|
|
||||||
}
|
|
||||||
else if (!splitscreen3 && ssplayers == 3)
|
|
||||||
{
|
|
||||||
splitscreen3 = true;
|
|
||||||
splitscreen = splitscreen4 = false;
|
|
||||||
SplitScreen_OnChange();
|
|
||||||
}
|
|
||||||
else if (!splitscreen && ssplayers == 2)
|
|
||||||
{
|
|
||||||
splitscreen = true;
|
|
||||||
splitscreen3 = splitscreen4 = false;
|
|
||||||
SplitScreen_OnChange();
|
SplitScreen_OnChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6959,7 +6946,7 @@ static void M_SetupMultiPlayer3(INT32 choice)
|
||||||
setupm_fakecolor = setupm_cvcolor->value;
|
setupm_fakecolor = setupm_cvcolor->value;
|
||||||
|
|
||||||
// disable skin changes if we can't actually change skins
|
// disable skin changes if we can't actually change skins
|
||||||
if (splitscreen && !CanChangeSkin(thirddisplayplayer))
|
if (splitscreen > 1 && !CanChangeSkin(thirddisplayplayer))
|
||||||
MP_PlayerSetupMenu[2].status = (IT_GRAYEDOUT);
|
MP_PlayerSetupMenu[2].status = (IT_GRAYEDOUT);
|
||||||
else
|
else
|
||||||
MP_PlayerSetupMenu[2].status = (IT_KEYHANDLER | IT_STRING);
|
MP_PlayerSetupMenu[2].status = (IT_KEYHANDLER | IT_STRING);
|
||||||
|
@ -6990,7 +6977,7 @@ static void M_SetupMultiPlayer4(INT32 choice)
|
||||||
setupm_fakecolor = setupm_cvcolor->value;
|
setupm_fakecolor = setupm_cvcolor->value;
|
||||||
|
|
||||||
// disable skin changes if we can't actually change skins
|
// disable skin changes if we can't actually change skins
|
||||||
if (splitscreen && !CanChangeSkin(fourthdisplayplayer))
|
if (splitscreen > 2 && !CanChangeSkin(fourthdisplayplayer))
|
||||||
MP_PlayerSetupMenu[2].status = (IT_GRAYEDOUT);
|
MP_PlayerSetupMenu[2].status = (IT_GRAYEDOUT);
|
||||||
else
|
else
|
||||||
MP_PlayerSetupMenu[2].status = (IT_KEYHANDLER | IT_STRING);
|
MP_PlayerSetupMenu[2].status = (IT_KEYHANDLER | IT_STRING);
|
||||||
|
|
|
@ -4075,7 +4075,7 @@ void A_OverlayThink(mobj_t *actor)
|
||||||
if (!actor->target)
|
if (!actor->target)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!(splitscreen || splitscreen3 || splitscreen4) && rendermode != render_soft)
|
if (!splitscreen && rendermode != render_soft)
|
||||||
{
|
{
|
||||||
angle_t viewingangle;
|
angle_t viewingangle;
|
||||||
|
|
||||||
|
|
|
@ -2526,7 +2526,7 @@ void T_CameraScanner(elevator_t *elevator)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((splitscreen || splitscreen3 || splitscreen4) && players[secondarydisplayplayer].mo)
|
if (splitscreen && players[secondarydisplayplayer].mo)
|
||||||
{
|
{
|
||||||
if (players[secondarydisplayplayer].mo->subsector->sector == elevator->actionsector)
|
if (players[secondarydisplayplayer].mo->subsector->sector == elevator->actionsector)
|
||||||
{
|
{
|
||||||
|
@ -2554,7 +2554,7 @@ void T_CameraScanner(elevator_t *elevator)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((splitscreen3 || splitscreen4) && players[thirddisplayplayer].mo)
|
if (splitscreen > 1 && players[thirddisplayplayer].mo)
|
||||||
{
|
{
|
||||||
if (players[thirddisplayplayer].mo->subsector->sector == elevator->actionsector)
|
if (players[thirddisplayplayer].mo->subsector->sector == elevator->actionsector)
|
||||||
{
|
{
|
||||||
|
@ -2582,7 +2582,7 @@ void T_CameraScanner(elevator_t *elevator)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (splitscreen4 && players[fourthdisplayplayer].mo)
|
if (splitscreen > 2 && players[fourthdisplayplayer].mo)
|
||||||
{
|
{
|
||||||
if (players[fourthdisplayplayer].mo->subsector->sector == elevator->actionsector)
|
if (players[fourthdisplayplayer].mo->subsector->sector == elevator->actionsector)
|
||||||
{
|
{
|
||||||
|
|
|
@ -62,11 +62,11 @@ void P_ForceConstant(const BasicFF_t *FFInfo)
|
||||||
ConstantQuake.Magnitude = FFInfo->Magnitude;
|
ConstantQuake.Magnitude = FFInfo->Magnitude;
|
||||||
if (FFInfo->player == &players[consoleplayer])
|
if (FFInfo->player == &players[consoleplayer])
|
||||||
I_Tactile(ConstantForce, &ConstantQuake);
|
I_Tactile(ConstantForce, &ConstantQuake);
|
||||||
else if ((splitscreen || splitscreen3 || splitscreen4) && FFInfo->player == &players[secondarydisplayplayer])
|
else if (splitscreen && FFInfo->player == &players[secondarydisplayplayer])
|
||||||
I_Tactile2(ConstantForce, &ConstantQuake);
|
I_Tactile2(ConstantForce, &ConstantQuake);
|
||||||
else if ((splitscreen3 || splitscreen4) && FFInfo->player == &players[thirddisplayplayer])
|
else if (splitscreen > 1 && FFInfo->player == &players[thirddisplayplayer])
|
||||||
I_Tactile3(ConstantForce, &ConstantQuake);
|
I_Tactile3(ConstantForce, &ConstantQuake);
|
||||||
else if (splitscreen4 && FFInfo->player == &players[fourthdisplayplayer])
|
else if (splitscreen > 2 && FFInfo->player == &players[fourthdisplayplayer])
|
||||||
I_Tactile4(ConstantForce, &ConstantQuake);
|
I_Tactile4(ConstantForce, &ConstantQuake);
|
||||||
}
|
}
|
||||||
void P_RampConstant(const BasicFF_t *FFInfo, INT32 Start, INT32 End)
|
void P_RampConstant(const BasicFF_t *FFInfo, INT32 Start, INT32 End)
|
||||||
|
@ -83,11 +83,11 @@ void P_RampConstant(const BasicFF_t *FFInfo, INT32 Start, INT32 End)
|
||||||
RampQuake.End = End;
|
RampQuake.End = End;
|
||||||
if (FFInfo->player == &players[consoleplayer])
|
if (FFInfo->player == &players[consoleplayer])
|
||||||
I_Tactile(ConstantForce, &RampQuake);
|
I_Tactile(ConstantForce, &RampQuake);
|
||||||
else if ((splitscreen || splitscreen3 || splitscreen4) && FFInfo->player == &players[secondarydisplayplayer])
|
else if (splitscreen && FFInfo->player == &players[secondarydisplayplayer])
|
||||||
I_Tactile2(ConstantForce, &RampQuake);
|
I_Tactile2(ConstantForce, &RampQuake);
|
||||||
else if ((splitscreen3 || splitscreen4) && FFInfo->player == &players[thirddisplayplayer])
|
else if (splitscreen > 1 && FFInfo->player == &players[thirddisplayplayer])
|
||||||
I_Tactile3(ConstantForce, &RampQuake);
|
I_Tactile3(ConstantForce, &RampQuake);
|
||||||
else if (splitscreen4 && FFInfo->player == &players[fourthdisplayplayer])
|
else if (splitscreen > 2 && FFInfo->player == &players[fourthdisplayplayer])
|
||||||
I_Tactile4(ConstantForce, &RampQuake);
|
I_Tactile4(ConstantForce, &RampQuake);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
30
src/p_mobj.c
30
src/p_mobj.c
|
@ -3632,11 +3632,11 @@ boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled
|
||||||
|
|
||||||
if (postimg != postimg_none)
|
if (postimg != postimg_none)
|
||||||
{
|
{
|
||||||
if ((splitscreen || splitscreen3 || splitscreen4) && player == &players[secondarydisplayplayer])
|
if (splitscreen && player == &players[secondarydisplayplayer])
|
||||||
postimgtype2 = postimg;
|
postimgtype2 = postimg;
|
||||||
else if ((splitscreen3 || splitscreen4) && player == &players[thirddisplayplayer])
|
else if (splitscreen > 1 && player == &players[thirddisplayplayer])
|
||||||
postimgtype3 = postimg;
|
postimgtype3 = postimg;
|
||||||
else if (splitscreen4 && player == &players[fourthdisplayplayer])
|
else if (splitscreen > 2 && player == &players[fourthdisplayplayer])
|
||||||
postimgtype4 = postimg;
|
postimgtype4 = postimg;
|
||||||
else
|
else
|
||||||
postimgtype = postimg;
|
postimgtype = postimg;
|
||||||
|
@ -6145,7 +6145,7 @@ void P_RunOverlays(void)
|
||||||
|
|
||||||
if (!mo->target)
|
if (!mo->target)
|
||||||
continue;
|
continue;
|
||||||
if (!(splitscreen || splitscreen3 || splitscreen4) /*&& rendermode != render_soft*/)
|
if (!splitscreen /*&& rendermode != render_soft*/)
|
||||||
{
|
{
|
||||||
angle_t viewingangle;
|
angle_t viewingangle;
|
||||||
|
|
||||||
|
@ -6520,13 +6520,13 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
if (mobj->target->player->kartstuff[k_bootimer] > 0)
|
if (mobj->target->player->kartstuff[k_bootimer] > 0)
|
||||||
{
|
{
|
||||||
if ((mobj->target->player == &players[displayplayer]
|
if ((mobj->target->player == &players[displayplayer]
|
||||||
|| ((splitscreen || splitscreen3 || splitscreen4) && mobj->target->player == &players[secondarydisplayplayer])
|
|| (splitscreen && mobj->target->player == &players[secondarydisplayplayer])
|
||||||
|| ((splitscreen3 || splitscreen4) && mobj->target->player == &players[thirddisplayplayer])
|
|| (splitscreen > 1 && mobj->target->player == &players[thirddisplayplayer])
|
||||||
|| (splitscreen4 && mobj->target->player == &players[fourthdisplayplayer]))
|
|| (splitscreen > 2 && mobj->target->player == &players[fourthdisplayplayer]))
|
||||||
|| (!(mobj->target->player == &players[displayplayer]
|
|| (!(mobj->target->player == &players[displayplayer]
|
||||||
|| ((splitscreen || splitscreen3 || splitscreen4) && mobj->target->player == &players[secondarydisplayplayer])
|
|| (splitscreen && mobj->target->player == &players[secondarydisplayplayer])
|
||||||
|| ((splitscreen3 || splitscreen4) && mobj->target->player == &players[thirddisplayplayer])
|
|| (splitscreen > 1 && mobj->target->player == &players[thirddisplayplayer])
|
||||||
|| (splitscreen4 && mobj->target->player == &players[fourthdisplayplayer]))
|
|| (splitscreen > 2 && mobj->target->player == &players[fourthdisplayplayer]))
|
||||||
&& (mobj->target->player->kartstuff[k_bootimer] < 1*TICRATE/2 || mobj->target->player->kartstuff[k_bootimer] > bootime-(1*TICRATE/2))))
|
&& (mobj->target->player->kartstuff[k_bootimer] < 1*TICRATE/2 || mobj->target->player->kartstuff[k_bootimer] > bootime-(1*TICRATE/2))))
|
||||||
{
|
{
|
||||||
if (leveltime & 1)
|
if (leveltime & 1)
|
||||||
|
@ -8103,7 +8103,7 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
CONS_Printf(M_GetText("The %c%s%c has returned to base.\n"), 0x85, M_GetText("Red flag"), 0x80);
|
CONS_Printf(M_GetText("The %c%s%c has returned to base.\n"), 0x85, M_GetText("Red flag"), 0x80);
|
||||||
|
|
||||||
// Assumedly in splitscreen players will be on opposing teams
|
// Assumedly in splitscreen players will be on opposing teams
|
||||||
if (players[consoleplayer].ctfteam == 1 || (splitscreen || splitscreen3 || splitscreen4))
|
if (players[consoleplayer].ctfteam == 1 || splitscreen)
|
||||||
S_StartSound(NULL, sfx_hoop1);
|
S_StartSound(NULL, sfx_hoop1);
|
||||||
|
|
||||||
redflag = flagmo;
|
redflag = flagmo;
|
||||||
|
@ -8114,7 +8114,7 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
CONS_Printf(M_GetText("The %c%s%c has returned to base.\n"), 0x84, M_GetText("Blue flag"), 0x80);
|
CONS_Printf(M_GetText("The %c%s%c has returned to base.\n"), 0x84, M_GetText("Blue flag"), 0x80);
|
||||||
|
|
||||||
// Assumedly in splitscreen players will be on opposing teams
|
// Assumedly in splitscreen players will be on opposing teams
|
||||||
if (players[consoleplayer].ctfteam == 2 || (splitscreen || splitscreen3 || splitscreen4))
|
if (players[consoleplayer].ctfteam == 2 || splitscreen)
|
||||||
S_StartSound(NULL, sfx_hoop1);
|
S_StartSound(NULL, sfx_hoop1);
|
||||||
|
|
||||||
blueflag = flagmo;
|
blueflag = flagmo;
|
||||||
|
@ -9626,17 +9626,17 @@ void P_AfterPlayerSpawn(INT32 playernum)
|
||||||
if (displayplayer == playernum)
|
if (displayplayer == playernum)
|
||||||
P_ResetCamera(p, &camera);
|
P_ResetCamera(p, &camera);
|
||||||
}
|
}
|
||||||
if (camera2.chase && (splitscreen || splitscreen3 || splitscreen4))
|
if (camera2.chase && splitscreen)
|
||||||
{
|
{
|
||||||
if (secondarydisplayplayer == playernum)
|
if (secondarydisplayplayer == playernum)
|
||||||
P_ResetCamera(p, &camera2);
|
P_ResetCamera(p, &camera2);
|
||||||
}
|
}
|
||||||
if (camera3.chase && (splitscreen3 || splitscreen4))
|
if (camera3.chase && splitscreen > 1)
|
||||||
{
|
{
|
||||||
if (thirddisplayplayer == playernum)
|
if (thirddisplayplayer == playernum)
|
||||||
P_ResetCamera(p, &camera3);
|
P_ResetCamera(p, &camera3);
|
||||||
}
|
}
|
||||||
if (camera4.chase && splitscreen4)
|
if (camera4.chase && splitscreen > 2)
|
||||||
{
|
{
|
||||||
if (fourthdisplayplayer == playernum)
|
if (fourthdisplayplayer == playernum)
|
||||||
P_ResetCamera(p, &camera4);
|
P_ResetCamera(p, &camera4);
|
||||||
|
|
|
@ -2359,15 +2359,15 @@ static void P_ForceCharacter(const char *forcecharskin)
|
||||||
if (netgame)
|
if (netgame)
|
||||||
{
|
{
|
||||||
char skincmd[33];
|
char skincmd[33];
|
||||||
if (splitscreen || splitscreen3 || splitscreen4)
|
if (splitscreen)
|
||||||
{
|
{
|
||||||
sprintf(skincmd, "skin2 %s\n", forcecharskin);
|
sprintf(skincmd, "skin2 %s\n", forcecharskin);
|
||||||
CV_Set(&cv_skin2, forcecharskin);
|
CV_Set(&cv_skin2, forcecharskin);
|
||||||
if (splitscreen3 || splitscreen4)
|
if (splitscreen > 1)
|
||||||
{
|
{
|
||||||
sprintf(skincmd, "skin3 %s\n", forcecharskin);
|
sprintf(skincmd, "skin3 %s\n", forcecharskin);
|
||||||
CV_Set(&cv_skin3, forcecharskin);
|
CV_Set(&cv_skin3, forcecharskin);
|
||||||
if (splitscreen4)
|
if (splitscreen > 2)
|
||||||
{
|
{
|
||||||
sprintf(skincmd, "skin4 %s\n", forcecharskin);
|
sprintf(skincmd, "skin4 %s\n", forcecharskin);
|
||||||
CV_Set(&cv_skin4, forcecharskin);
|
CV_Set(&cv_skin4, forcecharskin);
|
||||||
|
@ -2380,7 +2380,7 @@ static void P_ForceCharacter(const char *forcecharskin)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (splitscreen || splitscreen3 || splitscreen4)
|
if (splitscreen)
|
||||||
{
|
{
|
||||||
SetPlayerSkin(secondarydisplayplayer, forcecharskin);
|
SetPlayerSkin(secondarydisplayplayer, forcecharskin);
|
||||||
if ((unsigned)cv_playercolor2.value != skins[players[secondarydisplayplayer].skin].prefcolor && !modeattacking)
|
if ((unsigned)cv_playercolor2.value != skins[players[secondarydisplayplayer].skin].prefcolor && !modeattacking)
|
||||||
|
@ -2388,25 +2388,25 @@ static void P_ForceCharacter(const char *forcecharskin)
|
||||||
CV_StealthSetValue(&cv_playercolor2, skins[players[secondarydisplayplayer].skin].prefcolor);
|
CV_StealthSetValue(&cv_playercolor2, skins[players[secondarydisplayplayer].skin].prefcolor);
|
||||||
players[secondarydisplayplayer].skincolor = skins[players[secondarydisplayplayer].skin].prefcolor;
|
players[secondarydisplayplayer].skincolor = skins[players[secondarydisplayplayer].skin].prefcolor;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (splitscreen3 || splitscreen4)
|
if (splitscreen > 1)
|
||||||
{
|
|
||||||
SetPlayerSkin(thirddisplayplayer, forcecharskin);
|
|
||||||
if ((unsigned)cv_playercolor3.value != skins[players[thirddisplayplayer].skin].prefcolor && !modeattacking)
|
|
||||||
{
|
{
|
||||||
CV_StealthSetValue(&cv_playercolor3, skins[players[thirddisplayplayer].skin].prefcolor);
|
SetPlayerSkin(thirddisplayplayer, forcecharskin);
|
||||||
players[thirddisplayplayer].skincolor = skins[players[thirddisplayplayer].skin].prefcolor;
|
if ((unsigned)cv_playercolor3.value != skins[players[thirddisplayplayer].skin].prefcolor && !modeattacking)
|
||||||
}
|
{
|
||||||
}
|
CV_StealthSetValue(&cv_playercolor3, skins[players[thirddisplayplayer].skin].prefcolor);
|
||||||
|
players[thirddisplayplayer].skincolor = skins[players[thirddisplayplayer].skin].prefcolor;
|
||||||
|
}
|
||||||
|
|
||||||
if (splitscreen4)
|
if (splitscreen > 2)
|
||||||
{
|
{
|
||||||
SetPlayerSkin(fourthdisplayplayer, forcecharskin);
|
SetPlayerSkin(fourthdisplayplayer, forcecharskin);
|
||||||
if ((unsigned)cv_playercolor4.value != skins[players[fourthdisplayplayer].skin].prefcolor && !modeattacking)
|
if ((unsigned)cv_playercolor4.value != skins[players[fourthdisplayplayer].skin].prefcolor && !modeattacking)
|
||||||
{
|
{
|
||||||
CV_StealthSetValue(&cv_playercolor4, skins[players[fourthdisplayplayer].skin].prefcolor);
|
CV_StealthSetValue(&cv_playercolor4, skins[players[fourthdisplayplayer].skin].prefcolor);
|
||||||
players[fourthdisplayplayer].skincolor = skins[players[fourthdisplayplayer].skin].prefcolor;
|
players[fourthdisplayplayer].skincolor = skins[players[fourthdisplayplayer].skin].prefcolor;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2961,15 +2961,13 @@ boolean P_SetupLevel(boolean skipprecip)
|
||||||
if (cv_useranalog.value)
|
if (cv_useranalog.value)
|
||||||
CV_SetValue(&cv_analog, true);
|
CV_SetValue(&cv_analog, true);
|
||||||
|
|
||||||
if ((splitscreen || splitscreen3 || splitscreen4) && cv_useranalog2.value)
|
if ((splitscreen && cv_useranalog2.value) || botingame)
|
||||||
CV_SetValue(&cv_analog2, true);
|
|
||||||
else if (botingame)
|
|
||||||
CV_SetValue(&cv_analog2, true);
|
CV_SetValue(&cv_analog2, true);
|
||||||
|
|
||||||
if ((splitscreen3 || splitscreen4) && cv_useranalog3.value)
|
if (splitscreen > 1 && cv_useranalog3.value)
|
||||||
CV_SetValue(&cv_analog3, true);
|
CV_SetValue(&cv_analog3, true);
|
||||||
|
|
||||||
if (splitscreen4 && cv_useranalog4.value)
|
if (splitscreen > 2 && cv_useranalog4.value)
|
||||||
CV_SetValue(&cv_analog4, true);
|
CV_SetValue(&cv_analog4, true);
|
||||||
|
|
||||||
if (twodlevel)
|
if (twodlevel)
|
||||||
|
|
12
src/p_spec.c
12
src/p_spec.c
|
@ -2381,21 +2381,21 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
||||||
{
|
{
|
||||||
if (bot) // This might put poor Tails in a wall if he's too far behind! D: But okay, whatever! >:3
|
if (bot) // This might put poor Tails in a wall if he's too far behind! D: But okay, whatever! >:3
|
||||||
P_TeleportMove(bot, bot->x + x, bot->y + y, bot->z + z);
|
P_TeleportMove(bot, bot->x + x, bot->y + y, bot->z + z);
|
||||||
if (splitscreen4 && mo->player == &players[fourthdisplayplayer] && camera4.chase)
|
if (splitscreen > 2 && mo->player == &players[fourthdisplayplayer] && camera4.chase)
|
||||||
{
|
{
|
||||||
camera4.x += x;
|
camera4.x += x;
|
||||||
camera4.y += y;
|
camera4.y += y;
|
||||||
camera4.z += z;
|
camera4.z += z;
|
||||||
camera4.subsector = R_PointInSubsector(camera4.x, camera4.y);
|
camera4.subsector = R_PointInSubsector(camera4.x, camera4.y);
|
||||||
}
|
}
|
||||||
else if ((splitscreen3 || splitscreen4) && mo->player == &players[thirddisplayplayer] && camera3.chase)
|
else if (splitscreen > 1 && mo->player == &players[thirddisplayplayer] && camera3.chase)
|
||||||
{
|
{
|
||||||
camera3.x += x;
|
camera3.x += x;
|
||||||
camera3.y += y;
|
camera3.y += y;
|
||||||
camera3.z += z;
|
camera3.z += z;
|
||||||
camera3.subsector = R_PointInSubsector(camera3.x, camera3.y);
|
camera3.subsector = R_PointInSubsector(camera3.x, camera3.y);
|
||||||
}
|
}
|
||||||
else if ((splitscreen || splitscreen3 || splitscreen4) && mo->player == &players[secondarydisplayplayer] && camera2.chase)
|
else if (splitscreen && mo->player == &players[secondarydisplayplayer] && camera2.chase)
|
||||||
{
|
{
|
||||||
camera2.x += x;
|
camera2.x += x;
|
||||||
camera2.y += y;
|
camera2.y += y;
|
||||||
|
@ -3898,7 +3898,7 @@ DoneSection2:
|
||||||
HU_SetCEchoDuration(5);
|
HU_SetCEchoDuration(5);
|
||||||
HU_DoCEcho(va(M_GetText("%s\\captured the blue flag.\\\\\\\\"), player_names[player-players]));
|
HU_DoCEcho(va(M_GetText("%s\\captured the blue flag.\\\\\\\\"), player_names[player-players]));
|
||||||
|
|
||||||
if ((splitscreen || splitscreen3 || splitscreen4) || players[consoleplayer].ctfteam == 1)
|
if (splitscreen || players[consoleplayer].ctfteam == 1)
|
||||||
S_StartSound(NULL, sfx_flgcap);
|
S_StartSound(NULL, sfx_flgcap);
|
||||||
else if (players[consoleplayer].ctfteam == 2)
|
else if (players[consoleplayer].ctfteam == 2)
|
||||||
S_StartSound(NULL, sfx_lose);
|
S_StartSound(NULL, sfx_lose);
|
||||||
|
@ -3931,7 +3931,7 @@ DoneSection2:
|
||||||
HU_SetCEchoDuration(5);
|
HU_SetCEchoDuration(5);
|
||||||
HU_DoCEcho(va(M_GetText("%s\\captured the red flag.\\\\\\\\"), player_names[player-players]));
|
HU_DoCEcho(va(M_GetText("%s\\captured the red flag.\\\\\\\\"), player_names[player-players]));
|
||||||
|
|
||||||
if ((splitscreen || splitscreen3 || splitscreen4) || players[consoleplayer].ctfteam == 2)
|
if (splitscreen || players[consoleplayer].ctfteam == 2)
|
||||||
S_StartSound(NULL, sfx_flgcap);
|
S_StartSound(NULL, sfx_flgcap);
|
||||||
else if (players[consoleplayer].ctfteam == 1)
|
else if (players[consoleplayer].ctfteam == 1)
|
||||||
S_StartSound(NULL, sfx_lose);
|
S_StartSound(NULL, sfx_lose);
|
||||||
|
@ -4189,7 +4189,7 @@ DoneSection2:
|
||||||
if (P_IsLocalPlayer(player))
|
if (P_IsLocalPlayer(player))
|
||||||
{
|
{
|
||||||
// SRB2kart 200117
|
// SRB2kart 200117
|
||||||
if (!(splitscreen || splitscreen3 || splitscreen4))
|
if (!splitscreen)
|
||||||
{
|
{
|
||||||
if (player->kartstuff[k_position] == 1)
|
if (player->kartstuff[k_position] == 1)
|
||||||
S_ChangeMusicInternal("karwin", true);
|
S_ChangeMusicInternal("karwin", true);
|
||||||
|
|
|
@ -73,11 +73,11 @@ void P_MixUp(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle,
|
||||||
localangle4 = angle;
|
localangle4 = angle;
|
||||||
|
|
||||||
// move chasecam at new player location
|
// move chasecam at new player location
|
||||||
if (splitscreen4 && camera4.chase && thing->player == &players[fourthdisplayplayer])
|
if (splitscreen > 2 && camera4.chase && thing->player == &players[fourthdisplayplayer])
|
||||||
P_ResetCamera(thing->player, &camera4);
|
P_ResetCamera(thing->player, &camera4);
|
||||||
else if ((splitscreen3 || splitscreen4) && camera3.chase && thing->player == &players[thirddisplayplayer])
|
else if (splitscreen > 1 && camera3.chase && thing->player == &players[thirddisplayplayer])
|
||||||
P_ResetCamera(thing->player, &camera3);
|
P_ResetCamera(thing->player, &camera3);
|
||||||
else if ((splitscreen || splitscreen3 || splitscreen4) && camera2.chase && thing->player == &players[secondarydisplayplayer])
|
else if (splitscreen && camera2.chase && thing->player == &players[secondarydisplayplayer])
|
||||||
P_ResetCamera(thing->player, &camera2);
|
P_ResetCamera(thing->player, &camera2);
|
||||||
else if (camera.chase && thing->player == &players[displayplayer])
|
else if (camera.chase && thing->player == &players[displayplayer])
|
||||||
P_ResetCamera(thing->player, &camera);
|
P_ResetCamera(thing->player, &camera);
|
||||||
|
@ -158,11 +158,11 @@ boolean P_Teleport(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle
|
||||||
localangle4 = angle;
|
localangle4 = angle;
|
||||||
|
|
||||||
// move chasecam at new player location
|
// move chasecam at new player location
|
||||||
if (splitscreen4 && camera4.chase && thing->player == &players[fourthdisplayplayer])
|
if (splitscreen > 2 && camera4.chase && thing->player == &players[fourthdisplayplayer])
|
||||||
P_ResetCamera(thing->player, &camera4);
|
P_ResetCamera(thing->player, &camera4);
|
||||||
else if ((splitscreen3 || splitscreen4) && camera3.chase && thing->player == &players[thirddisplayplayer])
|
else if (splitscreen > 1 && camera3.chase && thing->player == &players[thirddisplayplayer])
|
||||||
P_ResetCamera(thing->player, &camera3);
|
P_ResetCamera(thing->player, &camera3);
|
||||||
else if ((splitscreen || splitscreen3 || splitscreen4) && camera2.chase && thing->player == &players[secondarydisplayplayer])
|
else if (splitscreen && camera2.chase && thing->player == &players[secondarydisplayplayer])
|
||||||
P_ResetCamera(thing->player, &camera2);
|
P_ResetCamera(thing->player, &camera2);
|
||||||
else if (camera.chase && thing->player == &players[displayplayer])
|
else if (camera.chase && thing->player == &players[displayplayer])
|
||||||
P_ResetCamera(thing->player, &camera);
|
P_ResetCamera(thing->player, &camera);
|
||||||
|
|
54
src/p_user.c
54
src/p_user.c
|
@ -1396,9 +1396,9 @@ fixed_t P_GetPlayerSpinHeight(player_t *player)
|
||||||
//
|
//
|
||||||
boolean P_IsLocalPlayer(player_t *player)
|
boolean P_IsLocalPlayer(player_t *player)
|
||||||
{
|
{
|
||||||
return ((splitscreen4 && player == &players[fourthdisplayplayer])
|
return ((splitscreen > 2 && player == &players[fourthdisplayplayer])
|
||||||
|| ((splitscreen3 || splitscreen4) && player == &players[thirddisplayplayer])
|
|| (splitscreen > 1 && player == &players[thirddisplayplayer])
|
||||||
|| ((splitscreen || splitscreen3 || splitscreen4) && player == &players[secondarydisplayplayer])
|
|| (splitscreen && player == &players[secondarydisplayplayer])
|
||||||
|| player == &players[consoleplayer]);
|
|| player == &players[consoleplayer]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1663,7 +1663,7 @@ void P_DoPlayerExit(player_t *player)
|
||||||
|
|
||||||
if (P_IsLocalPlayer(player) && cv_inttime.value > 0)
|
if (P_IsLocalPlayer(player) && cv_inttime.value > 0)
|
||||||
{
|
{
|
||||||
if (!(splitscreen || splitscreen3 || splitscreen4))
|
if (!splitscreen)
|
||||||
{
|
{
|
||||||
if (player->kartstuff[k_position] == 1)
|
if (player->kartstuff[k_position] == 1)
|
||||||
S_ChangeMusicInternal("karwin", true);
|
S_ChangeMusicInternal("karwin", true);
|
||||||
|
@ -2388,7 +2388,7 @@ static void P_DoPlayerHeadSigns(player_t *player)
|
||||||
{
|
{
|
||||||
// Spawn a got-flag message over the head of the player that
|
// Spawn a got-flag message over the head of the player that
|
||||||
// has it (but not on your own screen if you have the flag).
|
// has it (but not on your own screen if you have the flag).
|
||||||
if ((splitscreen || splitscreen3 || splitscreen4) || player != &players[consoleplayer])
|
if (splitscreen || player != &players[consoleplayer])
|
||||||
{
|
{
|
||||||
if (player->gotflag & GF_REDFLAG)
|
if (player->gotflag & GF_REDFLAG)
|
||||||
{
|
{
|
||||||
|
@ -4388,11 +4388,11 @@ INT32 P_GetPlayerControlDirection(player_t *player)
|
||||||
fixed_t tempx = 0, tempy = 0;
|
fixed_t tempx = 0, tempy = 0;
|
||||||
angle_t tempangle, origtempangle;
|
angle_t tempangle, origtempangle;
|
||||||
|
|
||||||
if (splitscreen4 && player == &players[fourthdisplayplayer])
|
if (splitscreen > 2 && player == &players[fourthdisplayplayer])
|
||||||
thiscam = &camera4;
|
thiscam = &camera4;
|
||||||
else if ((splitscreen3 || splitscreen4) && player == &players[thirddisplayplayer])
|
else if (splitscreen > 1 && player == &players[thirddisplayplayer])
|
||||||
thiscam = &camera3;
|
thiscam = &camera3;
|
||||||
else if ((splitscreen || splitscreen3 || splitscreen4) && player == &players[secondarydisplayplayer])
|
else if (splitscreen && player == &players[secondarydisplayplayer])
|
||||||
thiscam = &camera2;
|
thiscam = &camera2;
|
||||||
else
|
else
|
||||||
thiscam = &camera;
|
thiscam = &camera;
|
||||||
|
@ -6804,9 +6804,9 @@ static void P_MovePlayer(player_t *player)
|
||||||
// Ok, we'll stop now.
|
// Ok, we'll stop now.
|
||||||
else if ((player->kartstuff[k_drift] == 0)
|
else if ((player->kartstuff[k_drift] == 0)
|
||||||
&& (player == &players[consoleplayer]
|
&& (player == &players[consoleplayer]
|
||||||
|| ((splitscreen || splitscreen3 || splitscreen4) && player == &players[secondarydisplayplayer])
|
|| (splitscreen && player == &players[secondarydisplayplayer])
|
||||||
|| ((splitscreen3 || splitscreen4) && player == &players[thirddisplayplayer])
|
|| (splitscreen > 1 && player == &players[thirddisplayplayer])
|
||||||
|| (splitscreen4 && player == &players[fourthdisplayplayer])))
|
|| (splitscreen > 2 && player == &players[fourthdisplayplayer])))
|
||||||
S_StopSoundByID(player->mo, sfx_mkdrft);
|
S_StopSoundByID(player->mo, sfx_mkdrft);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8531,12 +8531,12 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
||||||
dist = camdist;
|
dist = camdist;
|
||||||
|
|
||||||
// in splitscreen modes, mess with the camera distances to make it feel proportional to how it feels normally
|
// in splitscreen modes, mess with the camera distances to make it feel proportional to how it feels normally
|
||||||
if (splitscreen) // widescreen splits should get x1.5 distance
|
if (splitscreen == 1) // widescreen splits should get x1.5 distance
|
||||||
{
|
{
|
||||||
dist = FixedMul(dist, 3*FRACUNIT/2);
|
dist = FixedMul(dist, 3*FRACUNIT/2);
|
||||||
height = FixedMul(height, 3*FRACUNIT/2);
|
height = FixedMul(height, 3*FRACUNIT/2);
|
||||||
}
|
}
|
||||||
else if (splitscreen3 || splitscreen4) // smallscreen splits should get 7/8 distance (shorter feels better, oddly enough)
|
else if (splitscreen > 1) // smallscreen splits should get 7/8 distance (shorter feels better, oddly enough)
|
||||||
{
|
{
|
||||||
dist = FixedMul(dist, 7*FRACUNIT/8);
|
dist = FixedMul(dist, 7*FRACUNIT/8);
|
||||||
height = FixedMul(height, 7*FRACUNIT/8);
|
height = FixedMul(height, 7*FRACUNIT/8);
|
||||||
|
@ -8870,7 +8870,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make player translucent if camera is too close (only in single player).
|
// Make player translucent if camera is too close (only in single player).
|
||||||
/*if (!(multiplayer || netgame) && !(splitscreen || splitscreen3 || splitscreen4))
|
/*if (!(multiplayer || netgame) && !splitscreen)
|
||||||
{
|
{
|
||||||
fixed_t vx = 0, vy = 0;
|
fixed_t vx = 0, vy = 0;
|
||||||
if (player->awayviewtics) {
|
if (player->awayviewtics) {
|
||||||
|
@ -9045,17 +9045,17 @@ static void P_CalcPostImg(player_t *player)
|
||||||
pviewheight = player->awayviewmobj->z + 20*FRACUNIT;
|
pviewheight = player->awayviewmobj->z + 20*FRACUNIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (splitscreen4 && player == &players[fourthdisplayplayer])
|
if (splitscreen > 2 && player == &players[fourthdisplayplayer])
|
||||||
{
|
{
|
||||||
type = &postimgtype4;
|
type = &postimgtype4;
|
||||||
param = &postimgparam4;
|
param = &postimgparam4;
|
||||||
}
|
}
|
||||||
else if ((splitscreen3 || splitscreen4) && player == &players[thirddisplayplayer])
|
else if (splitscreen > 1 && player == &players[thirddisplayplayer])
|
||||||
{
|
{
|
||||||
type = &postimgtype3;
|
type = &postimgtype3;
|
||||||
param = &postimgparam3;
|
param = &postimgparam3;
|
||||||
}
|
}
|
||||||
else if ((splitscreen || splitscreen3 || splitscreen4) && player == &players[secondarydisplayplayer])
|
else if (splitscreen && player == &players[secondarydisplayplayer])
|
||||||
{
|
{
|
||||||
type = &postimgtype2;
|
type = &postimgtype2;
|
||||||
param = &postimgparam2;
|
param = &postimgparam2;
|
||||||
|
@ -9410,7 +9410,7 @@ void P_PlayerThink(player_t *player)
|
||||||
player->realtime = 0;
|
player->realtime = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((netgame || (splitscreen || splitscreen3 || splitscreen4)) && player->spectator && cmd->buttons & BT_ATTACK && !player->powers[pw_flashing])
|
if ((netgame || splitscreen) && player->spectator && cmd->buttons & BT_ATTACK && !player->powers[pw_flashing])
|
||||||
{
|
{
|
||||||
if (P_SpectatorJoinGame(player))
|
if (P_SpectatorJoinGame(player))
|
||||||
return; // player->mo was removed.
|
return; // player->mo was removed.
|
||||||
|
@ -9525,9 +9525,9 @@ void P_PlayerThink(player_t *player)
|
||||||
// Why not just not spawn the mobj? Well, I'd rather only flirt with
|
// Why not just not spawn the mobj? Well, I'd rather only flirt with
|
||||||
// consistency so much...
|
// consistency so much...
|
||||||
if ((player == &players[displayplayer] && !camera.chase)
|
if ((player == &players[displayplayer] && !camera.chase)
|
||||||
|| ((splitscreen || splitscreen3 || splitscreen4) && player == &players[secondarydisplayplayer] && !camera2.chase)
|
|| (splitscreen && player == &players[secondarydisplayplayer] && !camera2.chase)
|
||||||
|| ((splitscreen3 || splitscreen4) && player == &players[thirddisplayplayer] && !camera3.chase)
|
|| (splitscreen > 1 && player == &players[thirddisplayplayer] && !camera3.chase)
|
||||||
|| (splitscreen4 && player == &players[fourthdisplayplayer] && !camera4.chase))
|
|| (splitscreen > 2 && player == &players[fourthdisplayplayer] && !camera4.chase))
|
||||||
gmobj->flags2 |= MF2_DONTDRAW;
|
gmobj->flags2 |= MF2_DONTDRAW;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -9653,9 +9653,9 @@ void P_PlayerThink(player_t *player)
|
||||||
{
|
{
|
||||||
// SRB2kart - fixes boo not flashing when it should. Mega doesn't flash either. Flashing is local.
|
// SRB2kart - fixes boo not flashing when it should. Mega doesn't flash either. Flashing is local.
|
||||||
if ((player == &players[displayplayer]
|
if ((player == &players[displayplayer]
|
||||||
|| ((splitscreen || splitscreen3 || splitscreen4) && player == &players[secondarydisplayplayer])
|
|| (splitscreen && player == &players[secondarydisplayplayer])
|
||||||
|| ((splitscreen3 || splitscreen4) && player == &players[thirddisplayplayer])
|
|| (splitscreen > 1 && player == &players[thirddisplayplayer])
|
||||||
|| (splitscreen4 && player == &players[fourthdisplayplayer]))
|
|| (splitscreen > 2 && player == &players[fourthdisplayplayer]))
|
||||||
&& player->kartstuff[k_bootimer] == 0 && player->kartstuff[k_growshrinktimer] <= 0
|
&& player->kartstuff[k_bootimer] == 0 && player->kartstuff[k_growshrinktimer] <= 0
|
||||||
&& (player->kartstuff[k_comebacktimer] == 0 || (gametype == GT_RACE || player->kartstuff[k_balloon] > 0)))
|
&& (player->kartstuff[k_comebacktimer] == 0 || (gametype == GT_RACE || player->kartstuff[k_balloon] > 0)))
|
||||||
{
|
{
|
||||||
|
@ -9746,11 +9746,11 @@ void P_PlayerAfterThink(player_t *player)
|
||||||
P_PlayerInSpecialSector(player);
|
P_PlayerInSpecialSector(player);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (splitscreen4 && player == &players[fourthdisplayplayer])
|
if (splitscreen > 2 && player == &players[fourthdisplayplayer])
|
||||||
thiscam = &camera4;
|
thiscam = &camera4;
|
||||||
else if ((splitscreen3 || splitscreen4) && player == &players[thirddisplayplayer])
|
else if (splitscreen > 1 && player == &players[thirddisplayplayer])
|
||||||
thiscam = &camera3;
|
thiscam = &camera3;
|
||||||
else if ((splitscreen || splitscreen3 || splitscreen4) && player == &players[secondarydisplayplayer])
|
else if (splitscreen && player == &players[secondarydisplayplayer])
|
||||||
thiscam = &camera2;
|
thiscam = &camera2;
|
||||||
else if (player == &players[displayplayer])
|
else if (player == &players[displayplayer])
|
||||||
thiscam = &camera;
|
thiscam = &camera;
|
||||||
|
|
|
@ -257,11 +257,11 @@ sector_t *R_FakeFlat(sector_t *sec, sector_t *tempsec, INT32 *floorlightlevel,
|
||||||
INT32 heightsec;
|
INT32 heightsec;
|
||||||
boolean underwater;
|
boolean underwater;
|
||||||
|
|
||||||
if (splitscreen4 && viewplayer == &players[fourthdisplayplayer] && camera4.chase)
|
if (splitscreen > 2 && viewplayer == &players[fourthdisplayplayer] && camera4.chase)
|
||||||
heightsec = R_PointInSubsector(camera4.x, camera4.y)->sector->heightsec;
|
heightsec = R_PointInSubsector(camera4.x, camera4.y)->sector->heightsec;
|
||||||
else if ((splitscreen3 || splitscreen4) && viewplayer == &players[thirddisplayplayer] && camera3.chase)
|
else if (splitscreen > 1 && viewplayer == &players[thirddisplayplayer] && camera3.chase)
|
||||||
heightsec = R_PointInSubsector(camera3.x, camera3.y)->sector->heightsec;
|
heightsec = R_PointInSubsector(camera3.x, camera3.y)->sector->heightsec;
|
||||||
else if ((splitscreen || splitscreen3 || splitscreen4) && viewplayer == &players[secondarydisplayplayer] && camera2.chase)
|
else if (splitscreen && viewplayer == &players[secondarydisplayplayer] && camera2.chase)
|
||||||
heightsec = R_PointInSubsector(camera2.x, camera2.y)->sector->heightsec;
|
heightsec = R_PointInSubsector(camera2.x, camera2.y)->sector->heightsec;
|
||||||
else if (camera.chase && viewplayer == &players[displayplayer])
|
else if (camera.chase && viewplayer == &players[displayplayer])
|
||||||
heightsec = R_PointInSubsector(camera.x, camera.y)->sector->heightsec;
|
heightsec = R_PointInSubsector(camera.x, camera.y)->sector->heightsec;
|
||||||
|
|
|
@ -633,7 +633,7 @@ void R_InitViewBuffer(INT32 width, INT32 height)
|
||||||
for (i = 0; i < height; i++)
|
for (i = 0; i < height; i++)
|
||||||
{
|
{
|
||||||
ylookup[i] = ylookup1[i] = screens[0] + i*vid.width*bytesperpixel;
|
ylookup[i] = ylookup1[i] = screens[0] + i*vid.width*bytesperpixel;
|
||||||
if (splitscreen)
|
if (splitscreen == 1)
|
||||||
ylookup2[i] = screens[0] + (i+viewheight)*vid.width*bytesperpixel;
|
ylookup2[i] = screens[0] + (i+viewheight)*vid.width*bytesperpixel;
|
||||||
else
|
else
|
||||||
ylookup2[i] = screens[0] + i*vid.width*bytesperpixel + (viewwidth*bytesperpixel);
|
ylookup2[i] = screens[0] + i*vid.width*bytesperpixel + (viewwidth*bytesperpixel);
|
||||||
|
|
75
src/r_main.c
75
src/r_main.c
|
@ -176,12 +176,14 @@ consvar_t cv_maxportals = {"maxportals", "2", CV_SAVE, maxportals_cons_t, NULL,
|
||||||
|
|
||||||
void SplitScreen_OnChange(void)
|
void SplitScreen_OnChange(void)
|
||||||
{
|
{
|
||||||
|
UINT8 i;
|
||||||
|
|
||||||
if (!cv_debug && netgame)
|
if (!cv_debug && netgame)
|
||||||
{
|
{
|
||||||
if (splitscreen || splitscreen3 || splitscreen4)
|
if (splitscreen)
|
||||||
{
|
{
|
||||||
CONS_Alert(CONS_NOTICE, M_GetText("Splitscreen not supported in netplay, sorry!\n"));
|
CONS_Alert(CONS_NOTICE, M_GetText("Splitscreen not supported in netplay, sorry!\n"));
|
||||||
splitscreen = splitscreen3 = splitscreen4 = false;
|
splitscreen = 0;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -191,23 +193,23 @@ void SplitScreen_OnChange(void)
|
||||||
|
|
||||||
if (!demoplayback && !botingame)
|
if (!demoplayback && !botingame)
|
||||||
{
|
{
|
||||||
if (splitscreen || splitscreen3 || splitscreen4)
|
for (i = 1; i < 3; i++)
|
||||||
CL_AddSplitscreenPlayer();
|
{
|
||||||
else
|
if (i > splitscreen)
|
||||||
CL_RemoveSplitscreenPlayer(secondarydisplayplayer);
|
{
|
||||||
|
if (i == 1)
|
||||||
if (splitscreen3 || splitscreen4)
|
CL_RemoveSplitscreenPlayer(secondarydisplayplayer);
|
||||||
CL_AddSplitscreenPlayer();
|
else if (i == 2)
|
||||||
else
|
CL_RemoveSplitscreenPlayer(thirddisplayplayer);
|
||||||
CL_RemoveSplitscreenPlayer(thirddisplayplayer);
|
else if (i == 3)
|
||||||
|
CL_RemoveSplitscreenPlayer(fourthdisplayplayer);
|
||||||
if (splitscreen4)
|
}
|
||||||
CL_AddSplitscreenPlayer();
|
else
|
||||||
else
|
CL_AddSplitscreenPlayer();
|
||||||
CL_RemoveSplitscreenPlayer(fourthdisplayplayer);
|
}
|
||||||
|
|
||||||
if (server && !netgame)
|
if (server && !netgame)
|
||||||
multiplayer = (splitscreen || splitscreen3 || splitscreen4);
|
multiplayer = splitscreen;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -219,20 +221,11 @@ void SplitScreen_OnChange(void)
|
||||||
if (playeringame[i] && i != consoleplayer)
|
if (playeringame[i] && i != consoleplayer)
|
||||||
{
|
{
|
||||||
if (secondarydisplayplayer == consoleplayer)
|
if (secondarydisplayplayer == consoleplayer)
|
||||||
{
|
|
||||||
secondarydisplayplayer = i;
|
secondarydisplayplayer = i;
|
||||||
continue;
|
|
||||||
}
|
|
||||||
else if (thirddisplayplayer == consoleplayer)
|
else if (thirddisplayplayer == consoleplayer)
|
||||||
{
|
|
||||||
thirddisplayplayer = i;
|
thirddisplayplayer = i;
|
||||||
continue;
|
|
||||||
}
|
|
||||||
else if (fourthdisplayplayer == consoleplayer)
|
else if (fourthdisplayplayer == consoleplayer)
|
||||||
{
|
|
||||||
fourthdisplayplayer = i;
|
fourthdisplayplayer = i;
|
||||||
break;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -657,12 +650,12 @@ void R_ExecuteSetViewSize(void)
|
||||||
scaledviewwidth = vid.width;
|
scaledviewwidth = vid.width;
|
||||||
viewheight = vid.height;
|
viewheight = vid.height;
|
||||||
|
|
||||||
if (splitscreen || splitscreen3 || splitscreen4)
|
if (splitscreen)
|
||||||
viewheight >>= 1;
|
viewheight >>= 1;
|
||||||
|
|
||||||
viewwidth = scaledviewwidth;
|
viewwidth = scaledviewwidth;
|
||||||
|
|
||||||
if (splitscreen3 || splitscreen4)
|
if (splitscreen > 1)
|
||||||
{
|
{
|
||||||
viewwidth >>= 1;
|
viewwidth >>= 1;
|
||||||
scaledviewwidth >>= 1;
|
scaledviewwidth >>= 1;
|
||||||
|
@ -832,11 +825,11 @@ void R_SkyboxFrame(player_t *player)
|
||||||
INT32 dy = 0;
|
INT32 dy = 0;
|
||||||
camera_t *thiscam;
|
camera_t *thiscam;
|
||||||
|
|
||||||
if (splitscreen4 && player == &players[fourthdisplayplayer])
|
if (splitscreen > 2 && player == &players[fourthdisplayplayer])
|
||||||
thiscam = &camera4;
|
thiscam = &camera4;
|
||||||
else if ((splitscreen3 || splitscreen4) && player == &players[thirddisplayplayer])
|
else if (splitscreen > 1 && player == &players[thirddisplayplayer])
|
||||||
thiscam = &camera3;
|
thiscam = &camera3;
|
||||||
else if ((splitscreen || splitscreen3 || splitscreen4) && player == &players[secondarydisplayplayer])
|
else if (splitscreen && player == &players[secondarydisplayplayer])
|
||||||
thiscam = &camera2;
|
thiscam = &camera2;
|
||||||
else
|
else
|
||||||
thiscam = &camera;
|
thiscam = &camera;
|
||||||
|
@ -1081,17 +1074,17 @@ void R_SetupFrame(player_t *player, boolean skybox)
|
||||||
camera_t *thiscam;
|
camera_t *thiscam;
|
||||||
boolean chasecam = false;
|
boolean chasecam = false;
|
||||||
|
|
||||||
if (splitscreen4 && player == &players[fourthdisplayplayer])
|
if (splitscreen > 2 && player == &players[fourthdisplayplayer])
|
||||||
{
|
{
|
||||||
thiscam = &camera4;
|
thiscam = &camera4;
|
||||||
chasecam = (cv_chasecam4.value != 0);
|
chasecam = (cv_chasecam4.value != 0);
|
||||||
}
|
}
|
||||||
else if ((splitscreen3 || splitscreen4) && player == &players[thirddisplayplayer])
|
else if (splitscreen > 1 && player == &players[thirddisplayplayer])
|
||||||
{
|
{
|
||||||
thiscam = &camera3;
|
thiscam = &camera3;
|
||||||
chasecam = (cv_chasecam3.value != 0);
|
chasecam = (cv_chasecam3.value != 0);
|
||||||
}
|
}
|
||||||
else if ((splitscreen || splitscreen3 || splitscreen4) && player == &players[secondarydisplayplayer])
|
else if (splitscreen && player == &players[secondarydisplayplayer])
|
||||||
{
|
{
|
||||||
thiscam = &camera2;
|
thiscam = &camera2;
|
||||||
chasecam = (cv_chasecam2.value != 0);
|
chasecam = (cv_chasecam2.value != 0);
|
||||||
|
@ -1345,18 +1338,18 @@ void R_RenderPlayerView(player_t *player)
|
||||||
|
|
||||||
if (cv_homremoval.value && player == &players[displayplayer]) // if this is display player 1
|
if (cv_homremoval.value && player == &players[displayplayer]) // if this is display player 1
|
||||||
{
|
{
|
||||||
if (cv_homremoval.value == 1 || splitscreen3) // BAD HACK, V_DrawFill isn't letting me cover up only the 4th screen, so let's just sliently force this
|
if (cv_homremoval.value == 1 || splitscreen == 2) // BAD HACK, V_DrawFill isn't letting me cover up only the 4th screen, so let's just sliently force this
|
||||||
V_DrawFill(0, 0, vid.width, vid.height, 31); // No HOM effect!
|
V_DrawFill(0, 0, vid.width, vid.height, 31); // No HOM effect!
|
||||||
else //'development' HOM removal -- makes it blindingly obvious if HOM is spotted.
|
else //'development' HOM removal -- makes it blindingly obvious if HOM is spotted.
|
||||||
V_DrawFill(0, 0, vid.width, vid.height, 128+(timeinmap&15));
|
V_DrawFill(0, 0, vid.width, vid.height, 128+(timeinmap&15));
|
||||||
}
|
}
|
||||||
|
|
||||||
// load previous saved value of skyVisible for the player
|
// load previous saved value of skyVisible for the player
|
||||||
if (splitscreen4 && player == &players[fourthdisplayplayer])
|
if (splitscreen > 2 && player == &players[fourthdisplayplayer])
|
||||||
skyVisible = skyVisible4;
|
skyVisible = skyVisible4;
|
||||||
else if ((splitscreen3 || splitscreen4) && player == &players[thirddisplayplayer])
|
else if (splitscreen > 1 && player == &players[thirddisplayplayer])
|
||||||
skyVisible = skyVisible3;
|
skyVisible = skyVisible3;
|
||||||
else if ((splitscreen || splitscreen3 || splitscreen4) && player == &players[secondarydisplayplayer])
|
else if (splitscreen && player == &players[secondarydisplayplayer])
|
||||||
skyVisible = skyVisible2;
|
skyVisible = skyVisible2;
|
||||||
else
|
else
|
||||||
skyVisible = skyVisible1;
|
skyVisible = skyVisible1;
|
||||||
|
@ -1462,11 +1455,11 @@ void R_RenderPlayerView(player_t *player)
|
||||||
|
|
||||||
// save value to skyVisible1 or skyVisible2
|
// save value to skyVisible1 or skyVisible2
|
||||||
// this is so that P1 can't affect whether P2 can see a skybox or not, or vice versa
|
// this is so that P1 can't affect whether P2 can see a skybox or not, or vice versa
|
||||||
if (splitscreen4 && player == &players[fourthdisplayplayer])
|
if (splitscreen > 2 && player == &players[fourthdisplayplayer])
|
||||||
skyVisible4 = skyVisible;
|
skyVisible4 = skyVisible;
|
||||||
else if ((splitscreen3 || splitscreen4) && player == &players[thirddisplayplayer])
|
else if (splitscreen > 1 && player == &players[thirddisplayplayer])
|
||||||
skyVisible3 = skyVisible;
|
skyVisible3 = skyVisible;
|
||||||
else if ((splitscreen || splitscreen3 || splitscreen4) && player == &players[secondarydisplayplayer])
|
else if (splitscreen && player == &players[secondarydisplayplayer])
|
||||||
skyVisible2 = skyVisible;
|
skyVisible2 = skyVisible;
|
||||||
else
|
else
|
||||||
skyVisible1 = skyVisible;
|
skyVisible1 = skyVisible;
|
||||||
|
|
|
@ -858,12 +858,12 @@ void R_DrawSinglePlane(visplane_t *pl)
|
||||||
if (bottom > vid.height)
|
if (bottom > vid.height)
|
||||||
bottom = vid.height;
|
bottom = vid.height;
|
||||||
|
|
||||||
if (splitscreen4 && viewplayer == &players[fourthdisplayplayer]) // Only copy the part of the screen we need
|
if (splitscreen > 2 && viewplayer == &players[fourthdisplayplayer]) // Only copy the part of the screen we need
|
||||||
scr = (screens[0] + (top+(viewheight))*vid.width + viewwidth);
|
scr = (screens[0] + (top+(viewheight))*vid.width + viewwidth);
|
||||||
else if ((splitscreen && viewplayer == &players[secondarydisplayplayer])
|
else if ((splitscreen == 1 && viewplayer == &players[secondarydisplayplayer])
|
||||||
|| ((splitscreen3 || splitscreen4) && viewplayer == &players[thirddisplayplayer]))
|
|| (splitscreen > 1 && viewplayer == &players[thirddisplayplayer]))
|
||||||
scr = (screens[0] + (top+(viewheight))*vid.width);
|
scr = (screens[0] + (top+(viewheight))*vid.width);
|
||||||
else if ((splitscreen3 || splitscreen4) && viewplayer == &players[secondarydisplayplayer])
|
else if (splitscreen > 1 && viewplayer == &players[secondarydisplayplayer])
|
||||||
scr = (screens[0] + ((top)*vid.width) + viewwidth);
|
scr = (screens[0] + ((top)*vid.width) + viewwidth);
|
||||||
else
|
else
|
||||||
scr = (screens[0] + ((top)*vid.width));
|
scr = (screens[0] + ((top)*vid.width));
|
||||||
|
|
|
@ -414,25 +414,25 @@ void S_StartSoundAtVolume(const void *origin_p, sfxenum_t sfx_id, INT32 volume)
|
||||||
if (players[displayplayer].awayviewtics)
|
if (players[displayplayer].awayviewtics)
|
||||||
listenmobj = players[displayplayer].awayviewmobj;
|
listenmobj = players[displayplayer].awayviewmobj;
|
||||||
|
|
||||||
if (splitscreen || splitscreen3 || splitscreen4)
|
if (splitscreen)
|
||||||
{
|
{
|
||||||
listenmobj2 = players[secondarydisplayplayer].mo;
|
listenmobj2 = players[secondarydisplayplayer].mo;
|
||||||
if (players[secondarydisplayplayer].awayviewtics)
|
if (players[secondarydisplayplayer].awayviewtics)
|
||||||
listenmobj2 = players[secondarydisplayplayer].awayviewmobj;
|
listenmobj2 = players[secondarydisplayplayer].awayviewmobj;
|
||||||
}
|
|
||||||
|
|
||||||
if (splitscreen3 || splitscreen4)
|
if (splitscreen > 1)
|
||||||
{
|
{
|
||||||
listenmobj3 = players[thirddisplayplayer].mo;
|
listenmobj3 = players[thirddisplayplayer].mo;
|
||||||
if (players[thirddisplayplayer].awayviewtics)
|
if (players[thirddisplayplayer].awayviewtics)
|
||||||
listenmobj3 = players[thirddisplayplayer].awayviewmobj;
|
listenmobj3 = players[thirddisplayplayer].awayviewmobj;
|
||||||
}
|
|
||||||
|
|
||||||
if (splitscreen4)
|
if (splitscreen > 2)
|
||||||
{
|
{
|
||||||
listenmobj4 = players[fourthdisplayplayer].mo;
|
listenmobj4 = players[fourthdisplayplayer].mo;
|
||||||
if (players[fourthdisplayplayer].awayviewtics)
|
if (players[fourthdisplayplayer].awayviewtics)
|
||||||
listenmobj4 = players[fourthdisplayplayer].awayviewmobj;
|
listenmobj4 = players[fourthdisplayplayer].awayviewmobj;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HW3SOUND
|
#ifdef HW3SOUND
|
||||||
|
@ -531,7 +531,7 @@ void S_StartSoundAtVolume(const void *origin_p, sfxenum_t sfx_id, INT32 volume)
|
||||||
pitch = NORM_PITCH;
|
pitch = NORM_PITCH;
|
||||||
priority = NORM_PRIORITY;
|
priority = NORM_PRIORITY;
|
||||||
|
|
||||||
if ((splitscreen || splitscreen3 || splitscreen4) && listenmobj2) // Copy the sound for the split player
|
if (splitscreen && listenmobj2) // Copy the sound for the split player
|
||||||
{
|
{
|
||||||
// Check to see if it is audible, and if not, modify the params
|
// Check to see if it is audible, and if not, modify the params
|
||||||
if (origin && origin != listenmobj2)
|
if (origin && origin != listenmobj2)
|
||||||
|
@ -586,7 +586,7 @@ void S_StartSoundAtVolume(const void *origin_p, sfxenum_t sfx_id, INT32 volume)
|
||||||
channels[cnum].handle = I_StartSound(sfx_id, volume, sep, pitch, priority);
|
channels[cnum].handle = I_StartSound(sfx_id, volume, sep, pitch, priority);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((splitscreen3 || splitscreen4) && listenmobj3) // Copy the sound for the third player
|
if (splitscreen > 1 && listenmobj3) // Copy the sound for the third player
|
||||||
{
|
{
|
||||||
// Check to see if it is audible, and if not, modify the params
|
// Check to see if it is audible, and if not, modify the params
|
||||||
if (origin && origin != listenmobj3)
|
if (origin && origin != listenmobj3)
|
||||||
|
@ -641,7 +641,7 @@ void S_StartSoundAtVolume(const void *origin_p, sfxenum_t sfx_id, INT32 volume)
|
||||||
channels[cnum].handle = I_StartSound(sfx_id, volume, sep, pitch, priority);
|
channels[cnum].handle = I_StartSound(sfx_id, volume, sep, pitch, priority);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (splitscreen4 && listenmobj4) // Copy the sound for the split player
|
if (splitscreen > 2 && listenmobj4) // Copy the sound for the split player
|
||||||
{
|
{
|
||||||
// Check to see if it is audible, and if not, modify the params
|
// Check to see if it is audible, and if not, modify the params
|
||||||
if (origin && origin != listenmobj4)
|
if (origin && origin != listenmobj4)
|
||||||
|
@ -895,25 +895,25 @@ void S_UpdateSounds(void)
|
||||||
if (players[displayplayer].awayviewtics)
|
if (players[displayplayer].awayviewtics)
|
||||||
listenmobj = players[displayplayer].awayviewmobj;
|
listenmobj = players[displayplayer].awayviewmobj;
|
||||||
|
|
||||||
if (splitscreen || splitscreen3 || splitscreen4)
|
if (splitscreen)
|
||||||
{
|
{
|
||||||
listenmobj2 = players[secondarydisplayplayer].mo;
|
listenmobj2 = players[secondarydisplayplayer].mo;
|
||||||
if (players[secondarydisplayplayer].awayviewtics)
|
if (players[secondarydisplayplayer].awayviewtics)
|
||||||
listenmobj2 = players[secondarydisplayplayer].awayviewmobj;
|
listenmobj2 = players[secondarydisplayplayer].awayviewmobj;
|
||||||
}
|
|
||||||
|
|
||||||
if (splitscreen3 || splitscreen4)
|
if (splitscreen > 1)
|
||||||
{
|
{
|
||||||
listenmobj3 = players[thirddisplayplayer].mo;
|
listenmobj3 = players[thirddisplayplayer].mo;
|
||||||
if (players[thirddisplayplayer].awayviewtics)
|
if (players[thirddisplayplayer].awayviewtics)
|
||||||
listenmobj3 = players[thirddisplayplayer].awayviewmobj;
|
listenmobj3 = players[thirddisplayplayer].awayviewmobj;
|
||||||
}
|
|
||||||
|
|
||||||
if (splitscreen4)
|
if (splitscreen > 2)
|
||||||
{
|
{
|
||||||
listenmobj4 = players[fourthdisplayplayer].mo;
|
listenmobj4 = players[fourthdisplayplayer].mo;
|
||||||
if (players[fourthdisplayplayer].awayviewtics)
|
if (players[fourthdisplayplayer].awayviewtics)
|
||||||
listenmobj4 = players[fourthdisplayplayer].awayviewmobj;
|
listenmobj4 = players[fourthdisplayplayer].awayviewmobj;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (camera.chase && !players[displayplayer].awayviewtics)
|
if (camera.chase && !players[displayplayer].awayviewtics)
|
||||||
|
@ -1014,12 +1014,12 @@ void S_UpdateSounds(void)
|
||||||
// check non-local sounds for distance clipping
|
// check non-local sounds for distance clipping
|
||||||
// or modify their params
|
// or modify their params
|
||||||
if (c->origin && ((c->origin != players[consoleplayer].mo)
|
if (c->origin && ((c->origin != players[consoleplayer].mo)
|
||||||
|| ((splitscreen || splitscreen3 || splitscreen4) && c->origin != players[secondarydisplayplayer].mo)
|
|| (splitscreen && c->origin != players[secondarydisplayplayer].mo)
|
||||||
|| ((splitscreen3 || splitscreen4) && c->origin != players[thirddisplayplayer].mo)
|
|| (splitscreen > 1 && c->origin != players[thirddisplayplayer].mo)
|
||||||
|| (splitscreen4 && c->origin != players[fourthdisplayplayer].mo)))
|
|| (splitscreen > 2 && c->origin != players[fourthdisplayplayer].mo)))
|
||||||
{
|
{
|
||||||
// Whomever is closer gets the sound, but only in splitscreen.
|
// Whomever is closer gets the sound, but only in splitscreen.
|
||||||
if (listenmobj && listenmobj2 && (splitscreen || splitscreen3 || splitscreen4))
|
if (listenmobj && listenmobj2 && splitscreen)
|
||||||
{
|
{
|
||||||
const mobj_t *soundmobj = c->origin;
|
const mobj_t *soundmobj = c->origin;
|
||||||
|
|
||||||
|
@ -1045,7 +1045,7 @@ void S_UpdateSounds(void)
|
||||||
else
|
else
|
||||||
S_StopChannel(cnum);
|
S_StopChannel(cnum);
|
||||||
}
|
}
|
||||||
else if (listenmobj && listenmobj3 && (splitscreen3 || splitscreen4)) // TODO: make 3/4P compare their distances with all players, not just the first player and themselves V:
|
else if (listenmobj && listenmobj3 && splitscreen > 1) // TODO: make 3/4P compare their distances with all players, not just the first player and themselves V:
|
||||||
{
|
{
|
||||||
const mobj_t *soundmobj = c->origin;
|
const mobj_t *soundmobj = c->origin;
|
||||||
|
|
||||||
|
@ -1071,7 +1071,7 @@ void S_UpdateSounds(void)
|
||||||
else
|
else
|
||||||
S_StopChannel(cnum);
|
S_StopChannel(cnum);
|
||||||
}
|
}
|
||||||
else if (listenmobj && listenmobj4 && splitscreen4)
|
else if (listenmobj && listenmobj4 && splitscreen > 2)
|
||||||
{
|
{
|
||||||
const mobj_t *soundmobj = c->origin;
|
const mobj_t *soundmobj = c->origin;
|
||||||
|
|
||||||
|
@ -1097,7 +1097,7 @@ void S_UpdateSounds(void)
|
||||||
else
|
else
|
||||||
S_StopChannel(cnum);
|
S_StopChannel(cnum);
|
||||||
}
|
}
|
||||||
else if (listenmobj && !(splitscreen || splitscreen3 || splitscreen4))
|
else if (listenmobj && !splitscreen)
|
||||||
{
|
{
|
||||||
// In the case of a single player, he or she always should get updated sound.
|
// In the case of a single player, he or she always should get updated sound.
|
||||||
audible = S_AdjustSoundParams(listenmobj, c->origin, &volume, &sep, &pitch,
|
audible = S_AdjustSoundParams(listenmobj, c->origin, &volume, &sep, &pitch,
|
||||||
|
@ -1223,21 +1223,21 @@ INT32 S_AdjustSoundParams(const mobj_t *listener, const mobj_t *source, INT32 *v
|
||||||
listensource.z = camera.z;
|
listensource.z = camera.z;
|
||||||
listensource.angle = camera.angle;
|
listensource.angle = camera.angle;
|
||||||
}
|
}
|
||||||
else if ((splitscreen || splitscreen3 || splitscreen4) && listener == players[secondarydisplayplayer].mo && camera2.chase)
|
else if (splitscreen && listener == players[secondarydisplayplayer].mo && camera2.chase)
|
||||||
{
|
{
|
||||||
listensource.x = camera2.x;
|
listensource.x = camera2.x;
|
||||||
listensource.y = camera2.y;
|
listensource.y = camera2.y;
|
||||||
listensource.z = camera2.z;
|
listensource.z = camera2.z;
|
||||||
listensource.angle = camera2.angle;
|
listensource.angle = camera2.angle;
|
||||||
}
|
}
|
||||||
else if ((splitscreen3 || splitscreen4) && listener == players[thirddisplayplayer].mo && camera3.chase)
|
else if (splitscreen > 1 && listener == players[thirddisplayplayer].mo && camera3.chase)
|
||||||
{
|
{
|
||||||
listensource.x = camera3.x;
|
listensource.x = camera3.x;
|
||||||
listensource.y = camera3.y;
|
listensource.y = camera3.y;
|
||||||
listensource.z = camera3.z;
|
listensource.z = camera3.z;
|
||||||
listensource.angle = camera3.angle;
|
listensource.angle = camera3.angle;
|
||||||
}
|
}
|
||||||
else if (splitscreen4 && listener == players[fourthdisplayplayer].mo && camera4.chase)
|
else if (splitscreen > 2 && listener == players[fourthdisplayplayer].mo && camera4.chase)
|
||||||
{
|
{
|
||||||
listensource.x = camera4.x;
|
listensource.x = camera4.x;
|
||||||
listensource.y = camera4.y;
|
listensource.y = camera4.y;
|
||||||
|
|
|
@ -229,7 +229,7 @@ void ST_doPaletteStuff(void)
|
||||||
if (rendermode != render_none)
|
if (rendermode != render_none)
|
||||||
{
|
{
|
||||||
V_SetPaletteLump(GetPalette()); // Reset the palette
|
V_SetPaletteLump(GetPalette()); // Reset the palette
|
||||||
if (!(splitscreen || splitscreen3 || splitscreen4))
|
if (!splitscreen)
|
||||||
V_SetPalette(palette);
|
V_SetPalette(palette);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -445,7 +445,7 @@ static INT32 SCY(INT32 y)
|
||||||
// do not scale to resolution for hardware accelerated
|
// do not scale to resolution for hardware accelerated
|
||||||
// because these modes always scale by default
|
// because these modes always scale by default
|
||||||
y = SCZ(y); // scale to resolution
|
y = SCZ(y); // scale to resolution
|
||||||
if (splitscreen || splitscreen3 || splitscreen4)
|
if (splitscreen)
|
||||||
{
|
{
|
||||||
y >>= 1;
|
y >>= 1;
|
||||||
if (stplyr != &players[displayplayer])
|
if (stplyr != &players[displayplayer])
|
||||||
|
@ -459,7 +459,7 @@ static INT32 STRINGY(INT32 y)
|
||||||
//31/10/99: fixed by Hurdler so it _works_ also in hardware mode
|
//31/10/99: fixed by Hurdler so it _works_ also in hardware mode
|
||||||
// do not scale to resolution for hardware accelerated
|
// do not scale to resolution for hardware accelerated
|
||||||
// because these modes always scale by default
|
// because these modes always scale by default
|
||||||
if (splitscreen || splitscreen3 || splitscreen4)
|
if (splitscreen)
|
||||||
{
|
{
|
||||||
y >>= 1;
|
y >>= 1;
|
||||||
if (stplyr != &players[displayplayer])
|
if (stplyr != &players[displayplayer])
|
||||||
|
@ -472,7 +472,7 @@ static INT32 STRINGY(INT32 y)
|
||||||
static INT32 SPLITFLAGS(INT32 f)
|
static INT32 SPLITFLAGS(INT32 f)
|
||||||
{
|
{
|
||||||
// Pass this V_SNAPTO(TOP|BOTTOM) and it'll trim them to account for splitscreen! -Red
|
// Pass this V_SNAPTO(TOP|BOTTOM) and it'll trim them to account for splitscreen! -Red
|
||||||
if (splitscreen || splitscreen3 || splitscreen4)
|
if (splitscreen)
|
||||||
{
|
{
|
||||||
if (stplyr != &players[displayplayer])
|
if (stplyr != &players[displayplayer])
|
||||||
f &= ~V_SNAPTOTOP;
|
f &= ~V_SNAPTOTOP;
|
||||||
|
@ -496,7 +496,7 @@ static INT32 SCR(INT32 r)
|
||||||
// do not scale to resolution for hardware accelerated
|
// do not scale to resolution for hardware accelerated
|
||||||
// because these modes always scale by default
|
// because these modes always scale by default
|
||||||
y = FixedMul(r*FRACUNIT, vid.fdupy); // scale to resolution
|
y = FixedMul(r*FRACUNIT, vid.fdupy); // scale to resolution
|
||||||
if (splitscreen || splitscreen3 || splitscreen4)
|
if (splitscreen)
|
||||||
{
|
{
|
||||||
y >>= 1;
|
y >>= 1;
|
||||||
if (stplyr != &players[displayplayer])
|
if (stplyr != &players[displayplayer])
|
||||||
|
@ -668,7 +668,7 @@ static void ST_drawTime(void)
|
||||||
ST_DrawPatchFromHudWS(HUD_TIMECOLON, sbocolon); // Colon
|
ST_DrawPatchFromHudWS(HUD_TIMECOLON, sbocolon); // Colon
|
||||||
ST_DrawPadNumFromHudWS(HUD_SECONDS, seconds, 2); // Seconds
|
ST_DrawPadNumFromHudWS(HUD_SECONDS, seconds, 2); // Seconds
|
||||||
|
|
||||||
if (!(splitscreen || splitscreen3 || splitscreen4) && (cv_timetic.value == 2 || modeattacking)) // there's not enough room for tics in splitscreen, don't even bother trying!
|
if (!splitscreen && (cv_timetic.value == 2 || modeattacking)) // there's not enough room for tics in splitscreen, don't even bother trying!
|
||||||
{
|
{
|
||||||
ST_DrawPatchFromHud(HUD_TIMETICCOLON, sboperiod); // Period
|
ST_DrawPatchFromHud(HUD_TIMETICCOLON, sboperiod); // Period
|
||||||
ST_DrawPadNumFromHud(HUD_TICS, tictrn, 2); // Tics
|
ST_DrawPadNumFromHud(HUD_TICS, tictrn, 2); // Tics
|
||||||
|
@ -700,7 +700,7 @@ static inline void ST_drawRings(void)
|
||||||
/*
|
/*
|
||||||
static void ST_drawLives(void) // SRB2kart - unused.
|
static void ST_drawLives(void) // SRB2kart - unused.
|
||||||
{
|
{
|
||||||
const INT32 v_splitflag = ((splitscreen || splitscreen3 || splitscreen4) && stplyr == &players[displayplayer] ? V_SPLITSCREEN : 0);
|
const INT32 v_splitflag = (splitscreen && stplyr == &players[displayplayer] ? V_SPLITSCREEN : 0);
|
||||||
|
|
||||||
if (!stplyr->skincolor)
|
if (!stplyr->skincolor)
|
||||||
return; // Just joined a server, skin isn't loaded yet!
|
return; // Just joined a server, skin isn't loaded yet!
|
||||||
|
@ -838,7 +838,7 @@ static void ST_drawFirstPersonHUD(void)
|
||||||
|
|
||||||
if (p)
|
if (p)
|
||||||
{
|
{
|
||||||
if (splitscreen || splitscreen3 || splitscreen4)
|
if (splitscreen)
|
||||||
V_DrawSmallScaledPatch(312, STRINGY(24), V_SNAPTORIGHT|V_SNAPTOTOP|V_HUDTRANS, p);
|
V_DrawSmallScaledPatch(312, STRINGY(24), V_SNAPTORIGHT|V_SNAPTOTOP|V_HUDTRANS, p);
|
||||||
else
|
else
|
||||||
V_DrawScaledPatch(304, 24, V_SNAPTORIGHT|V_SNAPTOTOP|V_HUDTRANS, p);
|
V_DrawScaledPatch(304, 24, V_SNAPTORIGHT|V_SNAPTOTOP|V_HUDTRANS, p);
|
||||||
|
@ -848,7 +848,7 @@ static void ST_drawFirstPersonHUD(void)
|
||||||
invulntime = player->powers[pw_flashing] ? 1 : player->powers[pw_invulnerability];
|
invulntime = player->powers[pw_flashing] ? 1 : player->powers[pw_invulnerability];
|
||||||
if (invulntime > 3*TICRATE || (invulntime && leveltime & 1))
|
if (invulntime > 3*TICRATE || (invulntime && leveltime & 1))
|
||||||
{
|
{
|
||||||
if (splitscreen || splitscreen3 || splitscreen4)
|
if (splitscreen)
|
||||||
V_DrawSmallScaledPatch(312, STRINGY(24) + 14, V_SNAPTORIGHT|V_SNAPTOTOP|V_HUDTRANS, invincibility);
|
V_DrawSmallScaledPatch(312, STRINGY(24) + 14, V_SNAPTORIGHT|V_SNAPTOTOP|V_HUDTRANS, invincibility);
|
||||||
else
|
else
|
||||||
V_DrawScaledPatch(304, 24 + 28, V_SNAPTORIGHT|V_SNAPTOTOP|V_HUDTRANS, invincibility);
|
V_DrawScaledPatch(304, 24 + 28, V_SNAPTORIGHT|V_SNAPTOTOP|V_HUDTRANS, invincibility);
|
||||||
|
@ -856,7 +856,7 @@ static void ST_drawFirstPersonHUD(void)
|
||||||
|
|
||||||
if (player->powers[pw_sneakers] > 3*TICRATE || (player->powers[pw_sneakers] && leveltime & 1))
|
if (player->powers[pw_sneakers] > 3*TICRATE || (player->powers[pw_sneakers] && leveltime & 1))
|
||||||
{
|
{
|
||||||
if (splitscreen || splitscreen3 || splitscreen4)
|
if (splitscreen)
|
||||||
V_DrawSmallScaledPatch(312, STRINGY(24) + 28, V_SNAPTORIGHT|V_SNAPTOTOP|V_HUDTRANS, sneakers);
|
V_DrawSmallScaledPatch(312, STRINGY(24) + 28, V_SNAPTORIGHT|V_SNAPTOTOP|V_HUDTRANS, sneakers);
|
||||||
else
|
else
|
||||||
V_DrawScaledPatch(304, 24 + 56, V_SNAPTORIGHT|V_SNAPTOTOP|V_HUDTRANS, sneakers);
|
V_DrawScaledPatch(304, 24 + 56, V_SNAPTORIGHT|V_SNAPTOTOP|V_HUDTRANS, sneakers);
|
||||||
|
@ -994,7 +994,7 @@ static void ST_drawNiGHTSHUD(void) // SRB2kart - unused.
|
||||||
INT32 origamount;
|
INT32 origamount;
|
||||||
INT32 minlink = 1;
|
INT32 minlink = 1;
|
||||||
INT32 total_ringcount;
|
INT32 total_ringcount;
|
||||||
boolean nosshack = false;
|
UINT8 nosshack = 0;
|
||||||
|
|
||||||
// When debugging, show "0 Link".
|
// When debugging, show "0 Link".
|
||||||
if (cv_debug & DBG_NIGHTSBASIC)
|
if (cv_debug & DBG_NIGHTSBASIC)
|
||||||
|
@ -1010,7 +1010,7 @@ static void ST_drawNiGHTSHUD(void) // SRB2kart - unused.
|
||||||
if (stplyr != &players[displayplayer])
|
if (stplyr != &players[displayplayer])
|
||||||
return;
|
return;
|
||||||
nosshack = splitscreen;
|
nosshack = splitscreen;
|
||||||
splitscreen = false;
|
splitscreen = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Link drawing
|
// Link drawing
|
||||||
|
@ -1108,7 +1108,7 @@ static void ST_drawNiGHTSHUD(void) // SRB2kart - unused.
|
||||||
}
|
}
|
||||||
else if (nosshack)
|
else if (nosshack)
|
||||||
{ // Even dirtier hack-of-a-hack to draw seperate drill meters in splitscreen special stages but nothing else.
|
{ // Even dirtier hack-of-a-hack to draw seperate drill meters in splitscreen special stages but nothing else.
|
||||||
splitscreen = true;
|
splitscreen = nosshack;
|
||||||
V_DrawScaledPatch(locx, STRINGY(locy)-3, V_HUDTRANS, drillbar);
|
V_DrawScaledPatch(locx, STRINGY(locy)-3, V_HUDTRANS, drillbar);
|
||||||
for (dfill = 0; dfill < stplyr->drillmeter/20 && dfill < 96; ++dfill)
|
for (dfill = 0; dfill < stplyr->drillmeter/20 && dfill < 96; ++dfill)
|
||||||
V_DrawScaledPatch(locx + 2 + dfill, STRINGY(locy + 3), V_HUDTRANS, drillfill[fillpatch]);
|
V_DrawScaledPatch(locx + 2 + dfill, STRINGY(locy + 3), V_HUDTRANS, drillfill[fillpatch]);
|
||||||
|
@ -1121,7 +1121,7 @@ static void ST_drawNiGHTSHUD(void) // SRB2kart - unused.
|
||||||
for (dfill = 0; dfill < stplyr->drillmeter/20 && dfill < 96; ++dfill)
|
for (dfill = 0; dfill < stplyr->drillmeter/20 && dfill < 96; ++dfill)
|
||||||
V_DrawScaledPatch(locx + 2 + dfill, STRINGY(locy + 3), V_SNAPTOBOTTOM|V_HUDTRANS, drillfill[fillpatch]);
|
V_DrawScaledPatch(locx + 2 + dfill, STRINGY(locy + 3), V_SNAPTOBOTTOM|V_HUDTRANS, drillfill[fillpatch]);
|
||||||
stplyr = &players[displayplayer];
|
stplyr = &players[displayplayer];
|
||||||
splitscreen = false;
|
splitscreen = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // Draw normally. <:3
|
{ // Draw normally. <:3
|
||||||
|
@ -1365,8 +1365,7 @@ static void ST_drawNiGHTSHUD(void) // SRB2kart - unused.
|
||||||
#endif
|
#endif
|
||||||
ST_drawNightsRecords();
|
ST_drawNightsRecords();
|
||||||
|
|
||||||
if (nosshack)
|
splitscreen = nosshack;
|
||||||
splitscreen = true;
|
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1620,11 +1619,11 @@ static void ST_drawCTFHUD(void) // SRB2kart - unused.
|
||||||
static inline void ST_drawTeamName(void)
|
static inline void ST_drawTeamName(void)
|
||||||
{
|
{
|
||||||
if (stplyr->ctfteam == 1)
|
if (stplyr->ctfteam == 1)
|
||||||
V_DrawString(256, (splitscreen || splitscreen3 || splitscreen4) ? STRINGY(184) : STRINGY(192), V_HUDTRANSHALF, "RED TEAM");
|
V_DrawString(256, splitscreen ? STRINGY(184) : STRINGY(192), V_HUDTRANSHALF, "RED TEAM");
|
||||||
else if (stplyr->ctfteam == 2)
|
else if (stplyr->ctfteam == 2)
|
||||||
V_DrawString(248, (splitscreen || splitscreen3 || splitscreen4) ? STRINGY(184) : STRINGY(192), V_HUDTRANSHALF, "BLUE TEAM");
|
V_DrawString(248, splitscreen ? STRINGY(184) : STRINGY(192), V_HUDTRANSHALF, "BLUE TEAM");
|
||||||
else
|
else
|
||||||
V_DrawString(244, (splitscreen || splitscreen3 || splitscreen4) ? STRINGY(184) : STRINGY(192), V_HUDTRANSHALF, "SPECTATOR");
|
V_DrawString(244, splitscreen ? STRINGY(184) : STRINGY(192), V_HUDTRANSHALF, "SPECTATOR");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1893,9 +1892,9 @@ static void ST_overlayDrawer(void)
|
||||||
|
|
||||||
// This is where we draw all the fun cheese if you have the chasecam off!
|
// This is where we draw all the fun cheese if you have the chasecam off!
|
||||||
if ((stplyr == &players[displayplayer] && !camera.chase)
|
if ((stplyr == &players[displayplayer] && !camera.chase)
|
||||||
|| (((splitscreen || splitscreen3 || splitscreen4) && stplyr == &players[secondarydisplayplayer]) && !camera2.chase)
|
|| ((splitscreen && stplyr == &players[secondarydisplayplayer]) && !camera2.chase)
|
||||||
|| (((splitscreen3 || splitscreen4) && stplyr == &players[thirddisplayplayer]) && !camera3.chase)
|
|| ((splitscreen > 1 && stplyr == &players[thirddisplayplayer]) && !camera3.chase)
|
||||||
|| ((splitscreen4 && stplyr == &players[fourthdisplayplayer]) && !camera4.chase))
|
|| ((splitscreen > 2 && stplyr == &players[fourthdisplayplayer]) && !camera4.chase))
|
||||||
{
|
{
|
||||||
ST_drawFirstPersonHUD();
|
ST_drawFirstPersonHUD();
|
||||||
}
|
}
|
||||||
|
@ -1914,7 +1913,7 @@ static void ST_overlayDrawer(void)
|
||||||
)
|
)
|
||||||
ST_drawLevelTitle();
|
ST_drawLevelTitle();
|
||||||
|
|
||||||
if (!hu_showscores && !(splitscreen || splitscreen3 || splitscreen4) && netgame && displayplayer == consoleplayer)
|
if (!hu_showscores && !splitscreen && netgame && displayplayer == consoleplayer)
|
||||||
{
|
{
|
||||||
if (G_GametypeUsesLives() && stplyr->lives <= 0 && countdown != 1)
|
if (G_GametypeUsesLives() && stplyr->lives <= 0 && countdown != 1)
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), 0, M_GetText("Press F12 to watch another player."));
|
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), 0, M_GetText("Press F12 to watch another player."));
|
||||||
|
@ -1993,22 +1992,22 @@ void ST_Drawer(void)
|
||||||
stplyr = &players[displayplayer];
|
stplyr = &players[displayplayer];
|
||||||
ST_overlayDrawer();
|
ST_overlayDrawer();
|
||||||
|
|
||||||
if (splitscreen || splitscreen3 || splitscreen4)
|
if (splitscreen)
|
||||||
{
|
{
|
||||||
stplyr = &players[secondarydisplayplayer];
|
stplyr = &players[secondarydisplayplayer];
|
||||||
ST_overlayDrawer();
|
ST_overlayDrawer();
|
||||||
}
|
|
||||||
|
|
||||||
if (splitscreen3 || splitscreen4)
|
if (splitscreen > 1)
|
||||||
{
|
{
|
||||||
stplyr = &players[thirddisplayplayer];
|
stplyr = &players[thirddisplayplayer];
|
||||||
ST_overlayDrawer();
|
ST_overlayDrawer();
|
||||||
}
|
|
||||||
|
|
||||||
if (splitscreen4)
|
if (splitscreen > 2)
|
||||||
{
|
{
|
||||||
stplyr = &players[fourthdisplayplayer];
|
stplyr = &players[fourthdisplayplayer];
|
||||||
ST_overlayDrawer();
|
ST_overlayDrawer();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1982,18 +1982,15 @@ void V_DoPostProcessor(INT32 view, postimg_t type, INT32 param)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (view < 0 || view >= 3
|
if (view < 0 || view >= 3 || (view > splitscreen))
|
||||||
|| (view == 1 && !(splitscreen || splitscreen3 || splitscreen4))
|
|
||||||
|| (view == 2 && !(splitscreen3 || splitscreen4))
|
|
||||||
|| (view == 3 && !splitscreen4))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ((view == 1 && splitscreen) || view >= 2)
|
if ((view == 1 && splitscreen == 1) || view >= 2)
|
||||||
yoffset = viewheight;
|
yoffset = viewheight;
|
||||||
else
|
else
|
||||||
yoffset = 0;
|
yoffset = 0;
|
||||||
|
|
||||||
if (view & 1 && !splitscreen)
|
if (view & 1 && splitscreen > 1)
|
||||||
xoffset = viewwidth;
|
xoffset = viewwidth;
|
||||||
else
|
else
|
||||||
xoffset = 0;
|
xoffset = 0;
|
||||||
|
|
Loading…
Reference in a new issue