mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-04-08 18:35:09 +02:00
Replaced the old music manager with the one from experimental branch. Needs to be updated.
This commit is contained in:
parent
7cedeead79
commit
b6c85bc77d
@ -1736,7 +1736,6 @@
|
||||
<Compile Include="Resources\Models\Steps\InsideStepModel.vb" />
|
||||
<Compile Include="Resources\Models\Steps\StepModel.vb" />
|
||||
<Compile Include="Resources\Sound\NewMusicManager.vb" />
|
||||
<Compile Include="Resources\Sound\MusicManager.vb" />
|
||||
<Compile Include="Resources\Sound\SoundManager.vb" />
|
||||
<Compile Include="Resources\TextureManager.vb" />
|
||||
<Compile Include="Resources\TextureManager2.vb" />
|
||||
@ -1796,7 +1795,6 @@
|
||||
<Compile Include="Screens\testWindowScreen.vb" />
|
||||
<Compile Include="Screens\TradeScreen.vb" />
|
||||
<Compile Include="Screens\NewTrainerScreen.vb" />
|
||||
<Compile Include="Screens\TrainerScreen.vb" />
|
||||
<Compile Include="Screens\TransitionScreen.vb" />
|
||||
<Compile Include="Screens\WindowScreen.vb" />
|
||||
<Compile Include="Security\FileValidation.vb" />
|
||||
|
@ -187,18 +187,18 @@
|
||||
|
||||
PlayerStatistics.Track("Wild battles", 1)
|
||||
|
||||
If CustomBattleMusic = "" OrElse MusicManager.SongExists(CustomBattleMusic) = False Then
|
||||
If RoamingBattle = True AndAlso RoamingPokemonStorage.MusicLoop <> "" AndAlso MusicManager.SongExists(RoamingPokemonStorage.MusicLoop) = True Then
|
||||
MusicManager.PlayMusic(RoamingPokemonStorage.MusicLoop, True, 0.0F, 0.0F)
|
||||
If CustomBattleMusic = "" OrElse NewMusicManager.SongExists(CustomBattleMusic) = False Then
|
||||
If RoamingBattle = True AndAlso RoamingPokemonStorage.MusicLoop <> "" AndAlso NewMusicManager.SongExists(RoamingPokemonStorage.MusicLoop) = True Then
|
||||
MusicPlayer.GetInstance().Play(RoamingPokemonStorage.MusicLoop, True, 0.0F, 0.0F)
|
||||
Else
|
||||
If MusicManager.SongExists(SavedOverworld.Level.CurrentRegion.Split(CChar(","))(0) & "_wild") = True Then
|
||||
MusicManager.PlayMusic(SavedOverworld.Level.CurrentRegion.Split(CChar(","))(0) & "_wild", True, 0.0F, 0.0F)
|
||||
If NewMusicManager.SongExists("battle\main\" & SavedOverworld.Level.CurrentRegion.Split(CChar(","))(0) & "\wild") = True Then
|
||||
MusicPlayer.GetInstance().Play("battle\main\" & SavedOverworld.Level.CurrentRegion.Split(CChar(","))(0) & "\wild", True, 0.0F, 0.0F)
|
||||
Else
|
||||
MusicManager.PlayMusic("johto_wild", True, 0.0F, 0.0F)
|
||||
MusicPlayer.GetInstance().Play("battle\main\johto\wild", True, 0.0F, 0.0F)
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
MusicManager.PlayMusic(CustomBattleMusic, True, 0.0F, 0.0F)
|
||||
MusicPlayer.GetInstance().Play(CustomBattleMusic, True, 0.0F, 0.0F)
|
||||
End If
|
||||
|
||||
Me.defaultMapType = defaultMapType
|
||||
@ -330,9 +330,9 @@
|
||||
End If
|
||||
|
||||
If IsPVPBattle = True Then
|
||||
MusicManager.PlayMusic("pvp", True, 0.0F, 0.0F)
|
||||
MusicPlayer.GetInstance().Play("system\pvp", True, 0.0F, 0.0F)
|
||||
Else
|
||||
MusicManager.PlayMusic(Trainer.GetBattleMusicName(), True, 0.0F, 0.0F)
|
||||
MusicPlayer.GetInstance().Play(Trainer.GetBattleMusicName(), True, 0.0F, 0.0F)
|
||||
End If
|
||||
|
||||
Me.defaultMapType = defaultMapType
|
||||
@ -477,10 +477,10 @@
|
||||
|
||||
PlayerStatistics.Track("Safari battles", 1)
|
||||
|
||||
If MusicManager.SongExists(SavedOverworld.Level.CurrentRegion.Split(CChar(","))(0) & "_wild") = True Then
|
||||
MusicManager.PlayMusic(SavedOverworld.Level.CurrentRegion.Split(CChar(","))(0) & "_wild", True, 0.0F, 0.0F)
|
||||
If NewMusicManager.SongExists("battle\main\" & SavedOverworld.Level.CurrentRegion.Split(CChar(","))(0) & "\wild") = True Then
|
||||
MusicPlayer.GetInstance().Play("battle\main\" & SavedOverworld.Level.CurrentRegion.Split(CChar(","))(0) & "\wild", True, 0.0F, 0.0F)
|
||||
Else
|
||||
MusicManager.PlayMusic("johto_wild", True, 0.0F, 0.0F)
|
||||
MusicPlayer.GetInstance().Play("battle\main\johto\wild", True, 0.0F, 0.0F)
|
||||
End If
|
||||
|
||||
Me.defaultMapType = defaultMapType
|
||||
@ -594,10 +594,10 @@
|
||||
|
||||
PlayerStatistics.Track("Bug-Catching contest battles", 1)
|
||||
|
||||
If MusicManager.SongExists(SavedOverworld.Level.CurrentRegion.Split(CChar(","))(0) & "_wild") = True Then
|
||||
MusicManager.PlayMusic(SavedOverworld.Level.CurrentRegion.Split(CChar(","))(0) & "_wild", True, 0.0F, 0.0F)
|
||||
If NewMusicManager.SongExists("battle\main\" & SavedOverworld.Level.CurrentRegion.Split(CChar(","))(0) & "\wild") = True Then
|
||||
MusicPlayer.GetInstance().Play("battle\main\" & SavedOverworld.Level.CurrentRegion.Split(CChar(","))(0) & "\wild", True, 0.0F, 0.0F)
|
||||
Else
|
||||
MusicManager.PlayMusic("johto_wild", True, 0.0F, 0.0F)
|
||||
MusicPlayer.GetInstance().Play("battle\main\johto\wild", True, 0.0F, 0.0F)
|
||||
End If
|
||||
|
||||
Me.defaultMapType = defaultMapType
|
||||
|
@ -15,9 +15,9 @@
|
||||
|
||||
Public Overrides Sub Update(BV2Screen As BattleScreen)
|
||||
If fade = True Then
|
||||
MusicManager.PlayMusic(Me._music, True)
|
||||
MusicPlayer.GetInstance().Play(Me._music, True)
|
||||
Else
|
||||
MusicManager.PlayMusic(Me._music, True, 0.0F, 0.0F)
|
||||
MusicPlayer.GetInstance().Play(Me._music, True, 0.0F, 0.0F)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
ElseIf KeyBoardHandler.KeyPressed(KeyBindings.FullScreenKey) AndAlso Core.CurrentScreen.CanGoFullscreen Then
|
||||
ToggleFullScreen()
|
||||
ElseIf KeyBoardHandler.KeyPressed(KeyBindings.MuteMusicKey) AndAlso Core.CurrentScreen.CanMuteMusic Then
|
||||
MusicManager.Mute(Not MediaPlayer.IsMuted)
|
||||
MusicPlayer.GetInstance().Mute(Not MediaPlayer.IsMuted)
|
||||
SoundManager.Mute(MediaPlayer.IsMuted)
|
||||
Core.GameOptions.Save()
|
||||
Core.CurrentScreen.ToggledMute()
|
||||
|
@ -241,7 +241,7 @@
|
||||
SoundManager.PlayPokemonCry(pokemonNumber)
|
||||
|
||||
If Screen.Level.IsRadioOn = False OrElse GameJolt.PokegearScreen.StationCanPlay(Screen.Level.SelectedRadioStation) = False Then
|
||||
MusicManager.PlayMusic("surf", True)
|
||||
MusicPlayer.GetInstance().Play("system\surf", True)
|
||||
End If
|
||||
End With
|
||||
End If
|
||||
|
@ -34,7 +34,7 @@
|
||||
Public Overrides Sub ChangeTo()
|
||||
PokemonGTSCount = -1
|
||||
|
||||
MusicManager.PlayMusic("gts", True)
|
||||
MusicPlayer.GetInstance().Play("system\gts", True)
|
||||
|
||||
If GTSVersion <> "1.X" Then
|
||||
GetGTSPokemonInfo()
|
||||
|
@ -231,7 +231,7 @@
|
||||
ownPokemonPosition = Core.windowSize.Height
|
||||
tState = 0
|
||||
messageDelay = 220
|
||||
MusicManager.PlayMusic("evolution", True)
|
||||
MusicPlayer.GetInstance().Play("system\evolution", True)
|
||||
End If
|
||||
End Select
|
||||
End Sub
|
||||
@ -408,7 +408,7 @@
|
||||
Me.ScreenState = ScreenStates.Stopped
|
||||
Me.DisconnectMessage = "Trade successful. Press any button to exit."
|
||||
|
||||
MusicManager.PlayMusic("gts", True)
|
||||
MusicPlayer.GetInstance().Play("system\gts", True)
|
||||
|
||||
If Core.Player.Pokemons(Core.Player.Pokemons.Count - 1).CanEvolve(EvolutionCondition.EvolutionTrigger.Trading, "") = True Then
|
||||
Core.SetScreen(New EvolutionScreen(Me, {Core.Player.Pokemons.Count - 1}.ToList(), Me.SelectedPokemon.Number.ToString(), EvolutionCondition.EvolutionTrigger.Trading))
|
||||
@ -424,7 +424,7 @@
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub ChangeTo()
|
||||
MusicManager.PlayMusic("gts", True)
|
||||
MusicPlayer.GetInstance().Play("system\gts", True)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
@ -37,7 +37,7 @@
|
||||
Me.MouseVisible = True
|
||||
Me.CanBePaused = False
|
||||
|
||||
MusicManager.PlayMusic("lobby", True)
|
||||
MusicPlayer.GetInstance().Play("system\lobby", True)
|
||||
|
||||
Dim APICall As New APICall(AddressOf GotKeys)
|
||||
APICall.GetKeys(False, "RegisterBattleV" & REGISTERBATTLEVERSION & "|" & Core.GameJoltSave.GameJoltID & "|*")
|
||||
@ -646,7 +646,7 @@
|
||||
Me.OwnTeam.Clear()
|
||||
Me.TeamDownloaded = False
|
||||
Me.HasTeamUploaded = False
|
||||
MusicManager.PlayMusic("lobby", False)
|
||||
MusicPlayer.GetInstance().Play("system\lobby", False)
|
||||
Core.Player.Pokemons.Clear()
|
||||
Core.Player.Pokemons.AddRange(TempOriginalTeam.ToArray())
|
||||
Dim APICall As New APICall(AddressOf GotKeys)
|
||||
|
@ -201,7 +201,7 @@
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub ChangeTo()
|
||||
MusicManager.PlayMusic("gts", True)
|
||||
MusicPlayer.GetInstance().Play("system\gts", True)
|
||||
End Sub
|
||||
|
||||
Public Shared Sub ClearActivatedEvents()
|
||||
|
@ -32,7 +32,7 @@
|
||||
Me.PreScreen = currentScreen
|
||||
Me.texture = TextureManager.GetTexture("GUI\Menus\General")
|
||||
|
||||
MusicManager.PlayMusic("gts", True)
|
||||
MusicPlayer.GetInstance().Play("system\gts", True)
|
||||
|
||||
Me.MouseVisible = True
|
||||
Me.CanBePaused = False
|
||||
@ -405,7 +405,7 @@
|
||||
ownPokemonPosition = Core.windowSize.Height
|
||||
tState = 0
|
||||
messageDelay = 220
|
||||
MusicManager.PlayMusic("evolution", True)
|
||||
MusicPlayer.GetInstance().Play("system\evolution", True)
|
||||
Me.CanChat = False
|
||||
PlayerStatistics.Track("Trades", 1)
|
||||
End Sub
|
||||
@ -514,7 +514,7 @@
|
||||
SentTradeOffer = False
|
||||
ReceivedTradeOffer = False
|
||||
|
||||
MusicManager.PlayMusic("gts", True)
|
||||
MusicPlayer.GetInstance().Play("system\gts", True)
|
||||
|
||||
If Core.Player.Pokemons(Core.Player.Pokemons.Count - 1).CanEvolve(EvolutionCondition.EvolutionTrigger.Trading, "") = True Then
|
||||
Core.SetScreen(New EvolutionScreen(Me, {Core.Player.Pokemons.Count - 1}.ToList(), offeredPokemonID.ToString(), EvolutionCondition.EvolutionTrigger.Trading))
|
||||
|
@ -35,7 +35,7 @@
|
||||
Me.Identification = Identifications.PVPLobbyScreen
|
||||
Me.texture = TextureManager.GetTexture("GUI\Menus\General")
|
||||
|
||||
MusicManager.PlayMusic("lobby", True)
|
||||
MusicPlayer.GetInstance().Play("system\lobby", True)
|
||||
|
||||
Me.MouseVisible = True
|
||||
Me.CanBePaused = False
|
||||
@ -607,7 +607,7 @@
|
||||
If BattleSuccessful = True Then
|
||||
ScreenState = ScreenStates.BattleResults
|
||||
End If
|
||||
MusicManager.PlayMusic("lobby", False)
|
||||
MusicPlayer.GetInstance().Play("system\lobby", False)
|
||||
Core.Player.Pokemons.Clear()
|
||||
Core.Player.Pokemons.AddRange(TempOriginalTeam.ToArray())
|
||||
BattleSystem.BattleScreen.OwnFaint = False
|
||||
|
@ -806,7 +806,7 @@ Public Class OverworldCamera
|
||||
Screen.Level.OverworldPokemon.Visible = False
|
||||
|
||||
If Screen.Level.IsRadioOn = False OrElse GameJolt.PokegearScreen.StationCanPlay(Screen.Level.SelectedRadioStation) = False Then
|
||||
MusicManager.PlayMusic(Screen.Level.MusicLoop)
|
||||
MusicPlayer.GetInstance().Play(Screen.Level.MusicLoop)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
@ -23,7 +23,7 @@
|
||||
Level.Load("|")
|
||||
|
||||
Me.SecretBase.LoadSecretBaseFromStore(Screen.Level)
|
||||
MusicManager.PlayMusic(Level.MusicLoop, True)
|
||||
MusicPlayer.GetInstance().Play(Level.MusicLoop, True)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Update()
|
||||
|
@ -515,7 +515,7 @@
|
||||
SandBoxMode = False
|
||||
End If
|
||||
|
||||
MusicManager.Clear()
|
||||
NewMusicManager.Clear()
|
||||
SoundManager.Clear()
|
||||
SmashRock.Load()
|
||||
Badge.Load()
|
||||
|
@ -120,7 +120,7 @@
|
||||
TextureReplacements.Clear()
|
||||
TextureResolutions.Clear()
|
||||
FilesExist.Clear()
|
||||
MusicManager.Clear()
|
||||
NewMusicManager.Clear()
|
||||
SoundManager.Clear()
|
||||
ModelManager.Clear()
|
||||
TextureManager.TextureList.Clear()
|
||||
|
@ -11,7 +11,7 @@ Public Class NewMusicManager
|
||||
'Intros to songs are not required, but have the default folder called "intro", which songs do not get pulled from unless they have a song in the corresponding main folder.
|
||||
'Intros only play if the corresponding song was loaded from the same origin (GameMode/ContentPack).
|
||||
'
|
||||
'Accepted file formats are .xnb (with .wma file) and .mp3.
|
||||
'Accepted file formats are .xnb (with .wma file) and .ogg.
|
||||
|
||||
'This maps the song files.
|
||||
Private Shared _songs As New Dictionary(Of String, Song)
|
||||
@ -32,7 +32,7 @@ Public Class NewMusicManager
|
||||
''' <returns></returns>
|
||||
Public Shared Function GetSong(ByVal songName As String) As Song
|
||||
Try
|
||||
Dim cContent As ContentManager = ContentPackManager.GetContentManager("Songs\" & songName, ".xnb,.mp3")
|
||||
Dim cContent As ContentManager = ContentPackManager.GetContentManager("Songs\" & songName, ".xnb,.ogg")
|
||||
|
||||
Dim tKey As String = cContent.RootDirectory & "\Songs\" & songName
|
||||
|
||||
@ -40,9 +40,9 @@ Public Class NewMusicManager
|
||||
Dim s As Song = Nothing
|
||||
|
||||
If System.IO.File.Exists(GameController.GamePath & "\" & cContent.RootDirectory & "\Songs\" & songName & ".xnb") = False AndAlso System.IO.File.Exists(GameController.GamePath & "\" & cContent.RootDirectory & "\Songs\" & songName & ".wma") = False Then
|
||||
If System.IO.File.Exists(GameController.GamePath & "\" & cContent.RootDirectory & "\Songs\" & songName & ".mp3") = True Then
|
||||
If System.IO.File.Exists(GameController.GamePath & "\" & cContent.RootDirectory & "\Songs\" & songName & ".ogg") = True Then
|
||||
Dim ctor = GetType(Song).GetConstructor(System.Reflection.BindingFlags.NonPublic Or System.Reflection.BindingFlags.Instance, Nothing, {GetType(String), GetType(String), GetType(Integer)}, Nothing)
|
||||
Dim filePath As String = GameController.GamePath & "\" & cContent.RootDirectory & "\Songs\" & songName & ".mp3"
|
||||
Dim filePath As String = GameController.GamePath & "\" & cContent.RootDirectory & "\Songs\" & songName & ".ogg"
|
||||
s = CType(ctor.Invoke({songName, filePath, 0}), Song)
|
||||
Else
|
||||
Logger.Log("296", Logger.LogTypes.ErrorMessage, "NewMusicManager.vb: Song """ & GameController.GamePath & "\" & cContent.RootDirectory & "\Songs\" & songName & """ was not found!")
|
||||
@ -71,11 +71,11 @@ Public Class NewMusicManager
|
||||
'To check if an intro exists, we grab the ContentManager of the root song first.
|
||||
'Then, we check if the intro file exists relative to the ContentManager's RootDirectory.
|
||||
|
||||
Dim cContent As ContentManager = ContentPackManager.GetContentManager("Songs\" & songName, ".xnb,.mp3")
|
||||
Dim cContent As ContentManager = ContentPackManager.GetContentManager("Songs\" & songName, ".xnb,.ogg")
|
||||
|
||||
Return (System.IO.File.Exists(GameController.GamePath & "\" & cContent.RootDirectory & "\Songs\intro\" & songName & ".xnb") = True And
|
||||
System.IO.File.Exists(GameController.GamePath & "\" & cContent.RootDirectory & "\Songs\intro\" & songName & ".wma") = True) Or
|
||||
System.IO.File.Exists(GameController.GamePath & "\" & cContent.RootDirectory & "\Songs\intro\" & songName & ".mp3") = True
|
||||
Return (System.IO.File.Exists(GameController.GamePath & "\" & cContent.RootDirectory & "\Songs\intro\" & songName & ".xnb") = True AndAlso
|
||||
(System.IO.File.Exists(GameController.GamePath & "\" & cContent.RootDirectory & "\Songs\intro\" & songName & ".ogg")) OrElse
|
||||
System.IO.File.Exists(GameController.GamePath & "\" & cContent.RootDirectory & "\Songs\intro\" & songName & ".wma"))
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
@ -227,7 +227,15 @@ Public Class MusicPlayer
|
||||
''' Forces a volume update to the Media Player.
|
||||
''' </summary>
|
||||
Public Sub ForceVolumeUpdate()
|
||||
#If WINDOWS Then
|
||||
Try
|
||||
MediaPlayer.Volume = _volume * _masterVolume
|
||||
Catch ex As NullReferenceException
|
||||
' song changed while changing volume
|
||||
End Try
|
||||
#Else
|
||||
MediaPlayer.Volume = _volume * _masterVolume
|
||||
#End If
|
||||
_currentVolume = _volume * _masterVolume
|
||||
End Sub
|
||||
|
||||
@ -244,7 +252,7 @@ Public Class MusicPlayer
|
||||
|
||||
_introFollowUp = Song
|
||||
_introPlaying = True
|
||||
_introRemaining = s.Duration
|
||||
_introRemaining = s.Duration - TimeSpan.FromSeconds(1)
|
||||
|
||||
PlayTrack(s, Song)
|
||||
Else
|
||||
|
@ -227,7 +227,7 @@
|
||||
|
||||
p.SetCatchInfos(Me.Ball, "caught at")
|
||||
|
||||
MusicManager.PlayMusic("wild_defeat", True, 0.0F, 0.0F)
|
||||
MusicPlayer.GetInstance().Play("battle\defeat\wild", True, 0.0F, 0.0F)
|
||||
SoundManager.PlaySound("success", True)
|
||||
TextBox.Show(s, {}, False, False)
|
||||
End Sub
|
||||
|
@ -141,7 +141,8 @@
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub ChangeTo()
|
||||
MusicManager.PlayMusic("nomusic", False)
|
||||
MusicPlayer.GetInstance().Stop()
|
||||
'MusicManager.PlayMusic("nomusic", False)
|
||||
Core.Player.Inventory.RemoveItem(177) ' Remove all Park Balls (happens regardless of whether or not the player was currently in the Bug-Catching Contest).
|
||||
PlayerStatistics.Track("Blackouts", 1)
|
||||
End Sub
|
||||
|
@ -20,40 +20,36 @@
|
||||
Dim duration As TimeSpan
|
||||
|
||||
Public MusicLoop As String = ""
|
||||
Private renderTarget As RenderTarget2D
|
||||
|
||||
Public Sub New(ByVal OldScreen As Screen, ByVal NewScreen As Screen, ByVal IntroType As Integer)
|
||||
Dim musicLoop As String = Screen.Level.CurrentRegion.Split(CChar(","))(0) & "_wild_intro"
|
||||
Dim musicLoop As String = "battle\intro\" & Screen.Level.CurrentRegion.Split(CChar(","))(0) & "\wild"
|
||||
|
||||
If BattleSystem.BattleScreen.RoamingBattle = True Then
|
||||
If BattleSystem.BattleScreen.RoamingPokemonStorage.MusicLoop <> "" Then
|
||||
musicLoop = BattleSystem.BattleScreen.RoamingPokemonStorage.MusicLoop & "_intro"
|
||||
musicLoop = "battle\intro\legend\" & BattleSystem.BattleScreen.RoamingPokemonStorage.MusicLoop
|
||||
End If
|
||||
End If
|
||||
|
||||
If MusicManager.SongExists(musicLoop) = False Then
|
||||
musicLoop = "johto_wild_intro"
|
||||
If NewMusicManager.SongExists(musicLoop) = False Then
|
||||
musicLoop = "battle\intro\johto\wild"
|
||||
End If
|
||||
musicLoop = musicLoop
|
||||
|
||||
Me.Constructor(OldScreen, NewScreen, Nothing, musicLoop, IntroType)
|
||||
End Sub
|
||||
|
||||
Public Sub New(ByVal OldScreen As Screen, ByVal NewScreen As Screen, ByVal IntroType As Integer, ByVal MusicLoop As String)
|
||||
If MusicLoop = "" Then
|
||||
MusicLoop = Screen.Level.CurrentRegion.Split(CChar(","))(0) & "_wild_intro"
|
||||
If MusicManager.SongExists(MusicLoop) = False Then
|
||||
MusicLoop = "battle\intro\" & Screen.Level.CurrentRegion.Split(CChar(","))(0) & "\wild"
|
||||
If NewMusicManager.SongExists(MusicLoop) = False Then
|
||||
If BattleSystem.BattleScreen.RoamingBattle = True Then
|
||||
If BattleSystem.BattleScreen.RoamingPokemonStorage.MusicLoop <> "" Then
|
||||
MusicLoop = BattleSystem.BattleScreen.RoamingPokemonStorage.MusicLoop & "_intro"
|
||||
MusicLoop = "battle\intro\legend\" & BattleSystem.BattleScreen.RoamingPokemonStorage.MusicLoop
|
||||
End If
|
||||
End If
|
||||
If MusicManager.SongExists(MusicLoop) = False Then
|
||||
MusicLoop = "johto_wild_intro"
|
||||
If NewMusicManager.SongExists(MusicLoop) = False Then
|
||||
MusicLoop = "battle\intro\johto\wild"
|
||||
End If
|
||||
End If
|
||||
MusicLoop = MusicLoop
|
||||
Else
|
||||
MusicLoop = MusicLoop
|
||||
End If
|
||||
|
||||
Me.Constructor(OldScreen, NewScreen, Nothing, MusicLoop, IntroType)
|
||||
@ -77,6 +73,9 @@
|
||||
End If
|
||||
|
||||
Me.Identification = Identifications.BattleIniScreen
|
||||
|
||||
renderTarget = New RenderTarget2D(Core.GraphicsDevice, Core.windowSize.Width, Core.windowSize.Height)
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Draw()
|
||||
@ -139,7 +138,7 @@
|
||||
|
||||
Private Sub UpdateBlurIntro()
|
||||
If blurTexture Is Nothing Then
|
||||
Dim r As New RenderTarget2D(Core.GraphicsDevice, Core.windowSize.Width, Core.windowSize.Height)
|
||||
Dim r = renderTarget
|
||||
Core.GraphicsDevice.SetRenderTarget(r)
|
||||
|
||||
Core.Draw()
|
||||
@ -501,16 +500,16 @@
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub ChangeTo()
|
||||
Player.Temp.IsInBattle = True
|
||||
Player.Temp.BeforeBattlePosition = Screen.Camera.Position
|
||||
Player.Temp.BeforeBattleLevelFile = Screen.Level.LevelFile
|
||||
Player.Temp.BeforeBattleFacing = Screen.Camera.GetPlayerFacingDirection()
|
||||
MusicManager.PlayMusic(MusicLoop)
|
||||
Core.Player.Temp.IsInBattle = True
|
||||
Core.Player.Temp.BeforeBattlePosition = Screen.Camera.Position
|
||||
Core.Player.Temp.BeforeBattleLevelFile = Screen.Level.LevelFile
|
||||
Core.Player.Temp.BeforeBattleFacing = Screen.Camera.GetPlayerFacingDirection()
|
||||
MusicPlayer.GetInstance().Play(MusicLoop)
|
||||
MediaPlayer.IsRepeating = False
|
||||
|
||||
Dim s As MusicManager.CSong = MusicManager.GetSong(MusicLoop, True)
|
||||
Dim s As Song = NewMusicManager.GetSong(MusicLoop)
|
||||
If Not s Is Nothing Then
|
||||
Me.duration = s.Song.Duration
|
||||
Me.duration = s.Duration
|
||||
Else
|
||||
Me.duration = New TimeSpan(0)
|
||||
End If
|
||||
|
@ -44,7 +44,7 @@ Public Class CreditsScreen
|
||||
|
||||
ExecuteCameraLevel()
|
||||
|
||||
MusicManager.PlayMusic("credits", True)
|
||||
MusicPlayer.GetInstance().Play("system\credits", True)
|
||||
MediaPlayer.IsRepeating = False
|
||||
End Sub
|
||||
|
||||
|
@ -257,21 +257,22 @@
|
||||
Core.ServersManager.ServerConnection.Disconnect()
|
||||
End If
|
||||
Chat.ClearChat()
|
||||
If Core.Player.loadedSave = True And Me.canCreateAutosave = True Then
|
||||
Core.Player.SaveGame(False)
|
||||
End If
|
||||
'RIP autosave
|
||||
'If Core.Player.loadedSave = True And Me.canCreateAutosave = True Then
|
||||
' Core.Player.SaveGame(False)
|
||||
'End If
|
||||
Construct.Controller.GetInstance().Reset()
|
||||
Core.SetScreen(New PressStartScreen())
|
||||
Core.Player.loadedSave = False
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub ChangeTo()
|
||||
MusicManager.MasterVolume /= 4
|
||||
MusicManager.ForceVolumeUpdate()
|
||||
MusicPlayer.GetInstance().MasterVolume /= 4
|
||||
MusicPlayer.GetInstance().ForceVolumeUpdate()
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub ChangeFrom()
|
||||
MusicManager.MasterVolume *= 4
|
||||
MusicManager.ForceVolumeUpdate()
|
||||
MusicPlayer.GetInstance().MasterVolume *= 4
|
||||
MusicPlayer.GetInstance().ForceVolumeUpdate()
|
||||
End Sub
|
||||
End Class
|
@ -161,8 +161,8 @@
|
||||
|
||||
EvolvePokemon()
|
||||
|
||||
Me.SavedMusic = MusicManager.GetCurrentSong()
|
||||
MusicManager.PlayMusic("nomusic", False)
|
||||
Me.SavedMusic = MusicPlayer.GetInstance().CurrentSong()
|
||||
MusicPlayer.GetInstance().Play("nomusic", False)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Draw()
|
||||
@ -199,8 +199,8 @@
|
||||
Next
|
||||
Else
|
||||
If evolutionReady = False And TextBox.Showing = False Then
|
||||
If MusicManager.GetCurrentSong() <> "evolution" Then
|
||||
MusicManager.PlayMusic("evolution", True)
|
||||
If MusicPlayer.GetInstance().CurrentSong() <> "system\evolution" Then
|
||||
MusicPlayer.GetInstance().Play("system\evolution", True)
|
||||
End If
|
||||
|
||||
If evolved = False Then
|
||||
@ -304,7 +304,7 @@
|
||||
s = s.PreScreen
|
||||
End While
|
||||
Core.SetScreen(New TransitionScreen(s, s.PreScreen, Color.Black, False))
|
||||
MusicManager.PlayMusic(SavedMusic)
|
||||
MusicPlayer.GetInstance().Play(SavedMusic)
|
||||
Else
|
||||
Dim s As Screen = Core.CurrentScreen
|
||||
While s.Identification <> Identifications.BattleScreen
|
||||
|
@ -35,7 +35,7 @@
|
||||
Me.Backgroud = TextureManager.GetTexture("GUI\EggBreak", New Rectangle(0, 0, 256, 192), "")
|
||||
Me.Egg = GetEggTexture()
|
||||
|
||||
MusicManager.PlayNoMusic()
|
||||
MusicPlayer.GetInstance().Stop()
|
||||
End Sub
|
||||
|
||||
Private Function GetEggTexture() As Texture2D
|
||||
@ -81,7 +81,7 @@
|
||||
If size < 3.5F Then
|
||||
size += 0.08F
|
||||
Else
|
||||
MusicManager.PlayMusic("wild_defeat")
|
||||
MusicPlayer.GetInstance().Play("battle\defeat\wild")
|
||||
cPokemon.PlayCry()
|
||||
SoundManager.PlaySound("success", True)
|
||||
Stage = 7
|
||||
|
Loading…
x
Reference in New Issue
Block a user