diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-01-20 18:32:03 +0100 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-01-20 18:32:03 +0100 |
commit | cc94419a7281fde133a5dc17c46cc62ae061a58c (patch) | |
tree | 300a1e3c7d68e1fe32a3ba4491608bf18a1435b2 /src/render | |
parent | free cam inversion fix (diff) | |
parent | Get rid of bitfields in CPool (diff) | |
download | re3-cc94419a7281fde133a5dc17c46cc62ae061a58c.tar re3-cc94419a7281fde133a5dc17c46cc62ae061a58c.tar.gz re3-cc94419a7281fde133a5dc17c46cc62ae061a58c.tar.bz2 re3-cc94419a7281fde133a5dc17c46cc62ae061a58c.tar.lz re3-cc94419a7281fde133a5dc17c46cc62ae061a58c.tar.xz re3-cc94419a7281fde133a5dc17c46cc62ae061a58c.tar.zst re3-cc94419a7281fde133a5dc17c46cc62ae061a58c.zip |
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/Font.cpp | 2 | ||||
-rw-r--r-- | src/render/SpecialFX.cpp | 2 | ||||
-rw-r--r-- | src/render/Sprite2d.cpp | 6 | ||||
-rw-r--r-- | src/render/Weather.cpp | 19 | ||||
-rw-r--r-- | src/render/Weather.h | 1 |
5 files changed, 25 insertions, 5 deletions
diff --git a/src/render/Font.cpp b/src/render/Font.cpp index 3798c5f2..de1ee8b4 100644 --- a/src/render/Font.cpp +++ b/src/render/Font.cpp @@ -741,7 +741,7 @@ void CFont::PrintStringFromBottom(float x, float y, wchar *str) { y -= (32.0f * Details.scaleY / 2.0f + 2.0f * Details.scaleY) * GetNumberLines(x, y, str); - if (Details.slant == 0.0f) + if (Details.slant != 0.0f) y -= ((Details.slantRefX - x) * Details.slant + Details.slantRefY); PrintString(x, y, str); } diff --git a/src/render/SpecialFX.cpp b/src/render/SpecialFX.cpp index 4eed988d..18e7fd34 100644 --- a/src/render/SpecialFX.cpp +++ b/src/render/SpecialFX.cpp @@ -871,7 +871,7 @@ C3dMarkers::PlaceMarker(uint32 identifier, uint16 type, CVector &pos, float size pMarker->m_Color.alpha = (float)a * 0.4f * someSin + a; } if (pMarker->m_nRotateRate != 0) { - RwV3d pos = pMarker->m_Matrix.m_matrix.pos; + CVector pos = pMarker->m_Matrix.GetPosition(); pMarker->m_Matrix.RotateZ(DEGTORAD(pMarker->m_nRotateRate * CTimer::GetTimeStep())); pMarker->m_Matrix.GetPosition() = pos; } diff --git a/src/render/Sprite2d.cpp b/src/render/Sprite2d.cpp index 0cd0e8bb..92f326f8 100644 --- a/src/render/Sprite2d.cpp +++ b/src/render/Sprite2d.cpp @@ -277,7 +277,11 @@ CSprite2d::SetMaskVertices(int n, float *positions) RwIm2DVertexSetScreenZ(&maVertices[i], NearScreenZ); RwIm2DVertexSetCameraZ(&maVertices[i], NearCamZ); RwIm2DVertexSetRecipCameraZ(&maVertices[i], RecipNearClip); - RwIm2DVertexSetIntRGBA(&maVertices[i], 255, 255, 255, 255); // 0, 0, 0, 0 on PC +#if !defined(GTA_PS2_STUFF) && defined(RWLIBS) + RwIm2DVertexSetIntRGBA(&maVertices[i], 0, 0, 0, 0); +#else + RwIm2DVertexSetIntRGBA(&maVertices[i], 255, 255, 255, 255); +#endif } } diff --git a/src/render/Weather.cpp b/src/render/Weather.cpp index 59dcb02a..ca4ef349 100644 --- a/src/render/Weather.cpp +++ b/src/render/Weather.cpp @@ -59,7 +59,7 @@ float CWeather::Stored_Rain; tRainStreak Streaks[NUM_RAIN_STREAKS]; -const int16 WeatherTypesList[] = { +int16 WeatherTypesList[] = { WEATHER_EXTRA_SUNNY, WEATHER_EXTRA_SUNNY, WEATHER_EXTRA_SUNNY, WEATHER_EXTRA_SUNNY, WEATHER_EXTRA_SUNNY, WEATHER_EXTRA_SUNNY, WEATHER_EXTRA_SUNNY, WEATHER_EXTRA_SUNNY, WEATHER_SUNNY, WEATHER_SUNNY, WEATHER_SUNNY, WEATHER_EXTRA_SUNNY, @@ -78,7 +78,7 @@ const int16 WeatherTypesList[] = { WEATHER_EXTRA_SUNNY, WEATHER_EXTRA_SUNNY, WEATHER_EXTRA_SUNNY, WEATHER_EXTRA_SUNNY }; -const int16 WeatherTypesList_WithHurricanes[] = { +int16 WeatherTypesList_WithHurricanes[] = { WEATHER_EXTRA_SUNNY, WEATHER_EXTRA_SUNNY, WEATHER_EXTRA_SUNNY, WEATHER_EXTRA_SUNNY, WEATHER_EXTRA_SUNNY, WEATHER_EXTRA_SUNNY, WEATHER_EXTRA_SUNNY, WEATHER_EXTRA_SUNNY, WEATHER_SUNNY, WEATHER_SUNNY, WEATHER_SUNNY, WEATHER_EXTRA_SUNNY, @@ -674,3 +674,18 @@ void CWeather::RestoreWeatherState() NewWeatherType = Stored_NewWeatherType; OldWeatherType = Stored_OldWeatherType; } + +#ifdef SECUROM +void CWeather::ForceHurricaneWeather() +{ + for (int i = 0; i < ARRAY_SIZE(WeatherTypesList_WithHurricanes); i++) + { + WeatherTypesList[i] = WEATHER_HURRICANE; + WeatherTypesList_WithHurricanes[i] = WEATHER_HURRICANE; + } + + CWeather::OldWeatherType = WEATHER_HURRICANE; + CWeather::NewWeatherType = WEATHER_HURRICANE; + CWeather::ForcedWeatherType = WEATHER_HURRICANE; +} +#endif diff --git a/src/render/Weather.h b/src/render/Weather.h index da88168d..0e7cf9bd 100644 --- a/src/render/Weather.h +++ b/src/render/Weather.h @@ -61,6 +61,7 @@ public: static void AddHeatHaze(); static void AddBeastie(); + static void ForceHurricaneWeather(); static void StoreWeatherState(); static void RestoreWeatherState(); }; |