Fix cave fog + added Mist weather

This commit is contained in:
JappaWakka 2023-10-27 11:48:56 +02:00
parent 7136346b18
commit 7b7b23260a
2 changed files with 14 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 B

After

Width:  |  Height:  |  Size: 165 B

View File

@ -28,6 +28,7 @@ Public Class World
Sandstorm = 7 Sandstorm = 7
Ash = 8 Ash = 8
Blizzard = 9 Blizzard = 9
Mist = 10
End Enum End Enum
Public Enum EnvironmentTypes As Integer Public Enum EnvironmentTypes As Integer
@ -169,6 +170,14 @@ Public Class World
GoTo endsub GoTo endsub
End If End If
If Weather = Weathers.Mist Then
Screen.Effect.FogStart = -1
Screen.Effect.FogEnd = 19
Screen.Camera.FarPlane = 20
GoTo endsub
End If
Select Case EnvironmentType Select Case EnvironmentType
Case EnvironmentTypes.Cave, EnvironmentTypes.Dark, EnvironmentTypes.Forest Case EnvironmentTypes.Cave, EnvironmentTypes.Dark, EnvironmentTypes.Forest
Select Case Core.GameOptions.RenderDistance Select Case Core.GameOptions.RenderDistance
@ -469,6 +478,8 @@ endsub:
Return Weathers.Blizzard Return Weathers.Blizzard
Case 10 ' Thunderstorm Case 10 ' Thunderstorm
Return Weathers.Thunderstorm Return Weathers.Thunderstorm
Case 11 'Mist
Return Weathers.Mist
End Select End Select
Return Weathers.Clear Return Weathers.Clear
End Function End Function
@ -499,6 +510,8 @@ endsub:
Return 9 Return 9
Case Weathers.Thunderstorm Case Weathers.Thunderstorm
Return 10 Return 10
Case Weathers.Mist
Return 11
Case Else Case Else
Return 0 Return 0
End Select End Select
@ -644,7 +657,7 @@ endsub:
Private Shared WeatherOffset As New Vector2(0, 0) Private Shared WeatherOffset As New Vector2(0, 0)
Private Shared ObjectsList As New List(Of Rectangle) Private Shared ObjectsList As New List(Of Rectangle)
Public Shared NoParticlesList() As Weathers = {Weathers.Clear, Weathers.Sunny, Weathers.Fog} Public Shared NoParticlesList() As Weathers = {Weathers.Clear, Weathers.Sunny, Weathers.Fog, Weathers.Mist}
Public Shared Sub DrawWeather(ByVal MapWeather As Weathers) Public Shared Sub DrawWeather(ByVal MapWeather As Weathers)
If NoParticlesList.Contains(MapWeather) = False Then If NoParticlesList.Contains(MapWeather) = False Then