2019-05-30 15:24:47 -04:00
|
|
|
#pragma once
|
|
|
|
|
2019-06-01 13:18:19 -04:00
|
|
|
class CRegisteredPointLight
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CVector coors;
|
|
|
|
CVector dir;
|
|
|
|
float radius;
|
|
|
|
float red;
|
|
|
|
float green;
|
|
|
|
float blue;
|
|
|
|
int8 type;
|
|
|
|
int8 fogType;
|
|
|
|
bool castExtraShadows;
|
|
|
|
};
|
2020-05-10 11:49:33 -04:00
|
|
|
VALIDATE_SIZE(CRegisteredPointLight, 0x2C);
|
2019-06-01 13:18:19 -04:00
|
|
|
|
2019-05-30 15:24:47 -04:00
|
|
|
class CPointLights
|
|
|
|
{
|
2019-07-24 12:55:43 -04:00
|
|
|
public:
|
2020-04-17 01:54:14 -04:00
|
|
|
static int16 NumLights;
|
|
|
|
static CRegisteredPointLight aLights[NUMPOINTLIGHTS];
|
2019-07-24 12:55:43 -04:00
|
|
|
|
2019-06-01 13:18:19 -04:00
|
|
|
enum {
|
|
|
|
LIGHT_POINT,
|
|
|
|
LIGHT_DIRECTIONAL,
|
|
|
|
LIGHT_DARKEN, // no effects at all
|
|
|
|
// these have only fog, otherwise no difference?
|
2019-06-30 15:06:55 -04:00
|
|
|
// only used by CEntity::ProcessLightsForEntity it seems
|
|
|
|
// and there used together with fog type
|
|
|
|
LIGHT_FOGONLY_ALWAYS,
|
|
|
|
LIGHT_FOGONLY,
|
2019-06-01 13:18:19 -04:00
|
|
|
};
|
|
|
|
enum {
|
|
|
|
FOG_NONE,
|
|
|
|
FOG_NORMAL, // taken from Foggyness
|
|
|
|
FOG_ALWAYS
|
|
|
|
};
|
|
|
|
|
2019-05-31 05:44:43 -04:00
|
|
|
static void InitPerFrame(void);
|
2019-06-01 13:18:19 -04:00
|
|
|
static void AddLight(uint8 type, CVector coors, CVector dir, float radius, float red, float green, float blue, uint8 fogType, bool castExtraShadows);
|
2020-04-30 06:48:01 -04:00
|
|
|
static float GenerateLightsAffectingObject(Const CVector *objCoors);
|
2019-06-01 13:18:19 -04:00
|
|
|
static void RemoveLightsAffectingObject(void);
|
2019-05-30 15:24:47 -04:00
|
|
|
static void RenderFogEffect(void);
|
|
|
|
};
|