diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-12-18 01:57:54 +0100 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-12-18 01:57:54 +0100 |
commit | e9a567034818c5e3338120958061e4a4278d97da (patch) | |
tree | 20293ced9c835a859071400fdbb3338b90159846 /src/render | |
parent | PreAllocateRwObjects (diff) | |
download | re3-e9a567034818c5e3338120958061e4a4278d97da.tar re3-e9a567034818c5e3338120958061e4a4278d97da.tar.gz re3-e9a567034818c5e3338120958061e4a4278d97da.tar.bz2 re3-e9a567034818c5e3338120958061e4a4278d97da.tar.lz re3-e9a567034818c5e3338120958061e4a4278d97da.tar.xz re3-e9a567034818c5e3338120958061e4a4278d97da.tar.zst re3-e9a567034818c5e3338120958061e4a4278d97da.zip |
Diffstat (limited to '')
-rw-r--r-- | src/render/Clouds.cpp | 2 | ||||
-rw-r--r-- | src/render/Coronas.cpp | 6 | ||||
-rw-r--r-- | src/render/Fluff.cpp | 10 | ||||
-rw-r--r-- | src/render/Particle.cpp | 4 | ||||
-rw-r--r-- | src/render/PointLights.cpp | 4 | ||||
-rw-r--r-- | src/render/Renderer.cpp | 4 | ||||
-rw-r--r-- | src/render/Weather.cpp | 2 |
7 files changed, 16 insertions, 16 deletions
diff --git a/src/render/Clouds.cpp b/src/render/Clouds.cpp index 161418b9..b5af6619 100644 --- a/src/render/Clouds.cpp +++ b/src/render/Clouds.cpp @@ -133,7 +133,7 @@ CClouds::Render(void) CSprite::InitSpriteBuffer(); int minute = CClock::GetHours()*60 + CClock::GetMinutes(); - RwV3d campos = *(RwV3d*)&TheCamera.GetPosition(); + RwV3d campos = TheCamera.GetPosition(); // Moon int moonfadeout = Abs(minute - 180); // fully visible at 3AM diff --git a/src/render/Coronas.cpp b/src/render/Coronas.cpp index 33c3f4bf..48f0f6b9 100644 --- a/src/render/Coronas.cpp +++ b/src/render/Coronas.cpp @@ -255,7 +255,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{ @@ -464,7 +464,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){ @@ -531,7 +531,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 690a1d3f..c76d6109 100644 --- a/src/render/Fluff.cpp +++ b/src/render/Fluff.cpp @@ -655,7 +655,7 @@ void CScrollBar::Render() RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)TRUE); CVector coronaCoord, screenCoord; - float screenW, screenH; + float screenW, screenH; for (int i = 1; i < ARRAY_SIZE(m_MessageBar); ++i) { for (int j = 0; j < 5; ++j) @@ -667,7 +667,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, @@ -679,7 +679,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, @@ -834,7 +834,7 @@ void CDigitalClock::Render() const char* clockMessage = FindDigitalClockMessage(); CVector coronaCoord, screenCoord; - float screenW, screenH; + float screenW, screenH; for (int c = 0; c < 5; ++c) // for each char to be displayed { for (int i = 0; i < 5; ++i) // for each column of coronas @@ -847,7 +847,7 @@ void CDigitalClock::Render() coronaCoord.y = m_Position.y + (8 * c + i) * m_Size.y * m_fScale / 8.0f; coronaCoord.z = m_Position.z + j * m_fScale / 8.0f; - 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 2b19486e..f175c264 100644 --- a/src/render/Particle.cpp +++ b/src/render/Particle.cpp @@ -1570,7 +1570,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) ) { #ifdef PC_PARTICLE if ( (!particleBanned || SCREEN_WIDTH * fParticleScaleLimit >= w) @@ -1650,7 +1650,7 @@ void CParticle::Render() float fRotation; float fTrailLength; - if ( CSprite::CalcScreenCoors(vecPrevPos, particle->m_vecScreenPosition, &fTrailLength, &fRotation, true) ) + if ( CSprite::CalcScreenCoors(vecPrevPos, &particle->m_vecScreenPosition, &fTrailLength, &fRotation, true) ) { CVector2D vecDist ( diff --git a/src/render/PointLights.cpp b/src/render/PointLights.cpp index 0713dc6d..6f0b4d46 100644 --- a/src/render/PointLights.cpp +++ b/src/render/PointLights.cpp @@ -218,7 +218,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::RenderOneXLUSprite_Rotate_Aspect(spriteCoors.x, spriteCoors.y, spriteCoors.z, @@ -267,7 +267,7 @@ CPointLights::RenderFogEffect(void) intensity *= 1.0f - sq(lightdist / FOG_AREA_RADIUS); CVector fogcoors(xi, yi, point.point.z + 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::RenderOneXLUSprite_Rotate_Aspect(spriteCoors.x, spriteCoors.y, spriteCoors.z, diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index a0f66819..d47cac31 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -741,7 +741,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 || @@ -881,7 +881,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/Weather.cpp b/src/render/Weather.cpp index f16467b6..e765f306 100644 --- a/src/render/Weather.cpp +++ b/src/render/Weather.cpp @@ -359,7 +359,7 @@ void CWeather::AddRain() RwCameraGetFarClipPlane(TheCamera.m_pRwCamera) / (RwCameraGetFarClipPlane(TheCamera.m_pRwCamera) * *(CVector2D*)RwCameraGetViewWindow(TheCamera.m_pRwCamera)).Magnitude(); splash_points[3] = 4.0f * CVector(RwCameraGetViewWindow(TheCamera.m_pRwCamera)->x, RwCameraGetViewWindow(TheCamera.m_pRwCamera)->y, 1.0f) * RwCameraGetFarClipPlane(TheCamera.m_pRwCamera) / (RwCameraGetFarClipPlane(TheCamera.m_pRwCamera) * *(CVector2D*)RwCameraGetViewWindow(TheCamera.m_pRwCamera)).Magnitude(); - RwV3dTransformPoints((RwV3d*)splash_points, (RwV3d*)splash_points, 4, RwFrameGetMatrix(RwCameraGetFrame(TheCamera.m_pRwCamera))); + RwV3dTransformPoints(splash_points, splash_points, 4, RwFrameGetMatrix(RwCameraGetFrame(TheCamera.m_pRwCamera))); CVector fp = (splash_points[0] + splash_points[1] + splash_points[2] + splash_points[3]) / 4; for (int i = 0; i < num_splash_attempts; i++) { CColPoint point; |