diff options
author | aap <aap@papnet.eu> | 2019-07-10 17:18:26 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2019-07-10 17:18:26 +0200 |
commit | 4a36d64f15f898854bb8a76be86ac9a8c536b291 (patch) | |
tree | 2ff1344fb2f1e9859ba15cd56c461d40683359f9 /src/render/Clouds.cpp | |
parent | Merge pull request #128 from erorcun/erorcun (diff) | |
download | re3-4a36d64f15f898854bb8a76be86ac9a8c536b291.tar re3-4a36d64f15f898854bb8a76be86ac9a8c536b291.tar.gz re3-4a36d64f15f898854bb8a76be86ac9a8c536b291.tar.bz2 re3-4a36d64f15f898854bb8a76be86ac9a8c536b291.tar.lz re3-4a36d64f15f898854bb8a76be86ac9a8c536b291.tar.xz re3-4a36d64f15f898854bb8a76be86ac9a8c536b291.tar.zst re3-4a36d64f15f898854bb8a76be86ac9a8c536b291.zip |
Diffstat (limited to '')
-rw-r--r-- | src/render/Clouds.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/render/Clouds.cpp b/src/render/Clouds.cpp index d582bff8..2ead715b 100644 --- a/src/render/Clouds.cpp +++ b/src/render/Clouds.cpp @@ -53,7 +53,7 @@ CClouds::Shutdown(void) void CClouds::Update(void) { - float s = sin(TheCamera.Orientation - 0.85f); + float s = Sin(TheCamera.Orientation - 0.85f); CloudRotation += CWeather::Wind*s*0.0025f; IndividualRotation += (CWeather::Wind*CTimer::GetTimeStep() + 0.3f) * 60.0f; } @@ -81,7 +81,7 @@ CClouds::Render(void) float coverage = CWeather::CloudCoverage <= CWeather::Foggyness ? CWeather::Foggyness : CWeather::CloudCoverage; // Moon - int moonfadeout = abs(minute - 180); // fully visible at 3AM + int moonfadeout = Abs(minute - 180); // fully visible at 3AM if(moonfadeout < 180){ // fade in/out 3 hours int brightness = (1.0f - coverage) * (180 - moonfadeout); RwV3d pos = { 0.0f, -100.0f, 15.0f }; @@ -169,8 +169,8 @@ CClouds::Render(void) } // Fluffy clouds - float rot_sin = sin(CloudRotation); - float rot_cos = cos(CloudRotation); + float rot_sin = Sin(CloudRotation); + float rot_cos = Cos(CloudRotation); int fluffyalpha = 160 * (1.0f - CWeather::Foggyness); if(fluffyalpha != 0){ static float CoorsOffsetX[37] = { @@ -210,7 +210,7 @@ CClouds::Render(void) worldpos.z = pos.z; if(CSprite::CalcScreenCoors(worldpos, &screenpos, &szx, &szy, false)){ - float sundist = sqrt(sq(screenpos.x-CCoronas::SunScreenX) + sq(screenpos.y-CCoronas::SunScreenY)); + float sundist = Sqrt(sq(screenpos.x-CCoronas::SunScreenX) + sq(screenpos.y-CCoronas::SunScreenY)); int tr = CTimeCycle::GetFluffyCloudsTopRed(); int tg = CTimeCycle::GetFluffyCloudsTopGreen(); int tb = CTimeCycle::GetFluffyCloudsTopBlue(); @@ -302,7 +302,7 @@ CClouds::RenderBackground(int16 topred, int16 topgreen, int16 topblue, int16 botred, int16 botgreen, int16 botblue, int16 alpha) { RwMatrix *mat = RwFrameGetLTM(RwCameraGetFrame(TheCamera.m_pRwCamera)); - float c = sqrt(mat->right.x * mat->right.x + mat->right.y * mat->right.y); + float c = Sqrt(mat->right.x * mat->right.x + mat->right.y * mat->right.y); if(c > 1.0f) c = 1.0f; ms_cameraRoll = acos(c); @@ -424,7 +424,7 @@ CClouds::RenderHorizon(void) SCREEN_HEIGHT/300.0f * max(TheCamera.GetPosition().z, 0.0f); float b = TheCamera.GetUp().z < 0.0f ? SCREEN_HEIGHT : - SCREEN_HEIGHT * fabs(TheCamera.GetRight().z); + SCREEN_HEIGHT * Abs(TheCamera.GetRight().z); float z2 = z1 + (a + b)*TheCamera.LODDistMultiplier; z2 = min(z2, SCREEN_HEIGHT); CSprite2d::DrawRect(CRect(0, z1, SCREEN_WIDTH, z2), |