mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-15 09:08:59 +00:00
weather fixes
This commit is contained in:
parent
ac5af18891
commit
771235d213
2 changed files with 8 additions and 8 deletions
|
@ -209,8 +209,8 @@ enum Config {
|
||||||
#define NO_ISLAND_LOADING // disable loadscreen between islands via loading all island data at once, consumes more memory and CPU
|
#define NO_ISLAND_LOADING // disable loadscreen between islands via loading all island data at once, consumes more memory and CPU
|
||||||
//#define USE_TEXTURE_POOL
|
//#define USE_TEXTURE_POOL
|
||||||
#define CUTSCENE_BORDERS_SWITCH
|
#define CUTSCENE_BORDERS_SWITCH
|
||||||
//#define EXTENDED_COLOURFILTER // more options for colour filter (replaces mblur)
|
#define EXTENDED_COLOURFILTER // more options for colour filter (replaces mblur)
|
||||||
//#define EXTENDED_PIPELINES // custom render pipelines (includes Neo)
|
#define EXTENDED_PIPELINES // custom render pipelines (includes Neo)
|
||||||
#define MULTISAMPLING // adds MSAA option
|
#define MULTISAMPLING // adds MSAA option
|
||||||
|
|
||||||
#ifdef LIBRW
|
#ifdef LIBRW
|
||||||
|
|
|
@ -69,7 +69,7 @@ const int16 WeatherTypesList[] = {
|
||||||
WEATHER_SUNNY, WEATHER_SUNNY, WEATHER_RAINY, WEATHER_CLOUDY,
|
WEATHER_SUNNY, WEATHER_SUNNY, WEATHER_RAINY, WEATHER_CLOUDY,
|
||||||
};
|
};
|
||||||
|
|
||||||
const float Windiness[] = {
|
const float Windyness[] = {
|
||||||
0.0f, // WEATHER_SUNNY
|
0.0f, // WEATHER_SUNNY
|
||||||
0.7f, // WEATHER_CLOUDY
|
0.7f, // WEATHER_CLOUDY
|
||||||
1.0f, // WEATHER_RAINY
|
1.0f, // WEATHER_RAINY
|
||||||
|
@ -243,7 +243,7 @@ void CWeather::Update(void)
|
||||||
Rainbow = 1.0f - 4.0f * Abs(InterpolationValue - 0.25f) / 4.0f;
|
Rainbow = 1.0f - 4.0f * Abs(InterpolationValue - 0.25f) / 4.0f;
|
||||||
else
|
else
|
||||||
Rainbow = 0.0f;
|
Rainbow = 0.0f;
|
||||||
Wind = InterpolationValue * Windiness[NewWeatherType] + (1.0f - InterpolationValue) * Windiness[OldWeatherType];
|
Wind = InterpolationValue * Windyness[NewWeatherType] + (1.0f - InterpolationValue) * Windyness[OldWeatherType];
|
||||||
AddRain();
|
AddRain();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,8 +278,8 @@ void CWeather::AddRain()
|
||||||
if (Rain <= 0.1f)
|
if (Rain <= 0.1f)
|
||||||
return;
|
return;
|
||||||
static RwRGBA colour;
|
static RwRGBA colour;
|
||||||
float screen_width = RsGlobal.width;
|
float screen_width = SCREEN_WIDTH;
|
||||||
float screen_height = RsGlobal.height;
|
float screen_height = SCREEN_HEIGHT;
|
||||||
int cur_frame = (int)(3 * Rain) & 3;
|
int cur_frame = (int)(3 * Rain) & 3;
|
||||||
int num_drops = (int)(2 * Rain) + 2;
|
int num_drops = (int)(2 * Rain) + 2;
|
||||||
static int STATIC_RAIN_ANGLE = -45;
|
static int STATIC_RAIN_ANGLE = -45;
|
||||||
|
@ -397,11 +397,11 @@ void RenderOneRainStreak(CVector pos, CVector unused, int intensity, bool scale,
|
||||||
RwIm3DVertexSetRGBA(&TempBufferRenderVertices[TempBufferVerticesStored + 0], 0, 0, 0, 0);
|
RwIm3DVertexSetRGBA(&TempBufferRenderVertices[TempBufferVerticesStored + 0], 0, 0, 0, 0);
|
||||||
RwIm3DVertexSetPos(&TempBufferRenderVertices[TempBufferVerticesStored + 0], pos.x + 11.0f * TheCamera.GetUp().x, pos.y + 11.0f * TheCamera.GetUp().y, pos.z + 11.0f * TheCamera.GetUp().z);
|
RwIm3DVertexSetPos(&TempBufferRenderVertices[TempBufferVerticesStored + 0], pos.x + 11.0f * TheCamera.GetUp().x, pos.y + 11.0f * TheCamera.GetUp().y, pos.z + 11.0f * TheCamera.GetUp().z);
|
||||||
RwIm3DVertexSetRGBA(&TempBufferRenderVertices[TempBufferVerticesStored + 1], 0, 0, 0, 0);
|
RwIm3DVertexSetRGBA(&TempBufferRenderVertices[TempBufferVerticesStored + 1], 0, 0, 0, 0);
|
||||||
RwIm3DVertexSetPos(&TempBufferRenderVertices[TempBufferVerticesStored + 1], pos.x - 9.0f * TheCamera.GetRight().x, pos.y - 9.0f * TheCamera.GetRight().y, pos.z - 9.0f * TheCamera.GetUp().z);
|
RwIm3DVertexSetPos(&TempBufferRenderVertices[TempBufferVerticesStored + 1], pos.x - 9.0f * TheCamera.GetRight().x, pos.y - 9.0f * TheCamera.GetRight().y, pos.z - 9.0f * TheCamera.GetRight().z);
|
||||||
RwIm3DVertexSetRGBA(&TempBufferRenderVertices[TempBufferVerticesStored + 2], RAIN_COLOUR_R * intensity / 256, RAIN_COLOUR_G * intensity / 256, RAIN_COLOUR_B * intensity / 256, RAIN_ALPHA);
|
RwIm3DVertexSetRGBA(&TempBufferRenderVertices[TempBufferVerticesStored + 2], RAIN_COLOUR_R * intensity / 256, RAIN_COLOUR_G * intensity / 256, RAIN_COLOUR_B * intensity / 256, RAIN_ALPHA);
|
||||||
RwIm3DVertexSetPos(&TempBufferRenderVertices[TempBufferVerticesStored + 2], pos.x, pos.y, pos.z);
|
RwIm3DVertexSetPos(&TempBufferRenderVertices[TempBufferVerticesStored + 2], pos.x, pos.y, pos.z);
|
||||||
RwIm3DVertexSetRGBA(&TempBufferRenderVertices[TempBufferVerticesStored + 3], 0, 0, 0, 0);
|
RwIm3DVertexSetRGBA(&TempBufferRenderVertices[TempBufferVerticesStored + 3], 0, 0, 0, 0);
|
||||||
RwIm3DVertexSetPos(&TempBufferRenderVertices[TempBufferVerticesStored + 3], pos.x + 9.0f * TheCamera.GetRight().x, pos.y + 9.0f * TheCamera.GetRight().y, pos.z + 9.0f * TheCamera.GetUp().z);
|
RwIm3DVertexSetPos(&TempBufferRenderVertices[TempBufferVerticesStored + 3], pos.x + 9.0f * TheCamera.GetRight().x, pos.y + 9.0f * TheCamera.GetRight().y, pos.z + 9.0f * TheCamera.GetRight().z);
|
||||||
RwIm3DVertexSetRGBA(&TempBufferRenderVertices[TempBufferVerticesStored + 4], 0, 0, 0, 0);
|
RwIm3DVertexSetRGBA(&TempBufferRenderVertices[TempBufferVerticesStored + 4], 0, 0, 0, 0);
|
||||||
RwIm3DVertexSetPos(&TempBufferRenderVertices[TempBufferVerticesStored + 4], pos.x - 11.0f * TheCamera.GetUp().x, pos.y - 11.0f * TheCamera.GetUp().y, pos.z - 11.0f * TheCamera.GetUp().z);
|
RwIm3DVertexSetPos(&TempBufferRenderVertices[TempBufferVerticesStored + 4], pos.x - 11.0f * TheCamera.GetUp().x, pos.y - 11.0f * TheCamera.GetUp().y, pos.z - 11.0f * TheCamera.GetUp().z);
|
||||||
float u = STREAK_U;
|
float u = STREAK_U;
|
||||||
|
|
Loading…
Reference in a new issue