mirror of
https://github.com/ZDoom/ZDRay.git
synced 2025-01-24 08:41:06 +00:00
- class Init functions are so 1995
This commit is contained in:
parent
cf61394714
commit
ed983935ec
3 changed files with 8 additions and 15 deletions
|
@ -274,8 +274,7 @@ void FLevel::CreateLights()
|
|||
desc.rgb.y = ((lightcolor >> 8) & 0xff) / 255.0f;
|
||||
desc.rgb.z = (lightcolor & 0xff) / 255.0f;
|
||||
|
||||
auto lightSurface = std::make_unique<kexLightSurface>();
|
||||
lightSurface->Init(desc, surface, true);
|
||||
auto lightSurface = std::make_unique<kexLightSurface>(desc, surface, true);
|
||||
lightSurface->Subdivide(16);
|
||||
//lightSurface->CreateCenterOrigin();
|
||||
lightSurfaces.push_back(std::move(lightSurface));
|
||||
|
@ -338,8 +337,7 @@ void FLevel::CreateLights()
|
|||
desc.rgb.y = ((lightcolor >> 8) & 0xff) / 255.0f;
|
||||
desc.rgb.z = (lightcolor & 0xff) / 255.0f;
|
||||
|
||||
auto lightSurface = std::make_unique<kexLightSurface>();
|
||||
lightSurface->Init(desc, surface, false);
|
||||
auto lightSurface = std::make_unique<kexLightSurface>(desc, surface, false);
|
||||
lightSurface->Subdivide(16);
|
||||
lightSurfaces.push_back(std::move(lightSurface));
|
||||
numSurfLights++;
|
||||
|
|
|
@ -36,15 +36,7 @@
|
|||
#include "level/level.h"
|
||||
#include "lightsurface.h"
|
||||
|
||||
kexLightSurface::kexLightSurface()
|
||||
{
|
||||
}
|
||||
|
||||
kexLightSurface::~kexLightSurface()
|
||||
{
|
||||
}
|
||||
|
||||
void kexLightSurface::Init(const surfaceLightDef &lightSurfaceDef, surface_t *surface, const bool bWall)
|
||||
kexLightSurface::kexLightSurface(const surfaceLightDef &lightSurfaceDef, surface_t *surface, const bool bWall)
|
||||
{
|
||||
this->intensity = lightSurfaceDef.intensity;
|
||||
this->distance = lightSurfaceDef.distance;
|
||||
|
@ -53,6 +45,10 @@ void kexLightSurface::Init(const surfaceLightDef &lightSurfaceDef, surface_t *su
|
|||
this->bWall = bWall;
|
||||
}
|
||||
|
||||
kexLightSurface::~kexLightSurface()
|
||||
{
|
||||
}
|
||||
|
||||
// Creates a single origin point if we're not intending on subdividing this light surface
|
||||
void kexLightSurface::CreateCenterOrigin()
|
||||
{
|
||||
|
|
|
@ -35,10 +35,9 @@ struct surfaceLightDef;
|
|||
class kexLightSurface
|
||||
{
|
||||
public:
|
||||
kexLightSurface();
|
||||
kexLightSurface(const surfaceLightDef &lightSurfaceDef, surface_t *surface, const bool bWall);
|
||||
~kexLightSurface();
|
||||
|
||||
void Init(const surfaceLightDef &lightSurfaceDef, surface_t *surface, const bool bWall);
|
||||
void Subdivide(const float divide);
|
||||
void CreateCenterOrigin();
|
||||
float TraceSurface(FLevel *doomMap, const surface_t *surface, const kexVec3 &origin);
|
||||
|
|
Loading…
Reference in a new issue