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