Fix crashes and issues in OpenGL, remove old code

This commit is contained in:
Lactozilla 2023-06-26 17:36:00 -03:00
parent b760f0dffe
commit 8ad191b080
6 changed files with 103 additions and 862 deletions

View file

@ -636,13 +636,6 @@ extern const char *compdate, *comptime, *comprevision, *compbranch;
/// Experimental attempts at preventing MF_PAPERCOLLISION objects from getting stuck in walls.
//#define PAPER_COLLISIONCORRECTION
/// FINALLY some real clipping that doesn't make walls dissappear AND speeds the game up
/// (that was the original comment from SRB2CB, sadly it is a lie and actually slows game down)
/// on the bright side it fixes some weird issues with translucent walls
/// \note SRB2CB port.
/// SRB2CB itself ported this from PrBoom+
#define NEWCLIP
/// OpenGL shaders
#define GL_SHADERS

File diff suppressed because it is too large Load diff

View file

@ -33,11 +33,9 @@ void HWR_DrawConsoleBack(UINT32 color, INT32 height);
void HWR_DrawTutorialBack(UINT32 color, INT32 boxheight);
void HWR_RenderSkyboxView(INT32 viewnumber, player_t *player);
void HWR_RenderPlayerView(INT32 viewnumber, player_t *player);
void HWR_ClearSkyDome(void);
void HWR_BuildSkyDome(void);
void HWR_FreeSkyDome(void *skydome);
void HWR_DrawViewBorder(INT32 clearlines);
void HWR_DrawFlatFill(INT32 x, INT32 y, INT32 w, INT32 h, lumpnum_t flatlumpnum);
void HWR_InitTextureMapping(void);
void HWR_SetViewSize(void);
void HWR_DrawPatch(patch_t *gpatch, INT32 x, INT32 y, INT32 option);
void HWR_DrawStretchyFixedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscale, fixed_t vscale, INT32 option, const UINT8 *colormap);

View file

@ -373,6 +373,9 @@ void P_UnloadWorld(world_t *w)
HWR_FreeExtraSubsectors(world->extrasubsectors);
world->extrasubsectors = NULL;
}
if (world->sky_dome)
HWR_FreeSkyDome(world->sky_dome);
}
//

View file

@ -133,6 +133,8 @@ typedef struct
size_t interpolated_mobjs_capacity;
boolean interpolated_level_this_frame;
void *sky_dome;
} world_t;
extern world_t *world;

View file

@ -873,7 +873,7 @@ static void R_Subsector(size_t num)
{
for (rover = frontsector->ffloors; rover; rover = rover->next)
{
sector_t *controlSec = &sectors[rover->secnum];
sector_t *controlSec = &viewworld->sectors[rover->secnum];
if (controlSec->moved == true)
{