From b0d7a60e53233376bddd060308f33dab916da7e0 Mon Sep 17 00:00:00 2001 From: Luke Hubmayer-Werner Date: Sat, 27 Jul 2024 22:50:29 +0930 Subject: [PATCH] [BGM] forgot to move this earlier --- scripts/managers/MusicManager.gd | 11 +++++++++++ test/audio_system.gd | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/managers/MusicManager.gd b/scripts/managers/MusicManager.gd index 746a64d..e04e536 100644 --- a/scripts/managers/MusicManager.gd +++ b/scripts/managers/MusicManager.gd @@ -109,6 +109,17 @@ func queue_prerender_bgm(bgm_id: int) -> void: audio_renderer.push_bytes(self.bgm_tex_bytes[bgm_id], self.bgm_target_times[bgm_id], bgm_key, false) +func save_bgm_disassembly(bgm_id: int, filename: String = '') -> void: + if not filename: + filename = 'output/BGM%02d disassembly.txt' % bgm_id + var disassembly: PoolStringArray = MusicRenderer.disassemble_bgm(MusicManager.bgm_tracksets[bgm_id], RomLoader.snes_data.bgm_instrument_indices[bgm_id]) + var file := File.new() + file.open(filename, File.WRITE) + for line in disassembly: + file.store_line(line) + file.close() + + func render_all_bgm(bgms_to_render: int = 70) -> void: audio_renderer.initialize_instrument_texture() for bgm_id in bgms_to_render: diff --git a/test/audio_system.gd b/test/audio_system.gd index eb4d602..6a04101 100644 --- a/test/audio_system.gd +++ b/test/audio_system.gd @@ -148,17 +148,6 @@ func get_ms(restart: bool = false) -> int: return Time.get_ticks_msec() - self.load_start_tick -func save_bgm_disassembly(bgm_id: int, filename: String = '') -> void: - if not filename: - filename = 'output/BGM%02d disassembly.txt' % bgm_id - var disassembly: PoolStringArray = MusicRenderer.disassemble_bgm(MusicManager.bgm_tracksets[bgm_id], RomLoader.snes_data.bgm_instrument_indices[bgm_id]) - var file := File.new() - file.open(filename, File.WRITE) - for line in disassembly: - file.store_line(line) - file.close() - - func get_shader_test_pattern() -> PoolByteArray: var midi_events_bytes := StreamPeerBuffer.new() var midi_events_bytes2 := StreamPeerBuffer.new()