Softwarestuff (into saturn-next) #65

Merged
Indev450 merged 3 commits from softwarestuff into Saturn-Next 2023-09-13 20:21:59 +02:00
3 changed files with 12 additions and 2 deletions

No files matched your search

+3
View File
@@ -1769,6 +1769,9 @@ void R_StoreWallRange(INT32 start, INT32 stop)
while (need > maxopenings);
openings = Z_Realloc(openings, maxopenings * sizeof (*openings), PU_STATIC, NULL);
lastopening = openings + pos;
if (oldopenings == NULL)
return;
// borrowed fix from *cough* zdoom *cough*
// [RH] We also need to adjust the openings pointers that
+9
View File
@@ -851,6 +851,15 @@ static void R_DrawVisSprite(vissprite_t *vis)
if (overflow_test < 0) overflow_test = -overflow_test;
if ((UINT64)overflow_test&0xFFFFFFFF80000000ULL) return; // ditto
}
// TODO This check should not be necessary. But Papersprites near to the camera will sometimes create invalid values
// for the vissprite's startfrac. This happens because they are not depth culled like other sprites.
// Someone who is more familiar with papersprites pls check and try to fix <3
if (vis->startfrac < 0 || vis->startfrac > (patch->width << FRACBITS))
{
// never draw vissprites with startfrac out of patch range
return;
}
colfunc = basecolfunc; // hack: this isn't resetting properly somewhere.
dc_colormap = vis->colormap;
-2
View File
@@ -152,8 +152,6 @@ typedef struct vissprite_s
extracolormap_t *extra_colormap; // global colormaps
//fixed_t xscale;
// Precalculated top and bottom screen coords for the sprite.
fixed_t thingheight; // The actual height of the thing (for 3D floors)
sector_t *sector; // The sector containing the thing.