diff options
author | aap <aap@papnet.eu> | 2020-05-19 20:56:42 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-05-19 20:56:42 +0200 |
commit | bdbe5d1080066073f063d653e80df6dbf4b326a2 (patch) | |
tree | bc4f8fd0f648bc38789591efe73d661ed2981998 /src/render | |
parent | Merge pull request #564 from Xinerki/miami (diff) | |
download | re3-bdbe5d1080066073f063d653e80df6dbf4b326a2.tar re3-bdbe5d1080066073f063d653e80df6dbf4b326a2.tar.gz re3-bdbe5d1080066073f063d653e80df6dbf4b326a2.tar.bz2 re3-bdbe5d1080066073f063d653e80df6dbf4b326a2.tar.lz re3-bdbe5d1080066073f063d653e80df6dbf4b326a2.tar.xz re3-bdbe5d1080066073f063d653e80df6dbf4b326a2.tar.zst re3-bdbe5d1080066073f063d653e80df6dbf4b326a2.zip |
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/2dEffect.h | 5 | ||||
-rw-r--r-- | src/render/Clouds.cpp | 2 | ||||
-rw-r--r-- | src/render/Coronas.cpp | 11 | ||||
-rw-r--r-- | src/render/Coronas.h | 6 | ||||
-rw-r--r-- | src/render/Renderer.cpp | 12 | ||||
-rw-r--r-- | src/render/WindModifiers.cpp | 8 | ||||
-rw-r--r-- | src/render/WindModifiers.h | 7 |
7 files changed, 37 insertions, 14 deletions
diff --git a/src/render/2dEffect.h b/src/render/2dEffect.h index ed5ce5ba..504824c5 100644 --- a/src/render/2dEffect.h +++ b/src/render/2dEffect.h @@ -4,7 +4,8 @@ enum { EFFECT_LIGHT, EFFECT_PARTICLE, EFFECT_ATTRACTOR, - EFFECT_PED_ATTRACTOR + EFFECT_PED_ATTRACTOR, + EFFECT_SUNGLARE }; enum { @@ -35,6 +36,8 @@ enum { // same order as CPointLights flags, must start at 2 LIGHTFLAG_FOG_NORMAL = 2, // can have light and fog LIGHTFLAG_FOG_ALWAYS = 4, // fog only + LIGHTFLAG_HIDE_OBJECT = 8, // hide the object instead of rendering light (???) + LIGHTFLAG_LONG_DIST = 16, LIGHTFLAG_FOG = (LIGHTFLAG_FOG_NORMAL|LIGHTFLAG_FOG_ALWAYS) }; diff --git a/src/render/Clouds.cpp b/src/render/Clouds.cpp index 05210c77..c6ba0f10 100644 --- a/src/render/Clouds.cpp +++ b/src/render/Clouds.cpp @@ -62,8 +62,6 @@ void CClouds::Update(void) { float s = Sin(TheCamera.Orientation - 0.85f); - CloudRotation += CWeather::Wind*s*0.001f; - IndividualRotation += (CWeather::Wind*CTimer::GetTimeStep()*0.5f + 0.3f) * 60.0f; #ifdef FIX_BUGS CloudRotation += CWeather::Wind*s*0.001f*CTimer::GetTimeStepFix(); IndividualRotation += (CWeather::Wind*CTimer::GetTimeStep()*0.5f + 0.3f*CTimer::GetTimeStepFix()) * 60.0f; diff --git a/src/render/Coronas.cpp b/src/render/Coronas.cpp index e36bdf3d..8e832ab1 100644 --- a/src/render/Coronas.cpp +++ b/src/render/Coronas.cpp @@ -129,7 +129,8 @@ CCoronas::Update(void) void CCoronas::RegisterCorona(uint32 id, uint8 red, uint8 green, uint8 blue, uint8 alpha, const CVector &coors, float size, float drawDist, RwTexture *tex, - int8 flareType, uint8 reflection, uint8 LOScheck, uint8 drawStreak, float someAngle) + int8 flareType, uint8 reflection, uint8 LOScheck, uint8 drawStreak, float someAngle, + bool longDist, float nearDist) { int i; @@ -192,11 +193,13 @@ CCoronas::RegisterCorona(uint32 id, uint8 red, uint8 green, uint8 blue, uint8 al void CCoronas::RegisterCorona(uint32 id, uint8 red, uint8 green, uint8 blue, uint8 alpha, - const CVector &coors, float size, float drawDist, uint8 type, - int8 flareType, uint8 reflection, uint8 LOScheck, uint8 drawStreak, float someAngle) + const CVector &coors, float size, float drawDist, uint8 type, + int8 flareType, uint8 reflection, uint8 LOScheck, uint8 drawStreak, float someAngle, + bool longDist, float nearDist) { RegisterCorona(id, red, green, blue, alpha, coors, size, drawDist, - gpCoronaTexture[type], flareType, reflection, LOScheck, drawStreak, someAngle); + gpCoronaTexture[type], flareType, reflection, LOScheck, drawStreak, someAngle, + longDist, nearDist); } void diff --git a/src/render/Coronas.h b/src/render/Coronas.h index 70e9ccd5..cb4e8583 100644 --- a/src/render/Coronas.h +++ b/src/render/Coronas.h @@ -90,10 +90,12 @@ public: static void Update(void); static void RegisterCorona(uint32 id, uint8 red, uint8 green, uint8 blue, uint8 alpha, const CVector &coors, float size, float drawDist, RwTexture *tex, - int8 flareType, uint8 reflection, uint8 LOScheck, uint8 drawStreak, float someAngle); + int8 flareType, uint8 reflection, uint8 LOScheck, uint8 drawStreak, float someAngle, + bool longDist = false, float nearClip = 1.5f); static void RegisterCorona(uint32 id, uint8 red, uint8 green, uint8 blue, uint8 alpha, const CVector &coors, float size, float drawDist, uint8 type, - int8 flareType, uint8 reflection, uint8 LOScheck, uint8 drawStreak, float someAngle); + int8 flareType, uint8 reflection, uint8 LOScheck, uint8 drawStreak, float someAngle, + bool longDist = false, float nearClip = 1.5f); static void UpdateCoronaCoors(uint32 id, const CVector &coors, float drawDist, float someAngle); static void Render(void); static void RenderReflections(void); diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 803f4cc1..f149c6fb 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -1245,9 +1245,11 @@ CRenderer::ShouldModelBeStreamed(CEntity *ent, const CVector &campos) void CRenderer::RemoveVehiclePedLights(CEntity *ent, bool reset) { - if(ent->bRenderScorched) - return; - CPointLights::RemoveLightsAffectingObject(); - if(reset) - ReSetAmbientAndDirectionalColours(); + if(!ent->bRenderScorched){ + CPointLights::RemoveLightsAffectingObject(); + if(reset) + ReSetAmbientAndDirectionalColours(); + } + SetAmbientColours(); + DeActivateDirectional(); } diff --git a/src/render/WindModifiers.cpp b/src/render/WindModifiers.cpp new file mode 100644 index 00000000..d7405c7a --- /dev/null +++ b/src/render/WindModifiers.cpp @@ -0,0 +1,8 @@ +#include "common.h" +#include "WindModifiers.h" + +int32 +CWindModifiers::FindWindModifier(CVector pos, float *x, float *y) +{ + return 0; +} diff --git a/src/render/WindModifiers.h b/src/render/WindModifiers.h new file mode 100644 index 00000000..b4024343 --- /dev/null +++ b/src/render/WindModifiers.h @@ -0,0 +1,7 @@ +#pragma once + +class CWindModifiers +{ +public: + static int32 FindWindModifier(CVector pos, float *x, float *y); +}; |