From 82f2f2f2f9965cc79eec8fdd3d885a5b0bed44d2 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 4 Jan 2018 14:29:29 -0500 Subject: [PATCH 1/7] SDL: disable check for noreturn --- src/sdl/i_main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sdl/i_main.c b/src/sdl/i_main.c index 65b7b5ff..f54f0d7c 100644 --- a/src/sdl/i_main.c +++ b/src/sdl/i_main.c @@ -103,6 +103,10 @@ static inline VOID MakeCodeWritable(VOID) \return int */ +#if defined (__GNUC__) && (__GNUC__ >= 4) +#pragma GCC diagnostic ignored "-Wmissing-noreturn" +#endif + #ifdef FORCESDLMAIN int SDL_main(int argc, char **argv) #else From a7dc20e7d2d53dad20f41884f382bfedf8f1d44e Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Mon, 29 Aug 2016 22:42:06 +0100 Subject: [PATCH 2/7] Upper Unpegged on an FOF's control linedef now enables skewing of walls with respect to slopes Skewing direction is decided per in-level wall by the Lower Unpegged flag on in-level linedefs themselves, since they already decide the stuff for FOF wall pegging as it is. That is unless Transfer Line is involved which moves everything to the control sector linedefs instead... --- src/r_segs.c | 73 +++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 64 insertions(+), 9 deletions(-) diff --git a/src/r_segs.c b/src/r_segs.c index 502ff330..fff98dbf 100644 --- a/src/r_segs.c +++ b/src/r_segs.c @@ -743,6 +743,12 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor) // Render FOF sides kinda like normal sides, with the frac and step and everything // NOTE: INT64 instead of fixed_t because overflow concerns INT64 top_frac, top_step, bottom_frac, bottom_step; + // skew FOF walls with slopes? + boolean slopeskew = false; + fixed_t ffloortextureslide = 0; + INT32 oldx = -1; + fixed_t left_top, left_bottom; // needed here for slope skewing + pslope_t *skewslope = NULL; #endif void (*colfunc_2s) (column_t *); @@ -966,21 +972,68 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor) mceilingclip = ds->sprtopclip; dc_texheight = textureheight[texnum]>>FRACBITS; +#ifdef ESLOPE + // calculate both left ends + if (*pfloor->t_slope) + left_top = P_GetZAt(*pfloor->t_slope, ds->leftpos.x, ds->leftpos.y) - viewz; + else + left_top = *pfloor->topheight - viewz; + + if (*pfloor->b_slope) + left_bottom = P_GetZAt(*pfloor->b_slope, ds->leftpos.x, ds->leftpos.y) - viewz; + else + left_bottom = *pfloor->bottomheight - viewz; + dc_texturemid = left_top; + skewslope = *pfloor->t_slope; // skew using top slope by default +#else dc_texturemid = *pfloor->topheight - viewz; +#endif if (newline) { offsetvalue = sides[newline->sidenum[0]].rowoffset; if (newline->flags & ML_DONTPEGBOTTOM) +#ifdef ESLOPE + { + dc_texturemid = left_bottom; + skewslope = *pfloor->b_slope; // skew using bottom slope + } +#else offsetvalue -= *pfloor->topheight - *pfloor->bottomheight; +#endif +#ifdef ESLOPE + if (newline->flags & ML_DONTPEGTOP) + slopeskew = true; +#endif } else { offsetvalue = sides[pfloor->master->sidenum[0]].rowoffset; if (curline->linedef->flags & ML_DONTPEGBOTTOM) +#ifdef ESLOPE + { + dc_texturemid = left_bottom; + skewslope = *pfloor->b_slope; // skew using bottom slope + } +#else offsetvalue -= *pfloor->topheight - *pfloor->bottomheight; +#endif +#ifdef ESLOPE + if (pfloor->master->flags & ML_DONTPEGTOP) // use control linedef's flags + slopeskew = true; +#endif } +#ifdef ESLOPE + if (slopeskew) + { + angle_t lineangle = R_PointToAngle2(curline->v1->x, curline->v1->y, curline->v2->x, curline->v2->y); + + if (skewslope) + ffloortextureslide = FixedMul(skewslope->zdelta, FINECOSINE((lineangle-skewslope->xydirection)>>ANGLETOFINESHIFT)); + } +#endif + dc_texturemid += offsetvalue; // Texture must be cached before setting colfunc_2s, @@ -999,23 +1052,18 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor) #ifdef ESLOPE // Set heights according to plane, or slope, whichever { - fixed_t left_top, right_top, left_bottom, right_bottom; + fixed_t right_top, right_bottom; + // calculate right ends now if (*pfloor->t_slope) - { - left_top = P_GetZAt(*pfloor->t_slope, ds->leftpos.x, ds->leftpos.y) - viewz; right_top = P_GetZAt(*pfloor->t_slope, ds->rightpos.x, ds->rightpos.y) - viewz; - } else - left_top = right_top = *pfloor->topheight - viewz; + right_top = *pfloor->topheight - viewz; if (*pfloor->b_slope) - { - left_bottom = P_GetZAt(*pfloor->b_slope, ds->leftpos.x, ds->leftpos.y) - viewz; right_bottom = P_GetZAt(*pfloor->b_slope, ds->rightpos.x, ds->rightpos.y) - viewz; - } else - left_bottom = right_bottom = *pfloor->bottomheight - viewz; + right_bottom = *pfloor->bottomheight - viewz; // using INT64 to avoid 32bit overflow top_frac = (INT64)centeryfrac - (((INT64)left_top * ds->scale1) >> FRACBITS); @@ -1039,6 +1087,13 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor) { if (maskedtexturecol[dc_x] != INT16_MAX) { +#ifdef ESLOPE + if (ffloortextureslide) { // skew FOF walls + if (oldx != -1) + dc_texturemid += FixedMul(ffloortextureslide, (maskedtexturecol[oldx]-maskedtexturecol[dc_x])< Date: Mon, 29 Aug 2016 23:21:57 +0100 Subject: [PATCH 3/7] If NOT skewing FOF walls, make sure dc_texturemid reverts to using unsloped FOF topheight/bottomheight rather than actual left side top/bottom heights --- src/r_segs.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/r_segs.c b/src/r_segs.c index fff98dbf..0d3a6430 100644 --- a/src/r_segs.c +++ b/src/r_segs.c @@ -983,45 +983,45 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor) left_bottom = P_GetZAt(*pfloor->b_slope, ds->leftpos.x, ds->leftpos.y) - viewz; else left_bottom = *pfloor->bottomheight - viewz; - dc_texturemid = left_top; skewslope = *pfloor->t_slope; // skew using top slope by default -#else - dc_texturemid = *pfloor->topheight - viewz; + if (newline && newline->flags & ML_DONTPEGTOP) + slopeskew = true; + else if (pfloor->master->flags & ML_DONTPEGTOP) + slopeskew = true; + + if (slopeskew) + dc_texturemid = left_top; + else #endif + dc_texturemid = *pfloor->topheight - viewz; if (newline) { offsetvalue = sides[newline->sidenum[0]].rowoffset; if (newline->flags & ML_DONTPEGBOTTOM) -#ifdef ESLOPE { - dc_texturemid = left_bottom; - skewslope = *pfloor->b_slope; // skew using bottom slope - } -#else - offsetvalue -= *pfloor->topheight - *pfloor->bottomheight; -#endif #ifdef ESLOPE - if (newline->flags & ML_DONTPEGTOP) - slopeskew = true; + skewslope = *pfloor->b_slope; // skew using bottom slope + if (slopeskew) + dc_texturemid = left_bottom; + else #endif + offsetvalue -= *pfloor->topheight - *pfloor->bottomheight; + } } else { offsetvalue = sides[pfloor->master->sidenum[0]].rowoffset; if (curline->linedef->flags & ML_DONTPEGBOTTOM) -#ifdef ESLOPE { - dc_texturemid = left_bottom; - skewslope = *pfloor->b_slope; // skew using bottom slope - } -#else - offsetvalue -= *pfloor->topheight - *pfloor->bottomheight; -#endif #ifdef ESLOPE - if (pfloor->master->flags & ML_DONTPEGTOP) // use control linedef's flags - slopeskew = true; + skewslope = *pfloor->b_slope; // skew using bottom slope + if (slopeskew) + dc_texturemid = left_bottom; + else #endif + offsetvalue -= *pfloor->topheight - *pfloor->bottomheight; + } } #ifdef ESLOPE From 40cb22a130be5dc06b22a280b44588430f5a8610 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Mon, 29 Aug 2016 23:24:59 +0100 Subject: [PATCH 4/7] probably best if we did this instead actually --- src/r_segs.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/r_segs.c b/src/r_segs.c index 0d3a6430..b997c2a8 100644 --- a/src/r_segs.c +++ b/src/r_segs.c @@ -984,8 +984,11 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor) else left_bottom = *pfloor->bottomheight - viewz; skewslope = *pfloor->t_slope; // skew using top slope by default - if (newline && newline->flags & ML_DONTPEGTOP) - slopeskew = true; + if (newline) + { + if (newline->flags & ML_DONTPEGTOP) + slopeskew = true; + } else if (pfloor->master->flags & ML_DONTPEGTOP) slopeskew = true; From 7e007c28323d39f90005e811cd2247c5f1d422d8 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Tue, 6 Mar 2018 01:31:49 -0500 Subject: [PATCH 5/7] Restored bounce pad strafe --- src/k_kart.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index b0519f82..d1c563a6 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -1342,7 +1342,7 @@ fixed_t K_3dKartMovement(player_t *player, boolean onground, fixed_t forwardmove fixed_t p_speed = K_GetKartSpeed(player, true); fixed_t p_accel = K_GetKartAccel(player); - if (!onground && !(player->kartstuff[k_feather] & 2)) return 0; // If the player isn't on the ground, there is no change in speed + if (!onground) return 0; // If the player isn't on the ground, there is no change in speed // ACCELCODE!!!1!11! oldspeed = R_PointToDist2(0, 0, player->rmomx, player->rmomy); // FixedMul(P_AproxDistance(player->rmomx, player->rmomy), player->mo->scale); @@ -2391,9 +2391,6 @@ INT16 K_GetKartTurnValue(player_t *player, INT16 turnvalue) if (player->spectator) return turnvalue; - if (player->kartstuff[k_feather] & 2 && !P_IsObjectOnGround(player->mo)) - adjustangle /= 2; - if (player->kartstuff[k_drift] != 0 && P_IsObjectOnGround(player->mo)) { // If we're drifting we have a completely different turning value @@ -3319,6 +3316,19 @@ void K_MoveKartPlayer(player_t *player, boolean onground) K_KartDrift(player, onground); + // Feather strafing + if (player->kartstuff[k_feather] & 2) + { + fixed_t strafe = 0; + fixed_t strength = FRACUNIT/32; + if (cmd->buttons & BT_DRIFTLEFT) + strafe--; + if (cmd->buttons & BT_DRIFTRIGHT) + strafe++; + strength += FixedDiv(player->speed, K_GetKartSpeed(player, true)); + P_Thrust(player->mo, player->mo->angle-ANGLE_90, strafe*strength); + } + // Quick Turning // You can't turn your kart when you're not moving. // So now it's time to burn some rubber! From 10f04aea52258eb358c80abc7c5e0a3c9dcaeda4 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Fri, 9 Mar 2018 20:57:13 -0500 Subject: [PATCH 6/7] Disable "Play Credits" if you're in a game I have no clue if it'd break or not if you used this in a netgame (my gut feeling is "it would break"), but even if it worked it'd be stupid :V --- src/m_menu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/m_menu.c b/src/m_menu.c index 69f6135c..22f5c29d 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -4159,6 +4159,8 @@ static void M_Options(INT32 choice) // if the player is playing _at all_, disable the erase data options OP_DataOptionsMenu[1].status = (Playing()) ? (IT_GRAYEDOUT) : (IT_STRING|IT_SUBMENU); + // SRB2Kart: Same with the "Play Credits" option + OP_MainMenu[6].status = (Playing()) ? (IT_GRAYEDOUT) : (IT_STRING|IT_CALL); OP_MainDef.prevMenu = currentMenu; M_SetupNextMenu(&OP_MainDef); From 367b037c4a8f38d20fcc22bf6c13c49a087d5e94 Mon Sep 17 00:00:00 2001 From: Sryder Date: Sun, 11 Mar 2018 06:38:22 +0000 Subject: [PATCH 7/7] Lower kart engine sound distance --- src/sounds.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sounds.c b/src/sounds.c index ec8ceea0..6a20d65a 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -470,9 +470,9 @@ sfxinfo_t S_sfx[NUMSFX] = {"lkt1", true, 192, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"lkt2", true, 192, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"lkt3", true, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, - {"kart1", false, 48, 16, -1, NULL, 0, -1, -1, LUMPERROR}, - {"kart2", false, 48, 16, -1, NULL, 0, -1, -1, LUMPERROR}, - {"kart3", false, 48, 16, -1, NULL, 0, -1, -1, LUMPERROR}, + {"kart1", false, 48, 0, -1, NULL, 0, -1, -1, LUMPERROR}, + {"kart2", false, 48, 0, -1, NULL, 0, -1, -1, LUMPERROR}, + {"kart3", false, 48, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"mlap", true, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"sboost", true, 90, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"mush", false, 90, 0, -1, NULL, 0, -1, -1, LUMPERROR},