- gl_system.h as well, in particular this has no place in hw_* files.

This commit is contained in:
Christoph Oelckers 2018-05-16 23:34:52 +02:00
parent 401c9ab8ca
commit c0837f42bd
55 changed files with 69 additions and 75 deletions

View file

@ -28,7 +28,7 @@
**
*/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "menu/menu.h"
#include "r_utility.h"
#include "g_levellocals.h"

View file

@ -27,7 +27,7 @@
**
*/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "tarray.h"
#include "doomtype.h"
#include "r_utility.h"

View file

@ -25,7 +25,7 @@
**
**/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "doomtype.h"
#include "p_local.h"
#include "r_state.h"

View file

@ -25,7 +25,7 @@
**
**/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "gl/shaders/gl_shader.h"
#include "gl/dynlights/gl_lightbuffer.h"
#include "hwrenderer/utility/hw_clock.h"

View file

@ -20,7 +20,7 @@
//--------------------------------------------------------------------------
//
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "gl/shaders/gl_shader.h"
#include "gl/dynlights/gl_shadowmap.h"
#include "gl/system/gl_debug.h"

View file

@ -26,7 +26,7 @@
**
**/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "w_wad.h"
#include "g_game.h"
#include "doomstat.h"

View file

@ -25,7 +25,7 @@
**
**/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "gl_load/gl_interface.h"
#include "hwrenderer/utility/hw_cvars.h"
#include "gl/renderer/gl_lightdata.h"

View file

@ -25,7 +25,7 @@
**
*/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "gi.h"
#include "m_png.h"
#include "r_utility.h"

View file

@ -26,7 +26,7 @@
**/
#include "templates.h"
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "gl_load/gl_interface.h"
#include "gl/data/gl_vertexbuffer.h"
#include "gl/renderer/gl_postprocessstate.h"

View file

@ -20,7 +20,7 @@
//--------------------------------------------------------------------------
//
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "gl/shaders/gl_shader.h"
#include "gl/renderer/gl_renderer.h"
#include "gl/renderer/gl_quaddrawer.h"

View file

@ -25,7 +25,7 @@
**
*/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "v_video.h"
#include "gl_load/gl_interface.h"
#include "hwrenderer/utility/hw_cvars.h"

View file

@ -25,7 +25,7 @@
**
*/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "files.h"
#include "v_video.h"
#include "m_png.h"

View file

@ -28,7 +28,7 @@
#include "templates.h"
#include "doomstat.h"
#include "r_data/colormaps.h"
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "gl_load/gl_interface.h"
#include "gl/data/gl_vertexbuffer.h"
#include "hwrenderer/utility/hw_cvars.h"

View file

@ -27,7 +27,7 @@
**
*/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "r_sky.h"
#include "r_utility.h"
#include "doomstat.h"

View file

@ -25,7 +25,7 @@
**
*/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "a_sharedglobal.h"
#include "r_defs.h"
#include "r_sky.h"

View file

@ -25,7 +25,7 @@
**
*/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "p_local.h"
#include "c_dispatch.h"
#include "doomstat.h"

View file

@ -25,7 +25,7 @@
**
*/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "gi.h"
#include "m_png.h"
#include "doomstat.h"

View file

@ -20,7 +20,7 @@
//--------------------------------------------------------------------------
//
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "doomtype.h"
#include "g_level.h"
#include "w_wad.h"

View file

@ -25,7 +25,7 @@
**
*/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "p_local.h"
#include "p_effect.h"
#include "g_level.h"

View file

@ -20,7 +20,7 @@
//--------------------------------------------------------------------------
//
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "p_local.h"
#include "p_lnspec.h"
#include "a_sharedglobal.h"

View file

@ -25,7 +25,7 @@
**
*/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "r_utility.h"
#include "v_video.h"

View file

@ -20,7 +20,7 @@
//--------------------------------------------------------------------------
//
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "v_video.h"
#include "hwrenderer/utility/hw_cvars.h"
#include "gl/shaders/gl_ambientshader.h"

View file

@ -25,7 +25,7 @@
**
*/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "v_video.h"
#include "gl/shaders/gl_bloomshader.h"

View file

@ -25,7 +25,7 @@
**
*/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "v_video.h"
#include "gl/shaders/gl_blurshader.h"
#include "gl/data/gl_vertexbuffer.h"

View file

@ -25,7 +25,7 @@
**
*/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "v_video.h"
#include "gl/shaders/gl_colormapshader.h"

View file

@ -24,7 +24,7 @@
// Fast approXimate Anti-Aliasing (FXAA) post-processing
//
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "gl/shaders/gl_fxaashader.h"
EXTERN_CVAR(Int, gl_fxaa)

View file

@ -25,7 +25,7 @@
**
*/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "v_video.h"
#include "gl/shaders/gl_lensshader.h"

View file

@ -20,7 +20,7 @@
//--------------------------------------------------------------------------
//
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "v_video.h"
#include "w_wad.h"
#include "gl_load/gl_interface.h"

View file

@ -27,7 +27,7 @@
**
*/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "gl/shaders/gl_present3dRowshader.h"
void FPresentStereoShaderBase::Init(const char * vtx_shader_name, const char * program_name)

View file

@ -25,7 +25,7 @@
**
*/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "v_video.h"
#include "gl/shaders/gl_presentshader.h"

View file

@ -26,7 +26,7 @@
**
*/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "c_cvars.h"
#include "v_video.h"
#include "w_wad.h"

View file

@ -25,7 +25,7 @@
**
*/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "v_video.h"
#include "gl_load/gl_interface.h"
#include "hwrenderer/utility/hw_cvars.h"

View file

@ -20,7 +20,7 @@
//--------------------------------------------------------------------------
//
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "files.h"
#include "gl/shaders/gl_shadowmapshader.h"

View file

@ -25,7 +25,7 @@
**
*/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "v_video.h"
#include "hwrenderer/utility/hw_cvars.h"
#include "gl/shaders/gl_tonemapshader.h"

View file

@ -30,7 +30,7 @@
#include "gl_stereo3d.h"
#include "gl_stereo_leftright.h"
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "gl/renderer/gl_renderstate.h"

View file

@ -39,7 +39,7 @@
#include "gl_stereo3d.h"
#include "gl_stereo_leftright.h"
#include "gl_sidebyside3d.h"
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "gl/renderer/gl_renderstate.h"
namespace s3d {

View file

@ -30,7 +30,7 @@
#include "gl_stereo3d.h"
#include "gl_stereo_leftright.h"
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
namespace s3d {

View file

@ -38,7 +38,7 @@
#include "gl_stereo3d.h"
#include "gl_stereo_leftright.h"
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "gl/renderer/gl_renderstate.h"

View file

@ -25,7 +25,7 @@
**
*/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "gl/stereo3d/gl_stereo3d.h"
namespace s3d {

View file

@ -29,7 +29,7 @@
#include "vectors.h" // RAD2DEG
#include "doomtype.h" // M_PI
#include "hwrenderer/utility/hw_cvars.h"
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "gl/renderer/gl_renderstate.h"
#include "gl/renderer/gl_renderer.h"
#include "gl/renderer/gl_renderbuffers.h"

View file

@ -28,7 +28,7 @@
#ifndef GL_STEREO3D_SCOPED_COLOR_MASK_H_
#define GL_STEREO3D_SCOPED_COLOR_MASK_H_
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
/**
* Temporarily change color mask

View file

@ -26,7 +26,7 @@
*/
#include "templates.h"
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "gl/system/gl_debug.h"
#include "stats.h"
#include <set>

View file

@ -26,7 +26,7 @@
**
*/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "v_video.h"
#include "m_png.h"
#include "templates.h"

View file

@ -24,7 +24,7 @@
**
*/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "f_wipe.h"
#include "m_random.h"
#include "w_wad.h"

View file

@ -26,7 +26,7 @@
**
*/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "templates.h"
#include "c_cvars.h"
#include "r_data/colormaps.h"

View file

@ -20,7 +20,7 @@
//--------------------------------------------------------------------------
//
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "c_cvars.h"
#include "gl_load/gl_interface.h"

View file

@ -26,7 +26,7 @@
**
*/
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "tarray.h"
#include "doomtype.h"
#include "m_argv.h"

View file

@ -25,7 +25,6 @@
**
**/
#include "gl/system/gl_system.h"
#include "actorinlines.h"
#include "hw_dynlightdata.h"
@ -55,11 +54,11 @@ bool FDynLightData::GetLight(int group, Plane & p, ADynamicLight * light, bool c
DVector3 pos = light->PosRelative(group);
float radius = (light->GetRadius());
float dist = fabsf(p.DistToPoint(pos.X, pos.Z, pos.Y));
auto dist = fabs(p.DistToPoint((float)pos.X, (float)pos.Z, (float)pos.Y));
if (radius <= 0.f) return false;
if (dist > radius) return false;
if (checkside && p.PointOnSide(pos.X, pos.Z, pos.Y))
if (checkside && p.PointOnSide((float)pos.X, (float)pos.Z, (float)pos.Y))
{
return false;
}
@ -124,20 +123,20 @@ void FDynLightData::AddLightToList(int group, ADynamicLight * light)
if (light->IsSpot())
{
lightType = 1.0f;
spotInnerAngle = light->SpotInnerAngle.Cos();
spotOuterAngle = light->SpotOuterAngle.Cos();
spotInnerAngle = (float)light->SpotInnerAngle.Cos();
spotOuterAngle = (float)light->SpotOuterAngle.Cos();
DAngle negPitch = -light->Angles.Pitch;
double xzLen = negPitch.Cos();
spotDirX = -light->Angles.Yaw.Cos() * xzLen;
spotDirY = -negPitch.Sin();
spotDirZ = -light->Angles.Yaw.Sin() * xzLen;
spotDirX = float(-light->Angles.Yaw.Cos() * xzLen);
spotDirY = float(-negPitch.Sin());
spotDirZ = float(-light->Angles.Yaw.Sin() * xzLen);
}
float *data = &arrays[i][arrays[i].Reserve(16)];
data[0] = pos.X;
data[1] = pos.Z;
data[2] = pos.Y;
data[0] = float(pos.X);
data[1] = float(pos.Z);
data[2] = float(pos.Y);
data[3] = radius;
data[4] = r;
data[5] = g;

View file

@ -25,7 +25,6 @@
**
*/
#include "gl/system/gl_system.h"
#include "a_sharedglobal.h"
#include "r_defs.h"
#include "r_sky.h"

View file

@ -53,7 +53,6 @@
**---------------------------------------------------------------------------
**
*/
#include "gl/system/gl_system.h"
#include "doomtype.h"
#include "g_level.h"
#include "w_wad.h"

View file

@ -25,7 +25,6 @@
**
*/
#include "gl/system/gl_system.h"
#include "c_dispatch.h"
#include "p_local.h"
#include "p_effect.h"
@ -74,15 +73,15 @@ void HWDrawInfo::GetDynSpriteLight(AActor *self, float x, float y, float z, FLig
if (fromgroup == togroup || fromgroup == 0 || togroup == 0) goto direct;
DVector2 offset = level.Displacements.getOffset(fromgroup, togroup);
L = FVector3(x - light->X() - offset.X, y - light->Y() - offset.Y, z - light->Z());
L = FVector3(x - (float)(light->X() + offset.X), y - (float)(light->Y() + offset.Y), z - (float)light->Z());
}
else
{
direct:
L = FVector3(x - light->X(), y - light->Y(), z - light->Z());
L = FVector3(x - (float)light->X(), y - (float)light->Y(), z - (float)light->Z());
}
dist = L.LengthSquared();
dist = (float)L.LengthSquared();
radius = light->GetRadius();
if (dist < radius * radius)
@ -110,7 +109,7 @@ void HWDrawInfo::GetDynSpriteLight(AActor *self, float x, float y, float z, FLig
lb = light->GetBlue() / 255.0f;
if (light->IsSubtractive())
{
float bright = FVector3(lr, lg, lb).Length();
float bright = (float)FVector3(lr, lg, lb).Length();
FVector3 lightColor(lr, lg, lb);
lr = (bright - lr) * -1;
lg = (bright - lg) * -1;
@ -131,11 +130,11 @@ void HWDrawInfo::GetDynSpriteLight(AActor *thing, particle_t *particle, float *o
{
if (thing != NULL)
{
GetDynSpriteLight(thing, thing->X(), thing->Y(), thing->Center(), thing->subsector->lighthead, thing->Sector->PortalGroup, out);
GetDynSpriteLight(thing, (float)thing->X(), (float)thing->Y(), (float)thing->Center(), thing->subsector->lighthead, thing->Sector->PortalGroup, out);
}
else if (particle != NULL)
{
GetDynSpriteLight(NULL, particle->Pos.X, particle->Pos.Y, particle->Pos.Z, particle->subsector->lighthead, particle->subsector->sector->PortalGroup, out);
GetDynSpriteLight(NULL, (float)particle->Pos.X, (float)particle->Pos.Y, (float)particle->Pos.Z, particle->subsector->lighthead, particle->subsector->sector->PortalGroup, out);
}
}
@ -196,10 +195,10 @@ void hw_GetDynModelLight(AActor *self, FDynLightData &modellightdata)
addedLights.Clear();
float x = self->X();
float y = self->Y();
float z = self->Center();
float radiusSquared = self->renderradius * self->renderradius;
float x = (float)self->X();
float y = (float)self->Y();
float z = (float)self->Center();
float radiusSquared = (float)(self->renderradius * self->renderradius);
BSPWalkCircle(x, y, radiusSquared, [&](subsector_t *subsector) // Iterate through all subsectors potentially touched by actor
{
@ -211,7 +210,7 @@ void hw_GetDynModelLight(AActor *self, FDynLightData &modellightdata)
{
int group = subsector->sector->PortalGroup;
DVector3 pos = light->PosRelative(group);
float radius = light->GetRadius() + self->renderradius;
float radius = (float)(light->GetRadius() + self->renderradius);
double dx = pos.X - x;
double dy = pos.Y - y;
double dz = pos.Z - z;

View file

@ -25,7 +25,6 @@
**
*/
#include "gl/system/gl_system.h"
#include "p_local.h"
#include "p_effect.h"
#include "g_level.h"

View file

@ -45,7 +45,7 @@
#include "videomodes.h"
#include "hardware.h"
#include "gl_sysfb.h"
#include "gl/system/gl_system.h"
#include "gl_load/gl_system.h"
#include "r_defs.h"
#include "gl/renderer/gl_renderer.h"

View file

@ -26,7 +26,6 @@
**
**/
#include "gl/system/gl_system.h"
#include "doomtype.h"
#include "p_local.h"
#include "p_spec.h"