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"
|
2013-06-23 07:49:34 +00:00
|
|
|
|
|
|
|
struct GLRenderSettings
|
|
|
|
{
|
|
|
|
|
|
|
|
SBYTE lightmode;
|
|
|
|
bool nocoloredspritelighting;
|
|
|
|
bool notexturefill;
|
|
|
|
bool brightfog;
|
|
|
|
|
|
|
|
SBYTE map_lightmode;
|
|
|
|
SBYTE map_nocoloredspritelighting;
|
|
|
|
SBYTE map_notexturefill;
|
|
|
|
SBYTE map_brightfog;
|
|
|
|
|
|
|
|
FVector3 skyrotatevector;
|
|
|
|
FVector3 skyrotatevector2;
|
|
|
|
|
2014-12-29 22:52:20 +00:00
|
|
|
float pixelstretch;
|
|
|
|
|
2013-06-23 07:49:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern GLRenderSettings glset;
|
|
|
|
|
|
|
|
#include "r_defs.h"
|
|
|
|
#include "a_sharedglobal.h"
|
|
|
|
#include "c_cvars.h"
|
|
|
|
|
|
|
|
extern int extralight;
|
|
|
|
EXTERN_CVAR(Int, gl_weaponlight);
|
|
|
|
|
|
|
|
inline int getExtraLight()
|
|
|
|
{
|
2014-05-11 20:57:42 +00:00
|
|
|
return 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);
|
|
|
|
|
|
|
|
class AStackPoint;
|
|
|
|
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!
|
|
|
|
|
|
|
|
GLSectorStackPortal *GetGLPortal();
|
|
|
|
};
|
|
|
|
|
2016-03-04 13:10:13 +00:00
|
|
|
struct FGLLinePortal
|
|
|
|
{
|
|
|
|
// defines the complete span of this portal
|
|
|
|
vertex_t *v1, *v2; // vertices, from v1 to v2
|
|
|
|
fixed_t dx, dy; // precalculated v2 - v1 for side checking
|
|
|
|
FLinePortal *reference; // one of the associated line portals, for retrieving translation info etc.
|
|
|
|
};
|
|
|
|
|
2013-06-23 07:49:34 +00:00
|
|
|
extern TArray<FPortal *> portals;
|
2016-03-04 13:10:13 +00:00
|
|
|
extern TArray<FGLLinePortal*> linePortalToGL;
|
|
|
|
|
2013-06-23 07:49:34 +00:00
|
|
|
extern TArray<BYTE> currentmapsection;
|
|
|
|
|
|
|
|
void gl_InitPortals();
|
|
|
|
void gl_BuildPortalCoverage(FPortalCoverage *coverage, subsector_t *subsector, FPortal *portal);
|
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
|