summaryrefslogtreecommitdiffstats
path: root/src/render/PointLights.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-06-01 19:18:19 +0200
committeraap <aap@papnet.eu>2019-06-01 19:18:19 +0200
commitc40c7acb96a926378df7d7b43920966ab31ff95e (patch)
treea524403990b5c17a1c0b97275c773a26a8c98fb2 /src/render/PointLights.h
parentmore RW lights (diff)
downloadre3-c40c7acb96a926378df7d7b43920966ab31ff95e.tar
re3-c40c7acb96a926378df7d7b43920966ab31ff95e.tar.gz
re3-c40c7acb96a926378df7d7b43920966ab31ff95e.tar.bz2
re3-c40c7acb96a926378df7d7b43920966ab31ff95e.tar.lz
re3-c40c7acb96a926378df7d7b43920966ab31ff95e.tar.xz
re3-c40c7acb96a926378df7d7b43920966ab31ff95e.tar.zst
re3-c40c7acb96a926378df7d7b43920966ab31ff95e.zip
Diffstat (limited to 'src/render/PointLights.h')
-rw-r--r--src/render/PointLights.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/render/PointLights.h b/src/render/PointLights.h
index e72e8ede..288571d0 100644
--- a/src/render/PointLights.h
+++ b/src/render/PointLights.h
@@ -1,9 +1,43 @@
#pragma once
+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
{
+ // Probably have to make this public for shadows later
static int16 &NumLights;
+ static CRegisteredPointLight *aLights; //[NUMPOINTLIGHTS]
public:
+ enum {
+ LIGHT_POINT,
+ LIGHT_DIRECTIONAL,
+ LIGHT_DARKEN, // no effects at all
+ // these have only fog, otherwise no difference?
+ LIGHT_FOGONLY_3,
+ LIGHT_FOGONLY_4,
+ };
+ enum {
+ FOG_NONE,
+ FOG_NORMAL, // taken from Foggyness
+ FOG_ALWAYS
+ };
+
static void InitPerFrame(void);
+ 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);
};