Various Fixes & Improvements

Fixed PlayerSkins displaying incorrectly in the new intro.

Fixed position of Pause Menu text.

Songs don't fade in by default now except with the @musicplayer.playfade(songname) command

You can now also close the Options row in the Main Menu with the "Up" or "Move Forward" keys

Improved the timing of the Battle intro screens

Renamed Badge_Aquired to Receive_Badge for consistency
This commit is contained in:
JappaWakka 2021-10-03 21:18:25 +02:00
parent bd8f91e338
commit 799792e49c
11 changed files with 67 additions and 61 deletions

Binary file not shown.

View File

@ -15328,6 +15328,9 @@
<Content Include="Content\Sounds\PC\TurnOn.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Content\Sounds\Receive_Badge.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Content\Sounds\Receive_Egg.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@ -23968,9 +23971,6 @@
<Content Include="Content\SkyDomeResource\UnderwaterGround.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Content\Sounds\badge_acquired.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Content\Sounds\Battle\exp_max.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>

View File

@ -106,7 +106,6 @@ Public Class MusicManager
' if the song that gets played after fading completed is an intro to another song
Public Shared _fadeIntoIntro As Boolean = False
Private Shared _isFadingOut As Boolean = False
Private Shared _isFadingIn As Boolean = False
' NAudio properties
Public Shared outputDevice As WaveOutEvent
Public Shared audioFile As VorbisWaveReader
@ -176,7 +175,6 @@ Public Class MusicManager
_nextSong = ""
_fadeSpeed = DEFAULT_FADE_SPEED
_isFadingOut = False
_isFadingIn = False
_isLooping = True
End Sub
@ -201,7 +199,7 @@ Public Class MusicManager
Public Shared Sub Update()
If _isPausedForSound Then
If Date.Now >= _pausedUntil Then
If MusicManager.Paused = True Then
If Paused = True Then
_isPausedForSound = False
Paused = False
End If
@ -216,7 +214,6 @@ Public Class MusicManager
Volume = 0F
_isFadingOut = False
_isFadingIn = True
Dim song = GetSong(_nextSong)
@ -232,13 +229,16 @@ Public Class MusicManager
Else
_isLooping = True
End If
If Muted = True Then
Volume = 0.0F
Else
Volume = 1.0F
End If
Else
' no song found, do not fade into anything
_fadeIntoIntro = False
ClearCurrentlyPlaying()
_isFadingIn = False
If Muted = True Then
Volume = 0.0F
Else
@ -252,32 +252,19 @@ Public Class MusicManager
End If
ElseIf _isFadingIn Then
If Muted = True Then
Volume = 0.0F
_isFadingIn = False
Else
Volume += _fadeSpeed
If Volume >= 1.0F Then
Volume = 1.0F
_isFadingIn = False
End If
End If
' intro
' If _isIntroStarted Then
' If Paused = False Then
'If Date.Now >= _introEndTime Then
'Dim song = GetSong(_introContinueSong)
'_isLooping = True
'_isIntroStarted = False
'Play(song)
'End If
'End If
'End If
End If
' intro
' If _isIntroStarted Then
' If Paused = False Then
'If Date.Now >= _introEndTime Then
'Dim song = GetSong(_introContinueSong)
'_isLooping = True
'_isIntroStarted = False
'Play(song)
'End If
'End If
'End If
End If
If Core.GameInstance.IsActive AndAlso _lastVolume <> (Volume * MasterVolume) Then
UpdateVolume()
End If

View File

@ -15,7 +15,7 @@
Dim Trainer As Trainer
Dim minDelay As Single = 16.0F
Dim minDelay As Single = 4.0F
Dim startTime As Date
Dim duration As TimeSpan
@ -453,22 +453,22 @@
Private Sub UpdateBlockIn()
If Animations.Count = 0 Then
Animations.Add(New Rectangle(CInt(Core.windowSize.Width / 2) - 10, CInt(Core.windowSize.Height / 2) - 10, 20, 20))
Animations.Add(New Rectangle(CInt(Core.windowSize.Width / 2 - (Core.windowSize.Width / 100 / 2)), CInt(Core.windowSize.Height / 2 - (Core.windowSize.Height / 100 / 2)), CInt(Core.windowSize.Width / 100), CInt(Core.windowSize.Height / 100)))
Else
If Animations(0).Width >= Core.windowSize.Width Then
Dim Speed As Integer = CInt(Me.duration.TotalMilliseconds / Core.windowSize.Height * 6)
If Animations(0).Height >= Core.windowSize.Height + 128 Then
ready = True
Else
Dim a As Rectangle = Animations(0)
a.X -= 7
a.Y -= 7
a.Width += 14
a.Height += 14
Animations.RemoveAt(0)
Animations.Add(a)
End If
Dim a As Rectangle = Animations(0)
a.X -= CInt(Speed)
a.Y -= CInt(Speed / 16 * 9)
a.Width += Speed * 2
a.Height += CInt(Speed * 2 / 16 * 9)
Animations.RemoveAt(0)
Animations.Add(a)
End If
End Sub
@ -476,10 +476,10 @@
If Animations.Count = 0 Then
Animations.Add(New Rectangle(0, 0, Core.windowSize.Width, Core.windowSize.Height))
Else
If value >= Core.windowSize.Height / 2 Then
If value >= Core.windowSize.Height / 2 - 4 Then
ready = True
Else
value += CInt(Math.Ceiling(Core.windowSize.Height / 300))
value += CInt(Math.Ceiling(Me.duration.TotalMilliseconds / Core.windowSize.Height * 3))
End If
End If
End Sub
@ -515,7 +515,7 @@
End Sub
Private Function SongOver() As Boolean
Return startTime + duration < Date.Now.AddSeconds(0.1)
Return startTime + duration < Date.Now
End Function
'Protected Overrides Sub Finalize()

View File

@ -234,7 +234,7 @@
SelectedSkin = ""
For Each skin As String In GameModeManager.ActiveGameMode.SkinFiles
_sprites.Add(TextureManager.GetTexture("Textures\OverworldSprites\PlayerSkins\" & skin))
_sprites.Add(TextureManager.GetTexture("Textures\NPC\" & skin))
Next
_skins = GameModeManager.ActiveGameMode.SkinFiles

View File

@ -51,9 +51,10 @@
Me.PreScreen.Draw()
Canvas.DrawRectangle(New Rectangle(0, 0, Core.ScreenSize.Width, Core.ScreenSize.Height), New Color(0, 0, 0, 150))
Dim pX As Integer = CInt(Core.ScreenSize.Width / 2) - CInt(FontManager.InGameFont.MeasureString(Localization.GetString("pause_menu_title")).X / 2)
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, Localization.GetString("pause_menu_title"), New Vector2(pX - 7, CInt(Core.ScreenSize.Height / 7.5) + 3), Color.Black)
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, Localization.GetString("pause_menu_title"), New Vector2(pX - 10, CInt(Core.ScreenSize.Height / 7.5)), Color.White)
Dim titletext As String = Localization.GetString("pause_menu_title")
Dim pX As Integer = CInt(Core.ScreenSize.Width / 2) - CInt(FontManager.InGameFont.MeasureString(titletext).X / 2)
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, titletext, New Vector2(pX - 7, CInt(160 - FontManager.InGameFont.MeasureString(titletext).Y / 2 + 3)), Color.Black)
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, titletext, New Vector2(pX - 10, CInt(160 - FontManager.InGameFont.MeasureString(titletext).Y / 2)), Color.White)
If Me.menuIndex = 0 Then
DrawMenu()
@ -62,10 +63,10 @@
End If
If Me.canCreateAutosave = False Then
Dim text As String = Localization.GetString("pause_menu_autosave_fail")
Dim autosaveFailText As String = Localization.GetString("pause_menu_autosave_fail")
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, text, New Vector2(9, Core.ScreenSize.Height - FontManager.InGameFont.MeasureString(text).Y), Color.Black)
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, text, New Vector2(5, Core.ScreenSize.Height - FontManager.InGameFont.MeasureString(text).Y - 4), Color.White)
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, autosaveFailText, New Vector2(9, Core.ScreenSize.Height - FontManager.InGameFont.MeasureString(autosaveFailText).Y), Color.Black)
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, autosaveFailText, New Vector2(5, Core.ScreenSize.Height - FontManager.InGameFont.MeasureString(autosaveFailText).Y - 4), Color.White)
End If
Dim d As New Dictionary(Of Buttons, String)
@ -182,8 +183,8 @@
Private Sub DrawQuit()
Dim pX As Integer = CInt(Core.ScreenSize.Width / 2) - CInt(FontManager.InGameFont.MeasureString(Localization.GetString("pause_menu_confirmation")).X / 2)
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, Localization.GetString("pause_menu_confirmation"), New Vector2(pX - 7, CInt(Core.ScreenSize.Height / 6.8) + 3 + 110), Color.Black)
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, Localization.GetString("pause_menu_confirmation"), New Vector2(pX - 10, CInt(Core.ScreenSize.Height / 6.8) + 110), Color.White)
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, Localization.GetString("pause_menu_confirmation"), New Vector2(pX - 7, CInt(Core.ScreenSize.Height / 7.5) + 3 + 110), Color.Black)
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, Localization.GetString("pause_menu_confirmation"), New Vector2(pX - 10, CInt(Core.ScreenSize.Height / 7.5) + 110), Color.White)
For i = 0 To 1
Dim Text As String = ""

View File

@ -548,6 +548,19 @@ Public Class NewMainMenuScreen
_sliderTarget = GetSliderTarget(_selectedProfile)
End Select
End If
If KeyBoardHandler.KeyPressed(KeyBindings.ForwardMoveKey) Or KeyBoardHandler.KeyPressed(KeyBindings.UpKey) Then
Select Case _menuIndex
Case 1, 2
_menuIndex = 0
_selectedProfile = _selectedProfileTemp
_sliderTarget = GetSliderTarget(_selectedProfile)
Case 3
_menuIndex = 1
_selectedProfile = _selectedProfileTemp
_sliderTarget = GetSliderTarget(_selectedProfile)
End Select
End If
If _fadeInMain = 1.0F Then
If _closingDisplay Then
If _expandDisplay > 0.0F Then

View File

@ -12,6 +12,12 @@
Select Case command.ToLower()
Case "play"
MusicManager.Play(argument, True, 0.0F)
If Core.CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then
Screen.Level.MusicLoop = argument
End If
Case "playfade"
MusicManager.Play(argument, True)
If Core.CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then

View File

@ -188,7 +188,7 @@
If StringHelper.IsNumeric(argument) Then
If Core.Player.Badges.Contains(int(argument)) = False Then
Core.Player.Badges.Add(int(argument))
SoundManager.PlaySound("badge_acquired", True)
SoundManager.PlaySound("Receive_Badge", True)
Screen.TextBox.TextColor = TextBox.PlayerColor
Screen.TextBox.Show(Core.Player.Name & " received the~" & Badge.GetBadgeName(int(argument)) & " Badge.", {}, False, False)

View File

@ -231,7 +231,6 @@
CanContinue = False
Case "skinselection"
Dim skins = argument.Split(","c)
If Screens.MainMenu.NewNewGameScreen.CharacterSelectionScreen.SelectedSkin <> "" Then
IsReady = True
Else