mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
- added a check for game-side-defined voxels when discarding one-sided wall sprites viewed from the back.
This commit is contained in:
parent
e3c2757f1c
commit
952bccbf5f
4 changed files with 9 additions and 0 deletions
|
@ -22,6 +22,7 @@ Ken Silverman's official web site: http://www.advsys.net/ken
|
||||||
#include "texturemanager.h"
|
#include "texturemanager.h"
|
||||||
#include "hw_renderstate.h"
|
#include "hw_renderstate.h"
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
|
#include "gamestruct.h"
|
||||||
|
|
||||||
int checkTranslucentReplacement(FTextureID picnum, int pal);
|
int checkTranslucentReplacement(FTextureID picnum, int pal);
|
||||||
|
|
||||||
|
@ -2201,6 +2202,7 @@ void polymost_scansector(int32_t sectnum)
|
||||||
{
|
{
|
||||||
if ((spr->cstat&(64+48))!=(64+16) ||
|
if ((spr->cstat&(64+48))!=(64+16) ||
|
||||||
(r_voxels && tiletovox[spr->picnum] >= 0 && voxmodels[tiletovox[spr->picnum]]) ||
|
(r_voxels && tiletovox[spr->picnum] >= 0 && voxmodels[tiletovox[spr->picnum]]) ||
|
||||||
|
(r_voxels && gi->Voxelize(spr->picnum)) ||
|
||||||
DMulScale(bcos(spr->ang), -s.x, bsin(spr->ang), -s.y, 6) > 0)
|
DMulScale(bcos(spr->ang), -s.x, bsin(spr->ang), -s.y, 6) > 0)
|
||||||
if (renderAddTsprite(z, sectnum))
|
if (renderAddTsprite(z, sectnum))
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -101,6 +101,7 @@ struct GameInterface
|
||||||
virtual int chaseCamX(binangle ang) { return 0; }
|
virtual int chaseCamX(binangle ang) { return 0; }
|
||||||
virtual int chaseCamY(binangle ang) { return 0; }
|
virtual int chaseCamY(binangle ang) { return 0; }
|
||||||
virtual int chaseCamZ(fixedhoriz horiz) { return 0; }
|
virtual int chaseCamZ(fixedhoriz horiz) { return 0; }
|
||||||
|
virtual bool Voxelize(int sprnum) { return false; }
|
||||||
|
|
||||||
virtual FString statFPS()
|
virtual FString statFPS()
|
||||||
{
|
{
|
||||||
|
|
|
@ -801,4 +801,9 @@ void GameInterface::FreeLevelData()
|
||||||
::GameInterface::FreeLevelData();
|
::GameInterface::FreeLevelData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GameInterface::Voxelize(int sprnum)
|
||||||
|
{
|
||||||
|
return (aVoxelArray[sprnum].Voxel >= 0);
|
||||||
|
}
|
||||||
|
|
||||||
END_SW_NS
|
END_SW_NS
|
||||||
|
|
|
@ -2255,6 +2255,7 @@ struct GameInterface : ::GameInterface
|
||||||
int chaseCamX(binangle ang) { return -ang.bcos(-3); }
|
int chaseCamX(binangle ang) { return -ang.bcos(-3); }
|
||||||
int chaseCamY(binangle ang) { return -ang.bsin(-3); }
|
int chaseCamY(binangle ang) { return -ang.bsin(-3); }
|
||||||
int chaseCamZ(fixedhoriz horiz) { return horiz.asq16() >> 8; }
|
int chaseCamZ(fixedhoriz horiz) { return horiz.asq16() >> 8; }
|
||||||
|
bool Voxelize(int sprnum);
|
||||||
|
|
||||||
|
|
||||||
GameStats getStats() override;
|
GameStats getStats() override;
|
||||||
|
|
Loading…
Reference in a new issue