mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Render title map on connecting to server screen too
This commit is contained in:
parent
be5da92a8d
commit
b6e145f0c5
3 changed files with 67 additions and 65 deletions
117
src/d_main.c
117
src/d_main.c
|
@ -284,11 +284,8 @@ static void D_Display(void)
|
|||
switch (gamestate)
|
||||
{
|
||||
case GS_TITLESCREEN:
|
||||
if (!titlemapinaction || !curbghide) {
|
||||
F_TitleScreenDrawer();
|
||||
break;
|
||||
}
|
||||
/* FALLTHRU */
|
||||
F_TitleScreenDrawer();
|
||||
break;
|
||||
case GS_LEVEL:
|
||||
if (!gametic)
|
||||
break;
|
||||
|
@ -359,56 +356,11 @@ static void D_Display(void)
|
|||
|
||||
// clean up border stuff
|
||||
// see if the border needs to be initially drawn
|
||||
if (gamestate == GS_LEVEL || (gamestate == GS_TITLESCREEN && titlemapinaction && curbghide && (!hidetitlemap)))
|
||||
if (gamestate == GS_LEVEL)
|
||||
{
|
||||
// draw the view directly
|
||||
|
||||
if (!automapactive && !dedicated && cv_renderview.value)
|
||||
{
|
||||
if (players[displayplayer].mo || players[displayplayer].playerstate == PST_DEAD)
|
||||
{
|
||||
topleft = screens[0] + viewwindowy*vid.width + viewwindowx;
|
||||
objectsdrawn = 0;
|
||||
#ifdef HWRENDER
|
||||
if (rendermode != render_soft)
|
||||
HWR_RenderPlayerView(0, &players[displayplayer]);
|
||||
else
|
||||
#endif
|
||||
if (rendermode != render_none)
|
||||
R_RenderPlayerView(&players[displayplayer]);
|
||||
}
|
||||
|
||||
// render the second screen
|
||||
if (splitscreen && players[secondarydisplayplayer].mo)
|
||||
{
|
||||
#ifdef HWRENDER
|
||||
if (rendermode != render_soft)
|
||||
HWR_RenderPlayerView(1, &players[secondarydisplayplayer]);
|
||||
else
|
||||
#endif
|
||||
if (rendermode != render_none)
|
||||
{
|
||||
viewwindowy = vid.height / 2;
|
||||
M_Memcpy(ylookup, ylookup2, viewheight*sizeof (ylookup[0]));
|
||||
|
||||
topleft = screens[0] + viewwindowy*vid.width + viewwindowx;
|
||||
|
||||
R_RenderPlayerView(&players[secondarydisplayplayer]);
|
||||
|
||||
viewwindowy = 0;
|
||||
M_Memcpy(ylookup, ylookup1, viewheight*sizeof (ylookup[0]));
|
||||
}
|
||||
}
|
||||
|
||||
// Image postprocessing effect
|
||||
if (rendermode == render_soft)
|
||||
{
|
||||
if (postimgtype)
|
||||
V_DoPostProcessor(0, postimgtype, postimgparam);
|
||||
if (postimgtype2)
|
||||
V_DoPostProcessor(1, postimgtype2, postimgparam2);
|
||||
}
|
||||
}
|
||||
D_Render();
|
||||
|
||||
if (lastdraw)
|
||||
{
|
||||
|
@ -420,14 +372,9 @@ static void D_Display(void)
|
|||
lastdraw = false;
|
||||
}
|
||||
|
||||
if (gamestate == GS_LEVEL)
|
||||
{
|
||||
ST_Drawer();
|
||||
F_TextPromptDrawer();
|
||||
HU_Drawer();
|
||||
}
|
||||
else
|
||||
F_TitleScreenDrawer();
|
||||
ST_Drawer();
|
||||
F_TextPromptDrawer();
|
||||
HU_Drawer();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -523,6 +470,56 @@ static void D_Display(void)
|
|||
}
|
||||
}
|
||||
|
||||
void D_Render(void)
|
||||
{
|
||||
if (!automapactive && !dedicated && cv_renderview.value)
|
||||
{
|
||||
if (players[displayplayer].mo || players[displayplayer].playerstate == PST_DEAD)
|
||||
{
|
||||
topleft = screens[0] + viewwindowy*vid.width + viewwindowx;
|
||||
objectsdrawn = 0;
|
||||
#ifdef HWRENDER
|
||||
if (rendermode != render_soft)
|
||||
HWR_RenderPlayerView(0, &players[displayplayer]);
|
||||
else
|
||||
#endif
|
||||
if (rendermode != render_none)
|
||||
R_RenderPlayerView(&players[displayplayer]);
|
||||
}
|
||||
|
||||
// render the second screen
|
||||
if (splitscreen && players[secondarydisplayplayer].mo)
|
||||
{
|
||||
#ifdef HWRENDER
|
||||
if (rendermode != render_soft)
|
||||
HWR_RenderPlayerView(1, &players[secondarydisplayplayer]);
|
||||
else
|
||||
#endif
|
||||
if (rendermode != render_none)
|
||||
{
|
||||
viewwindowy = vid.height / 2;
|
||||
M_Memcpy(ylookup, ylookup2, viewheight*sizeof (ylookup[0]));
|
||||
|
||||
topleft = screens[0] + viewwindowy*vid.width + viewwindowx;
|
||||
|
||||
R_RenderPlayerView(&players[secondarydisplayplayer]);
|
||||
|
||||
viewwindowy = 0;
|
||||
M_Memcpy(ylookup, ylookup1, viewheight*sizeof (ylookup[0]));
|
||||
}
|
||||
}
|
||||
|
||||
// Image postprocessing effect
|
||||
if (rendermode == render_soft)
|
||||
{
|
||||
if (postimgtype)
|
||||
V_DoPostProcessor(0, postimgtype, postimgparam);
|
||||
if (postimgtype2)
|
||||
V_DoPostProcessor(1, postimgtype2, postimgparam2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// =========================================================================
|
||||
// D_SRB2Loop
|
||||
// =========================================================================
|
||||
|
|
|
@ -54,4 +54,7 @@ const char *D_Home(void);
|
|||
void D_AdvanceDemo(void);
|
||||
void D_StartTitle(void);
|
||||
|
||||
/* Here for title maps */
|
||||
void D_Render(void);
|
||||
|
||||
#endif //__D_MAIN__
|
||||
|
|
|
@ -2285,7 +2285,9 @@ void F_TitleScreenDrawer(void)
|
|||
// Draw that sky!
|
||||
if (curbgcolor >= 0)
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, curbgcolor);
|
||||
else if (!curbghide || !titlemapinaction || gamestate == GS_WAITINGPLAYERS)
|
||||
else if (titlemapinaction && curbghide && ! hidetitlemap)
|
||||
D_Render();
|
||||
else
|
||||
F_SkyScroll(curbgxspeed, curbgyspeed, curbgname);
|
||||
|
||||
// Don't draw outside of the title screen, or if the patch isn't there.
|
||||
|
@ -2358,10 +2360,6 @@ void F_TitleScreenTicker(boolean run)
|
|||
if (run)
|
||||
finalecount++;
|
||||
|
||||
// don't trigger if doing anything besides idling on title
|
||||
if (gameaction != ga_nothing || gamestate != GS_TITLESCREEN)
|
||||
return;
|
||||
|
||||
// Execute the titlemap camera settings
|
||||
if (titlemapinaction)
|
||||
{
|
||||
|
@ -2408,6 +2406,10 @@ void F_TitleScreenTicker(boolean run)
|
|||
}
|
||||
}
|
||||
|
||||
// don't trigger if doing anything besides idling on title
|
||||
if (gameaction != ga_nothing || gamestate != GS_TITLESCREEN)
|
||||
return;
|
||||
|
||||
// no demos to play? or, are they disabled?
|
||||
if (!cv_rollingdemos.value || !numDemos)
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue