mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 15:38:14 +00:00
Fixed Title BGM Looping
This is a simple bugfix that allows the Title Screen music to loop. It also works with Resource Packs. For the purposes of faithfulness, this fix is only needed for the Lost Levels title music to match the All-Stars counterpart.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"variations": {
|
"variations": {
|
||||||
"SMB1": {"source": "TitleSMB.mp3"},
|
"SMB1": {"source": "TitleSMB.mp3"},
|
||||||
"SMBLL": {"source": "TitleSMBLL.mp3"},
|
"SMBLL": {"source": "TitleSMBLL.bgm"},
|
||||||
"SMBS": {"source": "TitleSMBS.mp3"},
|
"SMBS": {"source": "TitleSMBS.mp3"},
|
||||||
"SMBANN": {"source": "TitleANN.mp3"}
|
"SMBANN": {"source": "TitleANN.mp3"}
|
||||||
}
|
}
|
||||||
|
4
Assets/Audio/BGM/TitleSMBLL.bgm
Normal file
4
Assets/Audio/BGM/TitleSMBLL.bgm
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"Normal": {"source": "TitleSMBLL.mp3", "loop": 11.735},
|
||||||
|
"Hurry": {"source": "TitleSMBLL.mp3", "loop": 11.735}
|
||||||
|
}
|
@@ -304,7 +304,9 @@ func load_image_from_path(path := "") -> ImageTexture:
|
|||||||
|
|
||||||
func load_audio_from_path(path := "") -> AudioStream:
|
func load_audio_from_path(path := "") -> AudioStream:
|
||||||
var stream = null
|
var stream = null
|
||||||
if path.contains("res://"):
|
if path.contains(".bgm"):
|
||||||
|
stream = AudioManager.generate_interactive_stream(JSON.parse_string(FileAccess.get_file_as_string(path)))
|
||||||
|
elif path.contains("res://"):
|
||||||
return load(path)
|
return load(path)
|
||||||
if path.contains(".wav"):
|
if path.contains(".wav"):
|
||||||
stream = AudioStreamWAV.load_from_file(path)
|
stream = AudioStreamWAV.load_from_file(path)
|
||||||
|
Reference in New Issue
Block a user