diff --git a/P3D/Content/Sounds/Receive_Badge.wav b/P3D/Content/Sounds/Receive_Badge.wav
new file mode 100644
index 000000000..2e52b3a0f
Binary files /dev/null and b/P3D/Content/Sounds/Receive_Badge.wav differ
diff --git a/P3D/Content/Sounds/badge_acquired.wav b/P3D/Content/Sounds/badge_acquired.wav
deleted file mode 100644
index 9ea7822c4..000000000
Binary files a/P3D/Content/Sounds/badge_acquired.wav and /dev/null differ
diff --git a/P3D/P3D.vbproj b/P3D/P3D.vbproj
index 68dba7703..3f733c346 100644
--- a/P3D/P3D.vbproj
+++ b/P3D/P3D.vbproj
@@ -15328,6 +15328,9 @@
PreserveNewest
+
+ PreserveNewest
+
PreserveNewest
@@ -23968,9 +23971,6 @@
PreserveNewest
-
- PreserveNewest
-
PreserveNewest
diff --git a/P3D/Resources/Sound/MusicManager.vb b/P3D/Resources/Sound/MusicManager.vb
index f91c8405b..969cc6584 100644
--- a/P3D/Resources/Sound/MusicManager.vb
+++ b/P3D/Resources/Sound/MusicManager.vb
@@ -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
diff --git a/P3D/Screens/BattleIntroScreen.vb b/P3D/Screens/BattleIntroScreen.vb
index 5a44c3edc..b570d78a6 100644
--- a/P3D/Screens/BattleIntroScreen.vb
+++ b/P3D/Screens/BattleIntroScreen.vb
@@ -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()
diff --git a/P3D/Screens/MainMenu/NewNewGameScreen.vb b/P3D/Screens/MainMenu/NewNewGameScreen.vb
index b59e795fd..fbb73b095 100644
--- a/P3D/Screens/MainMenu/NewNewGameScreen.vb
+++ b/P3D/Screens/MainMenu/NewNewGameScreen.vb
@@ -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
diff --git a/P3D/Screens/MainMenu/PauseScreen.vb b/P3D/Screens/MainMenu/PauseScreen.vb
index dc7c1d8b2..dae796e4f 100644
--- a/P3D/Screens/MainMenu/PauseScreen.vb
+++ b/P3D/Screens/MainMenu/PauseScreen.vb
@@ -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 = ""
diff --git a/P3D/Screens/MainMenu/PressStartScreen.vb b/P3D/Screens/MainMenu/PressStartScreen.vb
index d9177c645..81845c3bc 100644
--- a/P3D/Screens/MainMenu/PressStartScreen.vb
+++ b/P3D/Screens/MainMenu/PressStartScreen.vb
@@ -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
diff --git a/P3D/World/ActionScript/V2/ScriptCommands/DoMusic.vb b/P3D/World/ActionScript/V2/ScriptCommands/DoMusic.vb
index 6e3a1180b..be3139577 100644
--- a/P3D/World/ActionScript/V2/ScriptCommands/DoMusic.vb
+++ b/P3D/World/ActionScript/V2/ScriptCommands/DoMusic.vb
@@ -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
diff --git a/P3D/World/ActionScript/V2/ScriptCommands/DoPlayer.vb b/P3D/World/ActionScript/V2/ScriptCommands/DoPlayer.vb
index ce9282b11..52d57c8cc 100644
--- a/P3D/World/ActionScript/V2/ScriptCommands/DoPlayer.vb
+++ b/P3D/World/ActionScript/V2/ScriptCommands/DoPlayer.vb
@@ -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)
diff --git a/P3D/World/ActionScript/V2/ScriptCommands/DoScreen.vb b/P3D/World/ActionScript/V2/ScriptCommands/DoScreen.vb
index 3a6c26c05..755f17448 100644
--- a/P3D/World/ActionScript/V2/ScriptCommands/DoScreen.vb
+++ b/P3D/World/ActionScript/V2/ScriptCommands/DoScreen.vb
@@ -231,7 +231,6 @@
CanContinue = False
Case "skinselection"
- Dim skins = argument.Split(","c)
If Screens.MainMenu.NewNewGameScreen.CharacterSelectionScreen.SelectedSkin <> "" Then
IsReady = True
Else