summaryrefslogtreecommitdiffstats
path: root/src/render
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-12-18 01:58:09 +0100
committerSergeanur <s.anureev@yandex.ua>2020-12-18 01:58:09 +0100
commitcfda5eb148abdb502b049083c83f166460ccc8be (patch)
tree290b84a8053f37f3b676fd26314631a528f04630 /src/render
parentFix placement of some script functions (diff)
downloadre3-cfda5eb148abdb502b049083c83f166460ccc8be.tar
re3-cfda5eb148abdb502b049083c83f166460ccc8be.tar.gz
re3-cfda5eb148abdb502b049083c83f166460ccc8be.tar.bz2
re3-cfda5eb148abdb502b049083c83f166460ccc8be.tar.lz
re3-cfda5eb148abdb502b049083c83f166460ccc8be.tar.xz
re3-cfda5eb148abdb502b049083c83f166460ccc8be.tar.zst
re3-cfda5eb148abdb502b049083c83f166460ccc8be.zip
Diffstat (limited to '')
-rw-r--r--src/render/Clouds.cpp2
-rw-r--r--src/render/Coronas.cpp6
-rw-r--r--src/render/Fluff.cpp4
-rw-r--r--src/render/Particle.cpp6
-rw-r--r--src/render/PointLights.cpp4
-rw-r--r--src/render/Renderer.cpp4
-rw-r--r--src/render/Shadows.cpp4
7 files changed, 15 insertions, 15 deletions
diff --git a/src/render/Clouds.cpp b/src/render/Clouds.cpp
index 15bae90b..c7554356 100644
--- a/src/render/Clouds.cpp
+++ b/src/render/Clouds.cpp
@@ -129,7 +129,7 @@ CClouds::Render(void)
CSprite::InitSpriteBuffer();
float minute = CClock::GetHours()*60 + CClock::GetMinutes() + CClock::GetSeconds()/60.0f;
- RwV3d campos = *(RwV3d*)&TheCamera.GetPosition();
+ RwV3d campos = TheCamera.GetPosition();
// Moon
float moonfadeout = Abs(minute - 180.0f); // fully visible at 3AM
diff --git a/src/render/Coronas.cpp b/src/render/Coronas.cpp
index c40577d7..9c87e2e0 100644
--- a/src/render/Coronas.cpp
+++ b/src/render/Coronas.cpp
@@ -271,7 +271,7 @@ CCoronas::Render(void)
CVector spriteCoors;
float spritew, spriteh;
- if(!CSprite::CalcScreenCoors(aCoronas[i].coors, spriteCoors, &spritew, &spriteh, true)){
+ if(!CSprite::CalcScreenCoors(aCoronas[i].coors, &spriteCoors, &spritew, &spriteh, true)){
aCoronas[i].offScreen = true;
aCoronas[i].sightClear = false;
}else{
@@ -478,7 +478,7 @@ CCoronas::RenderReflections(void)
CVector spriteCoors;
float spritew, spriteh;
- if(CSprite::CalcScreenCoors(coors, spriteCoors, &spritew, &spriteh, true)){
+ if(CSprite::CalcScreenCoors(coors, &spriteCoors, &spritew, &spriteh, true)) {
float drawDist = 0.75f * aCoronas[i].drawDist;
drawDist = Min(drawDist, 55.0f);
if(spriteCoors.z < drawDist){
@@ -669,7 +669,7 @@ CCoronas::DoSunAndMoon(void)
CVector spriteCoors;
float spritew, spriteh;
- if(CSprite::CalcScreenCoors(sunCoors, spriteCoors, &spritew, &spriteh, true)){
+ if(CSprite::CalcScreenCoors(sunCoors, &spriteCoors, &spritew, &spriteh, true)) {
SunScreenX = spriteCoors.x;
SunScreenY = spriteCoors.y;
}else{
diff --git a/src/render/Fluff.cpp b/src/render/Fluff.cpp
index e220ce5a..ac6fa7df 100644
--- a/src/render/Fluff.cpp
+++ b/src/render/Fluff.cpp
@@ -756,7 +756,7 @@ void CScrollBar::Render()
// Render main coronas
if (m_MessageBar[i] & (1 << j))
{
- if (CSprite::CalcScreenCoors(coronaCoord, screenCoord, &screenW, &screenH, true))
+ if (CSprite::CalcScreenCoors(coronaCoord, &screenCoord, &screenW, &screenH, true))
{
CSprite::RenderBufferedOneXLUSprite(
screenCoord.x, screenCoord.y, screenCoord.z,
@@ -768,7 +768,7 @@ void CScrollBar::Render()
// Render smaller and faded coronas for a trailing effect
else if (m_MessageBar[i - 1] & (1 << j))
{
- if (CSprite::CalcScreenCoors(coronaCoord, screenCoord, &screenW, &screenH, true))
+ if (CSprite::CalcScreenCoors(coronaCoord, &screenCoord, &screenW, &screenH, true))
{
CSprite::RenderBufferedOneXLUSprite(
screenCoord.x, screenCoord.y, screenCoord.z,
diff --git a/src/render/Particle.cpp b/src/render/Particle.cpp
index 6a42bc4d..5ea4f610 100644
--- a/src/render/Particle.cpp
+++ b/src/render/Particle.cpp
@@ -941,7 +941,7 @@ CParticle *CParticle::AddParticle(tParticleType type, CVector const &vecPos, CVe
CVector screen;
float w, h;
- if ( !CSprite::CalcScreenCoors(vecPos, screen, &w, &h, true) )
+ if ( !CSprite::CalcScreenCoors(vecPos, &screen, &w, &h, true) )
return nil;
pParticle->m_vecPosition = screen;
@@ -2034,7 +2034,7 @@ void CParticle::Render()
float w;
float h;
- if ( CSprite::CalcScreenCoors(particle->m_vecPosition, coors, &w, &h, true) )
+ if ( CSprite::CalcScreenCoors(particle->m_vecPosition, &coors, &w, &h, true) )
{
if ( i == PARTICLE_ENGINE_STEAM
@@ -2189,7 +2189,7 @@ void CParticle::Render()
float fTrailLength;
CVector vecScreenPosition;
- if ( CSprite::CalcScreenCoors(vecPrevPos, vecScreenPosition, &fTrailLength, &fRotation, true) )
+ if ( CSprite::CalcScreenCoors(vecPrevPos, &vecScreenPosition, &fTrailLength, &fRotation, true) )
{
CVector2D vecDist
(
diff --git a/src/render/PointLights.cpp b/src/render/PointLights.cpp
index b09b07bd..c8f21d21 100644
--- a/src/render/PointLights.cpp
+++ b/src/render/PointLights.cpp
@@ -239,7 +239,7 @@ CPointLights::RenderFogEffect(void)
// more intensity the closer to line
intensity *= 1.0f - sq(Sqrt(linedistsq) / FOG_AREA_WIDTH);
- if(CSprite::CalcScreenCoors(fogcoors, spriteCoors, &spritew, &spriteh, true)){
+ if(CSprite::CalcScreenCoors(fogcoors, &spriteCoors, &spritew, &spriteh, true)) {
float rotation = (CTimer::GetTimeInMilliseconds()&0x1FFF) * 2*3.14f / 0x2000;
float size = FogSizes[r>>1];
CSprite::RenderBufferedOneXLUSprite_Rotate_Aspect(spriteCoors.x, spriteCoors.y, spriteCoors.z,
@@ -287,7 +287,7 @@ CPointLights::RenderFogEffect(void)
intensity *= 1.0f - sq(lightdist / FOG_AREA_RADIUS);
CVector fogcoors(xi, yi, groundZ + 1.6f);
- if(CSprite::CalcScreenCoors(fogcoors, spriteCoors, &spritew, &spriteh, true)){
+ if(CSprite::CalcScreenCoors(fogcoors, &spriteCoors, &spritew, &spriteh, true)) {
float rotation = (CTimer::GetTimeInMilliseconds()&0x3FFF) * 2*3.14f / 0x4000;
float size = FogSizes[r>>1];
CSprite::RenderBufferedOneXLUSprite_Rotate_Aspect(spriteCoors.x, spriteCoors.y, spriteCoors.z,
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index b9be21fe..4771eb79 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -1302,7 +1302,7 @@ CRenderer::ScanWorld(void)
vectors[CORNER_PRIO_RIGHT].x = vectors[CORNER_LOD_RIGHT].x * 0.2f;
vectors[CORNER_PRIO_RIGHT].y = vectors[CORNER_LOD_RIGHT].y * 0.2f;
vectors[CORNER_PRIO_RIGHT].z = vectors[CORNER_LOD_RIGHT].z;
- RwV3dTransformPoints((RwV3d*)vectors, (RwV3d*)vectors, 9, cammatrix);
+ RwV3dTransformPoints(vectors, vectors, 9, cammatrix);
m_loadingPriority = false;
if(TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN ||
@@ -1422,7 +1422,7 @@ CRenderer::RequestObjectsInFrustum(void)
vectors[CORNER_PRIO_RIGHT].x = vectors[CORNER_LOD_RIGHT].x * 0.2f;
vectors[CORNER_PRIO_RIGHT].y = vectors[CORNER_LOD_RIGHT].y * 0.2f;
vectors[CORNER_PRIO_RIGHT].z = vectors[CORNER_LOD_RIGHT].z;
- RwV3dTransformPoints((RwV3d*)vectors, (RwV3d*)vectors, 9, cammatrix);
+ RwV3dTransformPoints(vectors, vectors, 9, cammatrix);
if(TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN ||
#ifdef FIX_BUGS
diff --git a/src/render/Shadows.cpp b/src/render/Shadows.cpp
index a964ceb6..e8be23bd 100644
--- a/src/render/Shadows.cpp
+++ b/src/render/Shadows.cpp
@@ -2229,7 +2229,7 @@ CShadows::CastShadowEntityXYZ(CEntity *pEntity, CVector *pPosn,
sphere.Set(2.0f, center);
RwV3d point;
- RwV3dTransformPoints(&point, center, 1, &invMatrix);
+ RwV3dTransformPoints(&point, &center, 1, &invMatrix);
CColSphere colSphere;
colSphere.Set(2.0f, CVector(point), 0, 0);
@@ -2252,7 +2252,7 @@ CShadows::CastShadowEntityXYZ(CEntity *pEntity, CVector *pPosn,
p[1] += offset;
p[2] += offset;
- if ( !ShadowRenderTriangleCB((RwV3d *)p, n, &proj) )
+ if ( !ShadowRenderTriangleCB(p, &n, &proj) )
break;
}
i++;