From 564cfb33b401aff9e1de27257b9448c4555b6b8e Mon Sep 17 00:00:00 2001 From: toaster Date: Sat, 27 Oct 2018 20:39:41 +0100 Subject: [PATCH 1/5] Fade stuff! * Make the white intro fade always drawn, rather than potentially disable-able through tab or HUD disable. * Slightly increase the darkness of the intermission fade, since its current value had a negative effect on SKINCOLOR_SAPPHIRE. --- src/k_kart.c | 9 --------- src/st_stuff.c | 15 ++++++++++++--- src/y_inter.c | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 76670f17..0e405bbc 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -7509,15 +7509,6 @@ void K_drawKartHUD(void) || ((splitscreen > 2 && stplyr == &players[fourthdisplayplayer]) && !camera4.chase)) K_drawKartFirstPerson(); - // Draw a white fade on level opening - if (leveltime < 15 && stplyr == &players[displayplayer]) - { - if (leveltime <= 5) - V_DrawFill(0,0,BASEVIDWIDTH,BASEVIDHEIGHT,120); // Pure white on first few frames, to hide SRB2's awful level load artifacts - else - V_DrawFadeScreen(120, 15-leveltime); // Then gradually fade out from there - } - if (splitscreen == 2) // Player 4 in 3P is the minimap :p K_drawKartMinimap(); diff --git a/src/st_stuff.c b/src/st_stuff.c index 5ba00015..b7384f21 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -1903,13 +1903,13 @@ static void ST_overlayDrawer(void) if(!P_IsLocalPlayer(stplyr)) { - char name[MAXPLAYERNAME+1]; + /*char name[MAXPLAYERNAME+1]; // shorten the name if its more than twelve characters. - strlcpy(name, player_names[stplyr-players], 13); + strlcpy(name, player_names[stplyr-players], 13);*/ // Show name of player being displayed V_DrawCenteredString((BASEVIDWIDTH/2), BASEVIDHEIGHT-40, 0, M_GetText("Viewpoint:")); - V_DrawCenteredString((BASEVIDWIDTH/2), BASEVIDHEIGHT-32, V_ALLOWLOWERCASE, name); + V_DrawCenteredString((BASEVIDWIDTH/2), BASEVIDHEIGHT-32, V_ALLOWLOWERCASE, player_names[stplyr-players]); } // This is where we draw all the fun cheese if you have the chasecam off! @@ -2065,4 +2065,13 @@ void ST_Drawer(void) if (mapheaderinfo[gamemap-1]->typeoflevel & TOL_TV) // Very specific Midnight Channel stuff. ST_MayonakaStatic(); } + + // Draw a white fade on level opening + if (leveltime < 15) + { + if (leveltime <= 5) + V_DrawFill(0,0,BASEVIDWIDTH,BASEVIDHEIGHT,120); // Pure white on first few frames, to hide SRB2's awful level load artifacts + else + V_DrawFadeScreen(120, 15-leveltime); // Then gradually fade out from there + } } diff --git a/src/y_inter.c b/src/y_inter.c index 9361dbe3..c779ee3c 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -348,7 +348,7 @@ void Y_IntermissionDrawer(void) V_DrawPatchFill(bgtile); if (usebuffer) // Fade everything out - V_DrawFadeScreen(0xFF00, 20); + V_DrawFadeScreen(0xFF00, 22); if (!splitscreen) whiteplayer = demoplayback ? displayplayer : consoleplayer; From 88b6e9e1bdf2df3cdfb6fa4ac1ea1b016e23b536 Mon Sep 17 00:00:00 2001 From: toaster Date: Sat, 27 Oct 2018 20:43:33 +0100 Subject: [PATCH 2/5] Minor things that annoyed me to NO GOOD END. * Tweak the demo info layout (holding tab while demoplayback) to better match the Viewpoint text in MP. * Make the tab rankings view support widescreen better, including the spectator ticker (but not the player name layout). * Make the tab rankings view always have a darkened background, to get around the fact we can't darken it based on player state for battle. * Remove FREE PLAY from tab rankings. --- src/hu_stuff.c | 72 +++++++++++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 33 deletions(-) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 4210b70e..d77ae356 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -109,8 +109,8 @@ static patch_t *crosshair[HU_CROSSHAIRS]; // 3 precached crosshair graphics // protos. // ------- static void HU_DrawRankings(void); -static void HU_DrawCoopOverlay(void); -static void HU_DrawNetplayCoopOverlay(void); +//static void HU_DrawCoopOverlay(void); +//static void HU_DrawNetplayCoopOverlay(void); //====================================================================== // KEYBOARD LAYOUTS FOR ENTERING TEXT @@ -2020,26 +2020,27 @@ UINT32 hu_demolap; static void HU_DrawDemoInfo(void) { - V_DrawString(4, 188-16, V_YELLOWMAP, va(M_GetText("%s's replay"), player_names[0])); + V_DrawCenteredString((BASEVIDWIDTH/2), BASEVIDHEIGHT-40, 0, M_GetText("Replay:")); + V_DrawCenteredString((BASEVIDWIDTH/2), BASEVIDHEIGHT-32, V_ALLOWLOWERCASE, player_names[0]); if (modeattacking) { - V_DrawString(4, 188-8, V_YELLOWMAP|V_MONOSPACE, "BEST TIME:"); + V_DrawRightAlignedString((BASEVIDWIDTH/2)-4, BASEVIDHEIGHT-24, V_YELLOWMAP|V_MONOSPACE, "BEST TIME:"); if (hu_demotime != UINT32_MAX) - V_DrawRightAlignedString(120, 188-8, V_MONOSPACE, va("%i:%02i.%02i", + V_DrawString((BASEVIDWIDTH/2)+4, BASEVIDHEIGHT-24, V_MONOSPACE, va("%i'%02i\"%02i", G_TicsToMinutes(hu_demotime,true), G_TicsToSeconds(hu_demotime), G_TicsToCentiseconds(hu_demotime))); else - V_DrawRightAlignedString(120, 188-8, V_MONOSPACE, "--:--.--"); + V_DrawString((BASEVIDWIDTH/2)+4, BASEVIDHEIGHT-24, V_MONOSPACE, "--'--\"--"); - V_DrawString(4, 188, V_YELLOWMAP|V_MONOSPACE, "BEST LAP:"); + V_DrawRightAlignedString((BASEVIDWIDTH/2)-4, BASEVIDHEIGHT-16, V_YELLOWMAP|V_MONOSPACE, "BEST LAP:"); if (hu_demolap != UINT32_MAX) - V_DrawRightAlignedString(120, 188, V_MONOSPACE, va("%i:%02i.%02i", + V_DrawString((BASEVIDWIDTH/2)+4, BASEVIDHEIGHT-16, V_MONOSPACE, va("%i'%02i\"%02i", G_TicsToMinutes(hu_demolap,true), G_TicsToSeconds(hu_demolap), G_TicsToCentiseconds(hu_demolap))); else - V_DrawRightAlignedString(120, 188, V_MONOSPACE, "--:--.--"); + V_DrawString((BASEVIDWIDTH/2)+4, BASEVIDHEIGHT-16, V_MONOSPACE, "--'--\"--"); } } @@ -2112,11 +2113,11 @@ void HU_Drawer(void) if (LUA_HudEnabled(hud_rankings)) #endif HU_DrawRankings(); - if (gametype == GT_COOP) - HU_DrawNetplayCoopOverlay(); + //if (gametype == GT_COOP) + //HU_DrawNetplayCoopOverlay(); } - else - HU_DrawCoopOverlay(); + //else + //HU_DrawCoopOverlay(); #ifdef HAVE_BLUA LUAh_ScoresHUD(); #endif @@ -2274,11 +2275,12 @@ void HU_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, I { INT32 i, j, rightoffset = 240; const UINT8 *colormap; + INT32 dupadjust = (vid.width/vid.dupx), duptweak = (dupadjust - BASEVIDWIDTH)/2; //this function is designed for 9 or less score lines only //I_Assert(scorelines <= 9); -- not today bitch, kart fixed it up - V_DrawFill(1, 26, 318, 1, 0); // Draw a horizontal line because it looks nice! + V_DrawFill(1-duptweak, 26, dupadjust-2, 1, 0); // Draw a horizontal line because it looks nice! if (scorelines > 8) { V_DrawFill(160, 26, 1, 154, 0); // Draw a vertical line to separate the two sides. @@ -2562,16 +2564,17 @@ void HU_DrawEmeralds(INT32 x, INT32 y, INT32 pemeralds) // static inline void HU_DrawSpectatorTicker(void) { - int i; - int length = 0, height = 174; - int totallength = 0, templength = 0; + INT32 i; + INT32 length = 0, height = 174; + INT32 totallength = 0, templength = -8; + INT32 dupadjust = (vid.width/vid.dupx), duptweak = (dupadjust - BASEVIDWIDTH)/2; for (i = 0; i < MAXPLAYERS; i++) if (playeringame[i] && players[i].spectator) totallength += (signed)strlen(player_names[i]) * 8 + 16; - length -= (leveltime % (totallength + BASEVIDWIDTH)); - length += BASEVIDWIDTH; + length -= (leveltime % (totallength + dupadjust+8)); + length += dupadjust; for (i = 0; i < MAXPLAYERS; i++) if (playeringame[i] && players[i].spectator) @@ -2579,15 +2582,18 @@ static inline void HU_DrawSpectatorTicker(void) char *pos; char initial[MAXPLAYERNAME+1]; char current[MAXPLAYERNAME+1]; + INT32 len; + + len = ((signed)strlen(player_names[i]) * 8 + 16); strcpy(initial, player_names[i]); pos = initial; - if (length >= -((signed)strlen(player_names[i]) * 8 + 16) && length <= BASEVIDWIDTH) + if (length >= -len) { - if (length < 0) + if (length < -8) { - UINT8 eatenchars = (UINT8)(abs(length) / 8 + 1); + UINT8 eatenchars = (UINT8)(abs(length) / 8); if (eatenchars <= strlen(initial)) { @@ -2595,7 +2601,7 @@ static inline void HU_DrawSpectatorTicker(void) // then compensate the drawing position. pos += eatenchars; strcpy(current, pos); - templength = length % 8 + 8; + templength = ((length + 8) % 8); } else { @@ -2609,10 +2615,11 @@ static inline void HU_DrawSpectatorTicker(void) templength = length; } - V_DrawString(templength, height + 8, V_TRANSLUCENT, current); + V_DrawString(templength - duptweak, height, V_TRANSLUCENT|V_ALLOWLOWERCASE, current); } - length += (signed)strlen(player_names[i]) * 8 + 16; + if ((length += len) >= dupadjust+8) + break; } } @@ -2627,6 +2634,8 @@ static void HU_DrawRankings(void) boolean completed[MAXPLAYERS]; UINT32 whiteplayer = MAXPLAYERS; + V_DrawFadeScreen(0xFF00, 16); // A little more readable, and prevents cheating the fades under other circumstances. + if (cons_menuhighlight.value) hilicol = cons_menuhighlight.value; else if (modeattacking) @@ -2636,9 +2645,9 @@ static void HU_DrawRankings(void) // draw the current gametype in the lower right if (modeattacking) - V_DrawString(4, 188, hilicol, "Record Attack"); + V_DrawString(4, 188, hilicol|V_SNAPTOBOTTOM|V_SNAPTOLEFT, "Record Attack"); else - V_DrawString(4, 188, hilicol, gametype_cons_t[gametype].strvalue); + V_DrawString(4, 188, hilicol|V_SNAPTOBOTTOM|V_SNAPTOLEFT, gametype_cons_t[gametype].strvalue); if (G_GametypeHasTeams()) { @@ -2733,9 +2742,6 @@ static void HU_DrawRankings(void) numplayersingame++; } - if (netgame && numplayersingame <= 1) - K_drawKartFreePlay(leveltime); - for (j = 0; j < numplayersingame; j++) { UINT8 lowestposition = MAXPLAYERS; @@ -2783,11 +2789,11 @@ static void HU_DrawRankings(void) HU_DrawDualTabRankings(32, 32, tab, scorelines, whiteplayer);*/ // draw spectators in a ticker across the bottom - if (!splitscreen && G_GametypeHasSpectators()) + if (netgame && G_GametypeHasSpectators()) HU_DrawSpectatorTicker(); } -static void HU_DrawCoopOverlay(void) +/*static void HU_DrawCoopOverlay(void) { if (token #ifdef HAVE_BLUA @@ -2843,7 +2849,7 @@ static void HU_DrawNetplayCoopOverlay(void) if (emeralds & (1 << i)) V_DrawScaledPatch(20 + (i * 20), 6, 0, emeraldpics[i]); } -} +}*/ // Interface to CECHO settings for the outside world, avoiding the From 68da56671e0ec31fb104c54f6654368425896009 Mon Sep 17 00:00:00 2001 From: toaster Date: Sat, 27 Oct 2018 20:44:18 +0100 Subject: [PATCH 3/5] Make it so hitting enter on the ipv4 option doesn't close all menus with the warning, only if you start trying to connect. --- src/m_menu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/m_menu.c b/src/m_menu.c index 1827bf7b..4019a916 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -7819,6 +7819,8 @@ static void M_ConnectIP(INT32 choice) return; } + M_ClearMenus(true); + COM_BufAddText(va("connect \"%s\"\n", setupm_ip)); // A little "please wait" message. @@ -7850,7 +7852,6 @@ static void M_HandleConnectIP(INT32 choice) case KEY_ENTER: S_StartSound(NULL,sfx_menu1); // Tails - M_ClearMenus(true); M_ConnectIP(1); break; From 8b382d2e400bb8a93900d34da6f439bf75376d30 Mon Sep 17 00:00:00 2001 From: toaster Date: Sat, 27 Oct 2018 21:16:19 +0100 Subject: [PATCH 4/5] As requested by Jeck: * gr_md2 on the menu. * Disable interpolerated model option completely for now. Also, tweaked the GL menus a bit to suck less, since I was ferreting around in that area. --- src/hardware/hw_md2.c | 2 ++ src/m_menu.c | 20 +++++++++++--------- src/v_video.c | 4 ++-- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index 145a0150..2a0957b9 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -1328,6 +1328,7 @@ void HWR_DrawMD2(gr_vissprite_t *spr) frame = (spr->mobj->frame & FF_FRAMEMASK) % md2->model->header.numFrames; buff = md2->model->glCommandBuffer; curr = &md2->model->frames[frame]; +#if 0 if (cv_grmd2.value == 1 && tics <= durs) { // frames are handled differently for states with FF_ANIMATE, so get the next frame differently for the interpolation @@ -1348,6 +1349,7 @@ void HWR_DrawMD2(gr_vissprite_t *spr) } } } +#endif //Hurdler: it seems there is still a small problem with mobj angle p.x = FIXED_TO_FLOAT(spr->mobj->x); diff --git a/src/m_menu.c b/src/m_menu.c index 4019a916..4828c21b 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -1241,7 +1241,8 @@ static menuitem_t OP_VideoOptionsMenu[] = {IT_STRING | IT_CVAR, NULL, "Vertical Sync", &cv_vidwait, 90}, #ifdef HWRENDER - {IT_SUBMENU|IT_STRING, NULL, "OpenGL Options...", &OP_OpenGLOptionsDef, 105}, + {IT_STRING | IT_CVAR, NULL, "3D models", &cv_grmd2, 105}, + {IT_SUBMENU|IT_STRING, NULL, "OpenGL Options...", &OP_OpenGLOptionsDef, 115}, #endif }; @@ -1271,18 +1272,19 @@ static menuitem_t OP_VideoModeMenu[] = #ifdef HWRENDER static menuitem_t OP_OpenGLOptionsMenu[] = { - {IT_STRING|IT_CVAR, NULL, "Field of View", &cv_grfov, 10}, - {IT_STRING|IT_CVAR, NULL, "Quality", &cv_scr_depth, 20}, - {IT_STRING|IT_CVAR, NULL, "Texture Filter", &cv_grfiltermode, 30}, - {IT_STRING|IT_CVAR, NULL, "Anisotropic", &cv_granisotropicmode,40}, -#ifdef _WINDOWS + {IT_SUBMENU|IT_STRING, NULL, "Fog...", &OP_OpenGLFogDef, 10}, + {IT_SUBMENU|IT_STRING, NULL, "Gamma...", &OP_OpenGLColorDef, 20}, + + {IT_STRING|IT_CVAR, NULL, "Field of View", &cv_grfov, 35}, + {IT_STRING|IT_CVAR, NULL, "Quality", &cv_scr_depth, 45}, + {IT_STRING|IT_CVAR, NULL, "Texture Filter", &cv_grfiltermode, 55}, + {IT_STRING|IT_CVAR, NULL, "Anisotropic", &cv_granisotropicmode, 65}, +/*#ifdef _WINDOWS {IT_STRING|IT_CVAR, NULL, "Fullscreen", &cv_fullscreen, 50}, #endif #ifdef ALAM_LIGHTING {IT_SUBMENU|IT_STRING, NULL, "Lighting...", &OP_OpenGLLightingDef, 70}, -#endif - {IT_SUBMENU|IT_STRING, NULL, "Fog...", &OP_OpenGLFogDef, 80}, - {IT_SUBMENU|IT_STRING, NULL, "Gamma...", &OP_OpenGLColorDef, 90}, +#endif*/ }; #ifdef ALAM_LIGHTING diff --git a/src/v_video.c b/src/v_video.c index d57276fa..fc76bf31 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -78,9 +78,9 @@ consvar_t cv_grcoronas = {"gr_coronas", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, consvar_t cv_grcoronasize = {"gr_coronasize", "1", CV_SAVE| CV_FLOAT, 0, NULL, 0, NULL, NULL, 0, 0, NULL}; #endif -static CV_PossibleValue_t CV_MD2[] = {{0, "Off"}, {1, "On"}, {2, "Old"}, {0, NULL}}; +//static CV_PossibleValue_t CV_MD2[] = {{0, "Off"}, {1, "On"}, {2, "Old"}, {0, NULL}}; // console variables in development -consvar_t cv_grmd2 = {"gr_md2", "Off", CV_SAVE, CV_MD2, NULL, 0, NULL, NULL, 0, 0, NULL}; +consvar_t cv_grmd2 = {"gr_md2", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; #endif const UINT8 gammatable[5][256] = From 318d692c3c3d6bb7da6f3f325a1cf214475d0804 Mon Sep 17 00:00:00 2001 From: toaster Date: Mon, 29 Oct 2018 14:43:21 +0000 Subject: [PATCH 5/5] Make dropped floatingitems not carry player momentum (sorry for leaving this so long, Oni!) --- src/k_kart.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 12051722..ee59566f 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -3340,8 +3340,6 @@ void K_DropItems(player_t *player) drop->destscale = (3*drop->destscale)/2;; drop->angle = player->mo->angle + ANGLE_90; - drop->momx = player->mo->momx>>1; - drop->momy = player->mo->momy>>1; P_Thrust(drop, FixedAngle(P_RandomFixed()*180) + player->mo->angle + ANGLE_90, 8*(mapheaderinfo[gamemap-1]->mobj_scale));