ChocolateBird/scripts/loaders/rom_loader.gd

21 lines
579 B
GDScript3
Raw Normal View History

2023-07-25 16:33:45 +09:30
extends Node
var ROM_filename := 'FF5_SCC_WepTweaks_Inus_Dash.sfc' # 'Final Fantasy V (Japan).sfc'
var GBA_filename := '2564 - Final Fantasy V Advance (U)(Independent).gba'
var rom_snes := File.new()
var thread := Thread.new()
2023-07-25 16:33:45 +09:30
func load_snes_rom(filename: String):
var error := rom_snes.open(filename, File.READ)
if error == OK:
SpriteLoader.load_snes_rom(rom_snes)
2023-07-27 19:38:53 +09:30
MapLoader.load_snes_rom(rom_snes)
var _thread_error = thread.start(SoundLoader, 'parse_rom', rom_snes)
2023-07-25 16:33:45 +09:30
func _ready():
load_snes_rom(ROM_filename)
func _exit_tree() -> void:
thread.wait_to_finish()