Fix audio engine & contentpacks (#35)

* Replaced existing Gen 2 SFX with better sounding ones (no ugly reverb)
Replaced MediaPlayer with NAudio(and NAudio.Vorbis) for playing music in order to fix random stopping issues.
The game now directly loads .ogg files instead of the .wma/.xnb combination from before.
ContentPacks are now able to replace Music and SFX again (I haven't added a menu yet for choosing ContentPacks).
To make older GameModes work with current versions, you can add the GameMode property EnterType and set it to "1", this will make the game use the older 2D NewGameScreen.

* Delete GameController.vb

* Add gamecontroller.vb back

* Fix sfx missing

* Battleintro doodle now doesn't loop anymore (for no trainer)
Changed the shutter sound (aka Large Door sound) to something more large door-y
Made the enter sound slightly louder
The enter sound now plays when going through any warp to or from an indoor map (including falling through holes)
The flying sound effect is played earlier in the animation after selecting a location
Changed played sound effect when using the Escape Rope to "teleport" instead of "destroy"
The bump noise now also plays when bumping into something in first person
Fixed small gap between the end of the intro song and the start of the main song
Replaced some songs with better songs

* Fixed some more intro issues

* Forgot to change a thing

* Fixed an error where the main music would play, ignoring the muted musicmanager.

* fix indenting in musicmanager

* The music player will now only start playback on a new song if the music player is not muted, fixed the end time calculation of the intro of a song after muting, Music can't be unmuted now as long as a sound effect plays that stops the music.

* Fixed league restplace position, fixed sound effects sharing the volume slider of the music, sound effects are now also muted when pressing M, changed music on/off popup to audio on/off, removed bump delay in first person, added more control on whether played songs should be looping or not.

* Fixed some more scripts that turn on thirdperson mode but don't check if it was on before or set it back to what it was before afterwards, also fixed a small error in creditsscreen.vb.

* Fixed indenting error in musicmanager.vb, fixed an error of mine where the loopsong parameter would be seen as the playintro parameter.

* Added more music commands, added quite some menu select noises, will add more later

* More select sound effects!

* Fix music not resuming after soundeffect

* Trainer using item now plays the single_heal soundeffect

* Pokémon cries now sound louder

* Possibly fixing crash when playing Pokémon cry at volume higher than 0.71

* Added better quality Pokémon cries, made random overworld cries slightly less loud, added cries for 719 and 720.

* Sound effects now sound louder

* Revert "Added better quality Pokémon cries, made random overworld cries slightly less loud, added cries for 719 and 720."

This reverts commit 8c9296ed1a.

* Fixed the cause of why the title screen music plays even when the game is muted

* Tabs to spaces

* Revert

Co-authored-by: darkfire006 <blazer257@live.com>
Co-authored-by: JappaWakkaP3D <66885565+JappaWakkaP3D@users.noreply.github.com>
Co-authored-by: JappaWakkaP3D <jasper.speelman@outlook.com>
Co-authored-by: Vitaly Mikhailov <personal@aragas.org>
This commit is contained in:
JappaWakka 2020-07-09 19:59:42 +02:00 committed by GitHub
parent 46e8d314d4
commit fae7349356
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
533 changed files with 1637 additions and 1545 deletions

View File

@ -946,33 +946,46 @@
'Potion,Super Point,Hyper Potion,Full Heal,Full Restore,Burn Heal,Antidote,Paralyze heal,Awakening,Ice Heal,Revive,Max Revive,Max Potion
Select Case ItemID
Case 18 'Potion
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("single_heal", False))
Me.GainHP(20, False, False, BattleScreen, BattleScreen.Trainer.Name & " used a Potion on " & p.GetDisplayName() & "!", "item:potion")
Case 17 'Super Potion
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("single_heal", False))
Me.GainHP(50, False, False, BattleScreen, BattleScreen.Trainer.Name & " used a Super Potion on " & p.GetDisplayName() & "!", "item:superpotion")
Case 16 'Hyper Potion
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("single_heal", False))
Me.GainHP(100, False, False, BattleScreen, BattleScreen.Trainer.Name & " used a Hyper Potion on " & p.GetDisplayName() & "!", "item:hyperpotion")
Case 15 'Max Potion
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("single_heal", False))
Me.GainHP(p.MaxHP, False, False, BattleScreen, BattleScreen.Trainer.Name & " used a Max Potion on " & p.GetDisplayName() & "!", "item:maxpotion")
Case 14 'Full Restore
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("single_heal", False))
Me.GainHP(p.MaxHP, False, False, BattleScreen, BattleScreen.Trainer.Name & " used a Full Restore on " & p.GetDisplayName() & "!", "item:fullrestore")
Me.CureStatusProblem(False, False, BattleScreen, "", "item:fullrestore")
Case 38 'Full Heal
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("single_heal", False))
Me.CureStatusProblem(False, False, BattleScreen, BattleScreen.Trainer.Name & " used a Full Heal on " & p.GetDisplayName() & "!", "item:fullheal")
Case 9 'Antidote
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("single_heal", False))
Me.CureStatusProblem(False, False, BattleScreen, BattleScreen.Trainer.Name & " used an Antidote on " & p.GetDisplayName() & "!", "item:antidote")
Case 10 'Burn Heal
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("single_heal", False))
Me.CureStatusProblem(False, False, BattleScreen, BattleScreen.Trainer.Name & " used a Burn Heal on " & p.GetDisplayName() & "!", "item:burnheal")
Case 11 'Ice Heal
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("single_heal", False))
Me.CureStatusProblem(False, False, BattleScreen, BattleScreen.Trainer.Name & " used an Ice Heal on " & p.GetDisplayName() & "!", "item:iceheal")
Case 12 'Awakening
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("single_heal", False))
Me.CureStatusProblem(False, False, BattleScreen, BattleScreen.Trainer.Name & " used an Awakening on " & p.GetDisplayName() & "!", "item:awakening")
Case 13 'Paralyze Heal
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("single_heal", False))
Me.CureStatusProblem(False, False, BattleScreen, BattleScreen.Trainer.Name & " used a Paralyze Heal on " & p.GetDisplayName() & "!", "item:paralyzeheal")
Case 39 'Revive
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("single_heal", False))
BattleScreen.BattleQuery.Add(New TextQueryObject(BattleScreen.Trainer.Name & " used a Revive on " & p.GetDisplayName() & "!"))
p.Status = Pokemon.StatusProblems.None
p.HP = CInt(Math.Ceiling(p.MaxHP / 2))
Case 40 'Max Revive
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("single_heal", False))
BattleScreen.BattleQuery.Add(New TextQueryObject(BattleScreen.Trainer.Name & " used a Revive on " & p.GetDisplayName() & "!"))
p.Status = Pokemon.StatusProblems.None
p.HP = p.MaxHP
@ -3987,7 +4000,7 @@
If Not p.Item Is Nothing Then
If BattleScreen.FieldEffects.CanUseItem(own) = True And BattleScreen.FieldEffects.CanUseOwnItem(own, BattleScreen) = True Then
Select Case p.Item.Name.ToLower()
Case "figy"
Case "figy"
If RemoveHeldItem(own, own, BattleScreen, "", "berry:figy") = True Then
UseBerry(own, from, Item.GetItemByID(ItemID), BattleScreen, message, cause)
End If

View File

@ -1535,11 +1535,11 @@
If Attack.Type.Type = Element.Types.Normal Then
UA = 1.2F
End If
Case "normalize"
Case "normalize"
If Attack.Type.Type = Element.Types.Normal Then
UA = 1.2F
End If
Case "galvanize"
Case "galvanize"
If Attack.Type.Type = Element.Types.Normal Then
UA = 1.2F
End If

View File

@ -418,11 +418,13 @@
Public Sub Activate(ByVal BattleScreen As BattleScreen, ByVal AllExtended As Integer, ByVal isSelected As Boolean)
If BattleScreen.BattleMenu._isExtracting = False And BattleScreen.BattleMenu._isRetracting = False Then
If Controls.Accept(False, True, True) = True And isSelected = True Then
SoundManager.PlaySound("select")
Me.ClickAction(BattleScreen)
End If
If Controls.Accept(True, False, False) = True Then
If MouseHandler.IsInRectangle(New Rectangle(Core.ScreenSize.Width - 255, 116 + Index * 96, 255, 80)) = True Then
If isSelected = True Then
SoundManager.PlaySound("select")
Me.ClickAction(BattleScreen)
Else
BattleScreen.BattleMenu._mainMenuNextIndex = Me.Index
@ -497,11 +499,13 @@
If BattleScreen.BattleMenu._isExtracting = False And BattleScreen.BattleMenu._isRetracting = False Then
If Me.Move.CurrentPP > 0 Or isSelected = False Then
If Controls.Accept(False, True, True) = True And isSelected = True Then
SoundManager.PlaySound("select")
Me.ClickAction(BattleScreen)
End If
If Controls.Accept(True, False, False) = True Then
If MouseHandler.IsInRectangle(New Rectangle(Core.ScreenSize.Width - 255, 116 + Index * 96, 255, 80)) = True Then
If isSelected = True Then
SoundManager.PlaySound("select")
Me.ClickAction(BattleScreen)
Else
BattleScreen.BattleMenu._moveMenuNextIndex = Me.Index
@ -886,6 +890,7 @@
UpdateMenuOptions(_moveMenuIndex, _moveMenuNextIndex, _moveMenuItemList.Count)
If Controls.Dismiss(True, True, True) = True And _retractMenu = False And _isExtracting = False And _isRetracting = False Then
SoundManager.PlaySound("select")
_retractMenu = True
_nextMenuState = MenuStates.Main

View File

@ -111,9 +111,10 @@
If _chooseIndex = 0 Then
Dim selScreen = New PartyScreen(Core.CurrentScreen, Item.GetItemByID(5), AddressOf ChoosePokemon, "Choose Pokémon to battle!", False) With {.Mode = Screens.UI.ISelectionScreen.ScreenMode.Selection, .CanExit = True}
AddHandler selScreen.SelectedObject, AddressOf ChoosePokemonHandler
SoundManager.PlaySound("select")
Core.SetScreen(selScreen)
Else
SoundManager.PlaySound("select")
_ready = True
End If
End If

View File

@ -59,6 +59,7 @@
End If
Else
If Controls.Accept(True, True) = True Then
SoundManager.PlaySound("select")
Me._ready = True
End If
End If

Binary file not shown.

View File

@ -550,8 +550,8 @@ game_message_third_person_on,Third person mode on.
game_message_third_person_off,Third person mode off.
game_message_free_camera_on,Free camera mode on
game_message_free_camera_off,Free camera mode off
game_message_music_on,Music on
game_message_music_off,Music off
game_message_audio_on,Audio on
game_message_audio_off,Audio off
game_message_continue_autosave,Continued save state:
---
Online:

View File

@ -351,8 +351,8 @@ game_message_third_person_on,Mode troisième personne.
game_message_third_person_off,Mode première personne.
game_message_free_camera_on,Mouvements libres de la caméra activé.
game_message_free_camera_off,Mouvement libress de la caméra désactivé.
game_message_music_on,Musique activé.
game_message_music_off,Musique désactivé.
game_message_audio_on,L'audio activé.
game_message_audio_off,L'audio désactivé.
---
Online:
game_message_close_connection,Tu as fermé la partie en CO-OP.

View File

@ -675,8 +675,8 @@ game_message_third_person_on,Trečiojo asmens rėžimas įjungtas.
game_message_third_person_off,Trečiojo asmens rėžimas išjungtas.
game_message_free_camera_on,Laisvos kameros rėžimas įjungtas.
game_message_free_camera_off,Laisvos kameros rėžimas išjungtas.
game_message_music_on,Muzika įjungta
game_message_music_off,Muzika išjungta
game_message_audio_on,Garso įjungta
game_message_audio_off,Garso išjungta
game_message_continue_autosave,Continued save state:
---
Online:

View File

@ -547,8 +547,8 @@ game_message_third_person_on,Tredje personmodus på.
game_message_third_person_off,Tredje personmodus av.
game_message_free_camera_on,Fri bevegelses kameramodus på
game_message_free_camera_off,Fri bevegelses kameramodus på
game_message_music_on,Musikk
game_message_music_off,Musikk av
game_message_audio_on,Lyd
game_message_audio_off,Lyd av
game_message_continue_autosave,Fortsatt lagret tilstand:
---
Online:

View File

@ -542,8 +542,8 @@ game_message_third_person_on,Tredje person på.
game_message_third_person_off,Tredje person av.
game_message_free_camera_on,Fri kamera på
game_message_free_camera_off,Fri kamera av
game_message_music_on,Musik
game_message_music_off,Musik av
game_message_audio_on,Audio
game_message_audio_off,Audio av
game_message_continue_autosave,Fortsatt sparat spel:
---
Online:

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
P3D/Content/Songs/alph.ogg Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
P3D/Content/Songs/gts.ogg Normal file

Binary file not shown.

BIN
P3D/Content/Songs/gym.ogg Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More