summaryrefslogtreecommitdiffstats
path: root/src/render/Shadows.cpp
diff options
context:
space:
mode:
authorFire_Head <Fire-Head@users.noreply.github.com>2020-05-26 21:16:56 +0200
committerGitHub <noreply@github.com>2020-05-26 21:16:56 +0200
commitae8a377f26f9b56b5156b0462c30c5c49af7dd8a (patch)
treef15b8d6bb195ad71ffd9e7051c26a5b42e2f71a7 /src/render/Shadows.cpp
parentMerge pull request #550 from erorcun/miami (diff)
parentfix UB shit (diff)
downloadre3-ae8a377f26f9b56b5156b0462c30c5c49af7dd8a.tar
re3-ae8a377f26f9b56b5156b0462c30c5c49af7dd8a.tar.gz
re3-ae8a377f26f9b56b5156b0462c30c5c49af7dd8a.tar.bz2
re3-ae8a377f26f9b56b5156b0462c30c5c49af7dd8a.tar.lz
re3-ae8a377f26f9b56b5156b0462c30c5c49af7dd8a.tar.xz
re3-ae8a377f26f9b56b5156b0462c30c5c49af7dd8a.tar.zst
re3-ae8a377f26f9b56b5156b0462c30c5c49af7dd8a.zip
Diffstat (limited to 'src/render/Shadows.cpp')
-rw-r--r--src/render/Shadows.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/render/Shadows.cpp b/src/render/Shadows.cpp
index 69f9dce0..fac35aeb 100644
--- a/src/render/Shadows.cpp
+++ b/src/render/Shadows.cpp
@@ -18,6 +18,7 @@
#endif
#include "PointLights.h"
#include "SpecialFX.h"
+#include "Script.h"
#include "Shadows.h"
#ifdef DEBUGMENU
@@ -642,12 +643,12 @@ CShadows::StoreShadowForPole(CEntity *pPole, float fOffsetX, float fOffsetY, flo
PolePos.y += fOffsetX * pPole->GetRight().y + fOffsetY * pPole->GetForward().y;
PolePos.z += fOffsetZ;
- PolePos.x += -CTimeCycle::GetSunPosition().x * (fPoleHeight / 2);
- PolePos.y += -CTimeCycle::GetSunPosition().y * (fPoleHeight / 2);
+ PolePos.x += -CTimeCycle::GetSunDirection().x * (fPoleHeight / 2);
+ PolePos.y += -CTimeCycle::GetSunDirection().y * (fPoleHeight / 2);
StoreStaticShadow((uintptr)pPole + nID + _TODOCONST(51), SHADOWTYPE_DARK, gpPostShadowTex, &PolePos,
- -CTimeCycle::GetSunPosition().x * (fPoleHeight / 2),
- -CTimeCycle::GetSunPosition().y * (fPoleHeight / 2),
+ -CTimeCycle::GetSunDirection().x * (fPoleHeight / 2),
+ -CTimeCycle::GetSunDirection().y * (fPoleHeight / 2),
CTimeCycle::GetShadowSideX() * fPoleWidth,
CTimeCycle::GetShadowSideY() * fPoleWidth,
2 * (int32)((pPole->GetUp().z - 0.5f) * CTimeCycle::GetShadowStrength() * 2.0f) / 3,
@@ -1766,6 +1767,6 @@ CShadows::RenderIndicatorShadow(uint32 nID, uint8 ShadowType, RwTexture *pTextur
ASSERT(pPosn != NULL);
C3dMarkers::PlaceMarkerSet(nID, _TODOCONST(4), *pPosn, Max(fFrontX, -fSideY),
- 0, 128, 255, 128,
- 2048, 0.2f, 0);
+ SPHERE_MARKER_R, SPHERE_MARKER_G, SPHERE_MARKER_B,
+ SPHERE_MARKER_A, SPHERE_MARKER_PULSE_PERIOD, 0.2f, 0);
}