From 03f81bed16cd7e946f5c5e79f0c816a2534f18c5 Mon Sep 17 00:00:00 2001 From: Alug Date: Tue, 3 Jun 2025 19:46:22 +0200 Subject: [PATCH 1/7] dont initialise those twice lol --- src/r_draw8.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/r_draw8.c b/src/r_draw8.c index f9e3e12e7..6edc9d6a6 100644 --- a/src/r_draw8.c +++ b/src/r_draw8.c @@ -782,10 +782,6 @@ void R_DrawSpan_8 (void) xposition <<= nflatshiftup; yposition <<= nflatshiftup; xstep <<= nflatshiftup; ystep <<= nflatshiftup; - source = ds_source; - colormap = ds_colormap; - dest = ylookup[ds_y] + columnofs[ds_x1]; - if (dest+8 > deststop) { return; -- 2.54.0 From 236e7b8d45b07eeec9dc94b54eb0a7bf2bf95fd8 Mon Sep 17 00:00:00 2001 From: Indev Date: Wed, 4 Jun 2025 03:57:47 +0300 Subject: [PATCH 2/7] Fix game rendering only first splitscreen player in opengl --- src/d_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d_main.c b/src/d_main.c index d10ba05ab..a47c8b756 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -345,7 +345,7 @@ static void D_Renderview(void) { HWR_RenderPlayerView(); R_RestoreLevelInterpolators(); - return; + continue; } #endif if (issplitscreen) // Splitscreen-specific -- 2.54.0 From 0a31e0a65e2ec99f9a2689755ea54ef32dd319a0 Mon Sep 17 00:00:00 2001 From: Alug Date: Sat, 7 Jun 2025 02:35:49 +0200 Subject: [PATCH 3/7] use realloc for batching stuff seems to strangely speed things up even didnt think those happen often? --- src/hardware/hw_batching.c | 40 +++++++++++--------------------------- 1 file changed, 11 insertions(+), 29 deletions(-) diff --git a/src/hardware/hw_batching.c b/src/hardware/hw_batching.c index b8490f4ed..801442b6f 100644 --- a/src/hardware/hw_batching.c +++ b/src/hardware/hw_batching.c @@ -89,32 +89,23 @@ void HWR_ProcessPolygon(FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPt { if (!pSurf) { - I_Error("Got a null FSurfaceInfo in batching");// nulls should not come in the stuff that batching currently applies to + I_Error("Got a null FSurfaceInfo in batching"); // nulls should not come in the stuff that batching currently applies to } if (polygonArraySize == polygonArrayAllocSize) { - PolygonArrayEntry* new_array; - // ran out of space, make new array double the size + // ran out of space, double the array size polygonArrayAllocSize *= 2; - new_array = malloc(polygonArrayAllocSize * sizeof(PolygonArrayEntry)); - memcpy(new_array, polygonArray, polygonArraySize * sizeof(PolygonArrayEntry)); - free(polygonArray); - polygonArray = new_array; + polygonArray = realloc(polygonArray, polygonArrayAllocSize * sizeof(PolygonArrayEntry)); // also need to redo the index array, dont need to copy it though - free(polygonArraySorted); - polygonArraySorted = malloc(polygonArrayAllocSize * sizeof(PolygonArrayEntry *)); + polygonArraySorted = realloc(polygonArraySorted, polygonArrayAllocSize * sizeof(PolygonArrayEntry*)); } while (unsortedVertexArraySize + (int)iNumPts > unsortedVertexArrayAllocSize) { - FOutVector* new_array; // need more space for vertices in unsortedVertexArray unsortedVertexArrayAllocSize *= 2; - new_array = malloc(unsortedVertexArrayAllocSize * sizeof(FOutVector)); - memcpy(new_array, unsortedVertexArray, unsortedVertexArraySize * sizeof(FOutVector)); - free(unsortedVertexArray); - unsortedVertexArray = new_array; + unsortedVertexArray = realloc(unsortedVertexArray, unsortedVertexArrayAllocSize * sizeof(FOutVector)); } // add the polygon data to the arrays @@ -138,10 +129,11 @@ void HWR_ProcessPolygon(FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPt } } + static int comparePolygons(const void *p1, const void *p2) { - PolygonArrayEntry *poly1 = *(PolygonArrayEntry *const *)p1; - PolygonArrayEntry *poly2 = *(PolygonArrayEntry *const *)p2; + const PolygonArrayEntry *poly1 = *(PolygonArrayEntry *const *)p1; + const PolygonArrayEntry *poly2 = *(PolygonArrayEntry *const *)p2; int diff; INT64 diff64; @@ -177,9 +169,7 @@ static int comparePolygons(const void *p1, const void *p2) diff = poly1->surf.LightInfo.fade_end - poly2->surf.LightInfo.fade_end; if (diff != 0) return diff; - diff = poly1->surf.LightInfo.directional - poly2->surf.LightInfo.directional; - - return diff; + return poly1->surf.LightInfo.directional - poly2->surf.LightInfo.directional; } static int comparePolygonsNoShaders(const void *p1, const void *p2) @@ -328,19 +318,11 @@ void HWR_RenderBatches(void) // probably never will this loop run more than once though while (finalVertexWritePos + numVerts > finalVertexArrayAllocSize) { - FOutVector* new_array; - unsigned int* new_index_array; finalVertexArrayAllocSize *= 2; - new_array = malloc(finalVertexArrayAllocSize * sizeof(FOutVector)); - memcpy(new_array, finalVertexArray, finalVertexWritePos * sizeof(FOutVector)); - free(finalVertexArray); - finalVertexArray = new_array; + finalVertexArray = realloc(finalVertexArray, finalVertexArrayAllocSize * sizeof(FOutVector)); // also increase size of index array, 3x of vertex array since // going from fans to triangles increases vertex count to 3x - new_index_array = malloc(finalVertexArrayAllocSize * 3 * sizeof(UINT32)); - memcpy(new_index_array, finalVertexIndexArray, finalIndexWritePos * sizeof(UINT32)); - free(finalVertexIndexArray); - finalVertexIndexArray = new_index_array; + finalVertexIndexArray = realloc(finalVertexIndexArray, finalVertexArrayAllocSize * 3 * sizeof(UINT32)); } // write the vertices of the polygon memcpy(&finalVertexArray[finalVertexWritePos], &unsortedVertexArray[entry->vertsIndex], -- 2.54.0 From 8dd6d7cfdd2dd7ccaba18a2382a0da9b36adc3e3 Mon Sep 17 00:00:00 2001 From: Alug Date: Mon, 9 Jun 2025 16:58:39 +0200 Subject: [PATCH 4/7] fix the fov adjust check lmao oops --- src/r_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/r_main.c b/src/r_main.c index 15f17db9d..490d6eda4 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -1350,10 +1350,10 @@ void R_RenderPlayerView(player_t *player) for (UINT8 j = 0; j <= splitscreen; j++) { - if (player == &players[displayplayers[i]] - && viewfov[i] != fov) + if (player == &players[displayplayers[j]] + && viewfov[j] != fov) { - viewfov[i] = fov; + viewfov[j] = fov; R_SetFov(fov); } } -- 2.54.0 From 19c98a436aa12de68618e9d97caa4770540a5ad6 Mon Sep 17 00:00:00 2001 From: Alug Date: Mon, 9 Jun 2025 17:04:13 +0200 Subject: [PATCH 5/7] fix some fofs not rendering in software i did an oopsie in 7.2 X) --- src/r_plane.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/r_plane.c b/src/r_plane.c index 03dea56be..37930e89e 100644 --- a/src/r_plane.c +++ b/src/r_plane.c @@ -826,15 +826,18 @@ void R_DrawSinglePlane(visplane_t *pl) // Don't draw planes that shouldn't be drawn. for (rover = pl->ffloor->target->ffloors; rover; rover = rover->next) { - if (!((pl->ffloor->flags & FF_CUTEXTRA) && (rover->flags & FF_EXTRA))) - continue; + if ((pl->ffloor->flags & FF_CUTEXTRA) && (rover->flags & FF_EXTRA)) + { + if (!(rover->flags & FF_EXTRA)) + continue; - // The plane is from an extra 3D floor... Check the flags so - // there are no undesired cuts. - if (((pl->ffloor->flags & (FF_FOG|FF_SWIMMABLE)) == (rover->flags & (FF_FOG|FF_SWIMMABLE))) - && pl->height < *rover->topheight - && pl->height > *rover->bottomheight) - return; + // The plane is from an extra 3D floor... Check the flags so + // there are no undesired cuts. + if (((pl->ffloor->flags & (FF_FOG|FF_SWIMMABLE)) == (rover->flags & (FF_FOG|FF_SWIMMABLE))) + && pl->height < *rover->topheight + && pl->height > *rover->bottomheight) + return; + } } if (pl->ffloor->flags & FF_TRANSLUCENT) -- 2.54.0 From 618d9e4cdf5394f31e35149458208af95f95fe6a Mon Sep 17 00:00:00 2001 From: Alug Date: Wed, 11 Jun 2025 20:54:57 +0200 Subject: [PATCH 6/7] add lugent to credits --- src/f_finale.c | 5 +++-- src/m_menu.c | 55 +++++++++++++++++++++++++------------------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/f_finale.c b/src/f_finale.c index dd024ecd0..b98570b48 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -531,8 +531,8 @@ static const char *credits[] = { "\"Xyzzy\"", "\"Chearii\"", " ", - "\"Sunflower\" aka \"AnimeSonic\"", - "\"Yuz\" aka \"Yuzler\"", + "\"Sunflower\"", + "\"Yuz\"", "\"Democrab\"", "\"EXpand\"", "\"Nexit\"", @@ -543,6 +543,7 @@ static const char *credits[] = { "\"Achii\"", "\"Anonimus\"", "\"scizor300\"", + "\"Lugent\"", "", "\1Special Thanks", "SEGA", diff --git a/src/m_menu.c b/src/m_menu.c index 18dd43687..3f84da6b6 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -2468,39 +2468,38 @@ static menuitem_t OP_HudOffsetMenu[] = static menuitem_t OP_SaturnCreditsMenu[] = { - {IT_HEADER, NULL, "Saturn Credits", NULL, 0}, + {IT_HEADER, NULL, "Thanks to all contributers <3", NULL, 0}, - {IT_HEADER, NULL, "Thanks to all contributers <3", NULL, 7}, + {IT_STRING2+IT_SPACE, NULL, "Alug", NULL, 10}, + {IT_STRING2+IT_SPACE, NULL, "Indev", NULL, 20}, + {IT_STRING2+IT_SPACE, NULL, "Haya", NULL, 30}, + {IT_STRING2+IT_SPACE, NULL, "Nepdisk", NULL, 40}, + {IT_STRING2+IT_SPACE, NULL, "GenericHeroGuy", NULL, 50}, + {IT_STRING2+IT_SPACE, NULL, "xyzzy", NULL, 60}, + {IT_STRING2+IT_SPACE, NULL, "Chearii", NULL, 70}, - {IT_STRING2+IT_SPACE, NULL, "Alug", NULL, 17}, - {IT_STRING2+IT_SPACE, NULL, "Indev", NULL, 27}, - {IT_STRING2+IT_SPACE, NULL, "Haya", NULL, 37}, - {IT_STRING2+IT_SPACE, NULL, "Nepdisk", NULL, 47}, - {IT_STRING2+IT_SPACE, NULL, "GenericHeroGuy", NULL, 57}, - {IT_STRING2+IT_SPACE, NULL, "xyzzy", NULL, 67}, - {IT_STRING2+IT_SPACE, NULL, "Chearii", NULL, 77}, + {IT_STRING2+IT_SPACE, NULL, "Sunflower", NULL, 80}, + {IT_STRING2+IT_SPACE, NULL, "Yuz", NULL, 90}, + {IT_STRING2+IT_SPACE, NULL, "Democrab", NULL, 100}, + {IT_STRING2+IT_SPACE, NULL, "EXpand", NULL, 110}, + {IT_STRING2+IT_SPACE, NULL, "Nexit", NULL, 120}, + {IT_STRING2+IT_SPACE, NULL, "Spee", NULL, 130}, + {IT_STRING2+IT_SPACE, NULL, "jin", NULL, 140}, + {IT_STRING2+IT_SPACE, NULL, "riomccloud", NULL, 150}, + {IT_STRING2+IT_SPACE, NULL, "chromaticpipe", NULL, 160}, + {IT_STRING2+IT_SPACE, NULL, "Achii", NULL, 170}, + {IT_STRING2+IT_SPACE, NULL, "Anonimus", NULL, 180}, + {IT_STRING2+IT_SPACE, NULL, "scizor300", NULL, 190}, + {IT_STRING2+IT_SPACE, NULL, "Lugent", NULL, 200}, - {IT_STRING2+IT_SPACE, NULL, "Sunflower aka AnimeSonic", NULL, 87}, - {IT_STRING2+IT_SPACE, NULL, "Yuz aka Yuzler", NULL, 97}, - {IT_STRING2+IT_SPACE, NULL, "Democrab", NULL, 107}, - {IT_STRING2+IT_SPACE, NULL, "EXpand", NULL, 117}, - {IT_STRING2+IT_SPACE, NULL, "Nexit", NULL, 127}, - {IT_STRING2+IT_SPACE, NULL, "Spee", NULL, 137}, - {IT_STRING2+IT_SPACE, NULL, "jin", NULL, 147}, - {IT_STRING2+IT_SPACE, NULL, "riomccloud", NULL, 157}, - {IT_STRING2+IT_SPACE, NULL, "chromaticpipe", NULL, 167}, - {IT_STRING2+IT_SPACE, NULL, "Achii", NULL, 177}, - {IT_STRING2+IT_SPACE, NULL, "Anonimus", NULL, 187}, - {IT_STRING2+IT_SPACE, NULL, "scizor300", NULL, 197}, + {IT_HEADER, NULL, "Special Thanks <3", NULL, 168}, - {IT_HEADER, NULL, "Special Thanks <3", NULL, 167}, + {IT_STRING2+IT_SPACE, NULL, "All of Sunflower's Garden", NULL, 178}, + {IT_STRING2+IT_SPACE, NULL, "The Moe Mansion and Birdhouse Team", NULL, 188}, + {IT_STRING2+IT_SPACE, NULL, "Galactice for Galaxy", NULL, 198}, - {IT_STRING2+IT_SPACE, NULL, "All of Sunflower's Garden", NULL, 177}, - {IT_STRING2+IT_SPACE, NULL, "The Moe Mansion and Birdhouse Team", NULL, 187}, - {IT_STRING2+IT_SPACE, NULL, "Galactice for Galaxy", NULL, 197}, - - {IT_STRING+IT_SPACE, NULL, "", NULL, 207}, // dummy text I - {IT_STRING, NULL, "", NULL, 267}, // dummy text II + {IT_STRING+IT_SPACE, NULL, "", NULL, 198}, // dummy text I + {IT_STRING, NULL, "", NULL, 258}, // dummy text II }; // sry we dont have space for this anymore :/ -- 2.54.0 From 3d22a5906fbe06f7eb7a398874e001c0b0140530 Mon Sep 17 00:00:00 2001 From: chromaticpipe <127907268+chromaticpipe@users.noreply.github.com> Date: Thu, 12 Jun 2025 11:37:25 -0500 Subject: [PATCH 7/7] Fix level interpolators jittering during objectplac --- src/p_tick.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/p_tick.c b/src/p_tick.c index 3c4583322..5e1af1b68 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -654,6 +654,7 @@ void P_Ticker(boolean run) { P_MapStart(); R_UpdateMobjInterpolators(); + R_UpdateLevelInterpolators(); OP_ObjectplaceMovement(&players[0]); P_MoveChaseCamera(&players[0], &camera[0], false); R_UpdateViewInterpolation(); -- 2.54.0