2013-06-23 07:49:34 +00:00
|
|
|
|
|
|
|
#ifndef __GLC_DATA_H
|
|
|
|
#define __GLC_DATA_H
|
|
|
|
|
|
|
|
#include "doomtype.h"
|
2016-03-21 01:57:02 +00:00
|
|
|
#include "vectors.h"
|
2017-03-11 22:28:07 +00:00
|
|
|
#include "r_utility.h"
|
2013-06-23 07:49:34 +00:00
|
|
|
|
|
|
|
struct GLRenderSettings
|
|
|
|
{
|
2017-03-09 18:31:45 +00:00
|
|
|
int8_t lightmode;
|
2013-06-23 07:49:34 +00:00
|
|
|
bool notexturefill;
|
|
|
|
bool brightfog;
|
2016-12-06 11:58:45 +00:00
|
|
|
bool lightadditivesurfaces;
|
2013-06-23 07:49:34 +00:00
|
|
|
|
2016-12-06 11:58:45 +00:00
|
|
|
int8_t map_lightmode;
|
|
|
|
int8_t map_notexturefill;
|
|
|
|
int8_t map_brightfog;
|
|
|
|
int8_t map_lightadditivesurfaces;
|
2013-06-23 07:49:34 +00:00
|
|
|
|
|
|
|
FVector3 skyrotatevector;
|
|
|
|
FVector3 skyrotatevector2;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern GLRenderSettings glset;
|
|
|
|
|
|
|
|
#include "r_defs.h"
|
|
|
|
#include "a_sharedglobal.h"
|
|
|
|
#include "c_cvars.h"
|
|
|
|
|
|
|
|
EXTERN_CVAR(Int, gl_weaponlight);
|
|
|
|
|
|
|
|
inline int getExtraLight()
|
|
|
|
{
|
2017-03-11 22:28:07 +00:00
|
|
|
return r_viewpoint.extralight * gl_weaponlight;
|
2013-06-23 07:49:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void gl_RecalcVertexHeights(vertex_t * v);
|
|
|
|
FTextureID gl_GetSpriteFrame(unsigned sprite, int frame, int rot, angle_t ang, bool *mirror);
|
|
|
|
|
|
|
|
struct GLSectorStackPortal;
|
|
|
|
|
|
|
|
struct FPortal
|
|
|
|
{
|
2016-04-02 21:17:16 +00:00
|
|
|
DVector2 mDisplacement;
|
2013-06-23 07:49:34 +00:00
|
|
|
int plane;
|
|
|
|
GLSectorStackPortal *glportal; // for quick access to the render data. This is only valid during BSP traversal!
|
|
|
|
|
2016-04-20 09:39:41 +00:00
|
|
|
GLSectorStackPortal *GetRenderState();
|
2013-06-23 07:49:34 +00:00
|
|
|
};
|
|
|
|
|
2016-03-04 13:10:13 +00:00
|
|
|
struct FGLLinePortal
|
|
|
|
{
|
2016-07-16 10:45:49 +00:00
|
|
|
// defines the complete span of this portal, if this is of type PORTT_LINKED.
|
|
|
|
vertex_t *v1 = nullptr, *v2 = nullptr; // vertices, from v1 to v2
|
2016-04-30 14:57:53 +00:00
|
|
|
TArray<FLinePortal *> lines;
|
|
|
|
int validcount = 0;
|
2016-03-04 13:10:13 +00:00
|
|
|
};
|
|
|
|
|
2013-06-23 07:49:34 +00:00
|
|
|
extern TArray<FPortal *> portals;
|
2016-03-04 13:10:13 +00:00
|
|
|
extern TArray<FGLLinePortal*> linePortalToGL;
|
|
|
|
|
2017-03-09 18:54:41 +00:00
|
|
|
extern TArray<uint8_t> currentmapsection;
|
2013-06-23 07:49:34 +00:00
|
|
|
|
|
|
|
void gl_InitPortals();
|
2016-04-20 09:39:41 +00:00
|
|
|
void gl_BuildPortalCoverage(FPortalCoverage *coverage, subsector_t *subsector, const DVector2 &displacement);
|
2014-06-19 13:22:00 +00:00
|
|
|
void gl_InitData();
|
2013-06-23 07:49:34 +00:00
|
|
|
|
2014-05-11 20:57:42 +00:00
|
|
|
extern long gl_frameMS;
|
|
|
|
|
2013-06-23 07:49:34 +00:00
|
|
|
#endif
|