1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-11-04 21:55:55 +00:00
re3/src/render/PointLights.h

46 lines
1.1 KiB
C
Raw Normal View History

#pragma once
2019-06-01 17:18:19 +00:00
class CRegisteredPointLight
{
public:
CVector coors;
CVector dir;
float radius;
float red;
float green;
float blue;
int8 type;
int8 fogType;
bool castExtraShadows;
};
static_assert(sizeof(CRegisteredPointLight) == 0x2C, "CRegisteredPointLight: error");
class CPointLights
{
2019-07-24 16:55:43 +00:00
public:
2019-05-31 09:44:43 +00:00
static int16 &NumLights;
2019-06-01 17:18:19 +00:00
static CRegisteredPointLight *aLights; //[NUMPOINTLIGHTS]
2019-07-24 16:55:43 +00:00
2019-06-01 17:18:19 +00:00
enum {
LIGHT_POINT,
LIGHT_DIRECTIONAL,
LIGHT_DARKEN, // no effects at all
// these have only fog, otherwise no difference?
2019-06-30 19:06:55 +00:00
// only used by CEntity::ProcessLightsForEntity it seems
// and there used together with fog type
LIGHT_FOGONLY_ALWAYS,
LIGHT_FOGONLY,
2019-06-01 17:18:19 +00:00
};
enum {
FOG_NONE,
FOG_NORMAL, // taken from Foggyness
FOG_ALWAYS
};
2019-05-31 09:44:43 +00:00
static void InitPerFrame(void);
2019-06-01 17:18:19 +00:00
static void AddLight(uint8 type, CVector coors, CVector dir, float radius, float red, float green, float blue, uint8 fogType, bool castExtraShadows);
static float GenerateLightsAffectingObject(CVector *objCoors);
static void RemoveLightsAffectingObject(void);
static void RenderFogEffect(void);
};