- cleaned up includes for gl_decal.cpp

This commit is contained in:
Christoph Oelckers 2018-04-27 20:28:59 +02:00
parent 383ff0d8b8
commit 678ac40b72
3 changed files with 17 additions and 20 deletions

View File

@ -1,7 +1,7 @@
//
//---------------------------------------------------------------------------
//
// Copyright(C) 2003-2016 Christoph Oelckers
// Copyright(C) 2003-2018 Christoph Oelckers
// All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
@ -21,24 +21,20 @@
//
/*
** gl_decal.cpp
** OpenGL decal rendering code
** OpenGL decal processing code
**
*/
#include "doomdata.h"
#include "gl/system/gl_system.h"
#include "a_sharedglobal.h"
#include "r_utility.h"
#include "g_levellocals.h"
#include "hwrenderer/textures/hw_material.h"
#include "hwrenderer/utility/hw_cvars.h"
#include "gl/data/gl_vertexbuffer.h"
#include "gl/renderer/gl_renderer.h"
#include "gl/renderer/gl_lightdata.h"
#include "gl/renderer/gl_renderstate.h"
#include "gl/scene/gl_drawinfo.h"
#include "gl/scene/gl_scenedrawer.h"
#include "gl/renderer/gl_quaddrawer.h"
#include "hwrenderer/scene/hw_drawstructs.h"
#include "hwrenderer/scene/hw_drawinfo.h"
#include "hwrenderer/utility/hw_lighting.h"
#include "hwrenderer/data/flatvertices.h"
void GLWall::ProcessDecal(HWDrawInfo *di, DBaseDecal *decal)
{
@ -257,7 +253,7 @@ void GLWall::ProcessDecal(HWDrawInfo *di, DBaseDecal *decal)
gldecal.zcenter = zpos - decalheight * 0.5f;
auto verts = gl_drawinfo->AllocVertices(4);
auto verts = di->AllocVertices(4);
gldecal.vertindex = verts.second;
for (i = 0; i < 4; i++)

View File

@ -9,14 +9,6 @@
#include "r_utility.h"
#include "c_cvars.h"
EXTERN_CVAR(Int, gl_weaponlight);
inline int getExtraLight()
{
return r_viewpoint.extralight * gl_weaponlight;
}
class GLSceneDrawer
{
fixed_t viewx, viewy; // since the nodes are still fixed point, keeping the view position also fixed point for node traversal is faster.

View File

@ -1,7 +1,9 @@
#pragma once
#include "c_cvars.h"
#include "v_palette.h"
#include "templates.h"
#include "r_utility.h"
struct Colormap;
@ -15,3 +17,10 @@ inline int hw_ClampLight(int lightlevel)
return clamp(lightlevel, 0, 255);
}
EXTERN_CVAR(Int, gl_weaponlight);
inline int getExtraLight()
{
return r_viewpoint.extralight * gl_weaponlight;
}