summaryrefslogtreecommitdiff
path: root/src/render/PointLights.h
diff options
context:
space:
mode:
authorclaude-bot <[email protected]>2026-07-13 12:27:07 +0000
committerclaude-bot <[email protected]>2026-07-13 12:27:07 +0000
commit9f61c9e6ac6b1ac5692cf6352d2ebbd47a31a686 (patch)
treea84756b82513739a2672db3a1f0ec579db6d18ff /src/render/PointLights.h
downloadre3-miami.tar.gz
re3-miami.zip
Import Cai1Hsu/re3 @ miami (reVC / GTA:VC decompilation)HEADmiami
Snapshot import (no upstream history) into git.ancap.in.ua/claude, per @lzcnt. Source: https://github.com/Cai1Hsu/re3 branch miami.
Diffstat (limited to 'src/render/PointLights.h')
-rw-r--r--src/render/PointLights.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/render/PointLights.h b/src/render/PointLights.h
new file mode 100644
index 0000000..827200b
--- /dev/null
+++ b/src/render/PointLights.h
@@ -0,0 +1,50 @@
+#pragma once
+
+class CRegisteredPointLight
+{
+public:
+ CVector coors;
+ CVector dir;
+ float radius;
+ float red;
+ float green;
+ float blue;
+ int8 type;
+ int8 fogType;
+ bool castExtraShadows;
+};
+VALIDATE_SIZE(CRegisteredPointLight, 0x2C);
+
+class CPointLights
+{
+public:
+ static int16 NumLights;
+ static CRegisteredPointLight aLights[NUMPOINTLIGHTS];
+ static CVector aCachedMapReads[32];
+ static float aCachedMapReadResults[32];
+ static int32 NextCachedValue;
+
+ enum {
+ LIGHT_POINT,
+ LIGHT_DIRECTIONAL,
+ LIGHT_DARKEN, // no effects at all
+ // these have only fog, otherwise no difference?
+ // only used by CEntity::ProcessLightsForEntity it seems
+ // and there used together with fog type
+ LIGHT_FOGONLY_ALWAYS,
+ LIGHT_FOGONLY,
+ };
+ enum {
+ FOG_NONE,
+ FOG_NORMAL, // taken from Foggyness
+ FOG_ALWAYS
+ };
+
+ static void Init(void);
+ 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(Const CVector *objCoors);
+ static void RemoveLightsAffectingObject(void);
+ static void RenderFogEffect(void);
+ static bool ProcessVerticalLineUsingCache(CVector coors, float *groundZ);
+};