ChocolateBird/test_scene.gd

27 lines
1000 B
GDScript3
Raw Normal View History

extends Control
2023-07-25 14:21:10 +09:30
2023-07-29 01:53:03 +09:30
var save_slots = []
var save_slot_dicts = []
2023-07-25 14:21:10 +09:30
func _ready():
Engine.set_target_fps(60)
2023-07-29 01:53:03 +09:30
var save_file := File.new()
#var error := save_file.open('test.srm', File.READ)
var error := save_file.open('/home/luke/.config/Mesen2/Saves/FF5_SCC_WepTweaks_Inus_Dash.srm', File.READ)
2023-07-29 01:53:03 +09:30
if error == OK:
for i in 4:
save_slots.append(SaveLoader.get_save_slot(save_file, i))
save_slot_dicts.append(SaveLoader.load_save_slot(save_slots[i]))
2023-07-29 01:53:03 +09:30
print('Loaded test save file')
2023-07-31 15:18:02 +09:30
save_file.close()
# error = save_file.open('downloaded_saves/psx_world1.gme', File.READ)
# if error == OK:
# var buffer := StreamPeerBuffer.new()
# save_file.seek(0x2FA0)
# buffer.data_array = save_file.get_buffer(0x600)
# save_slot_dicts.append(SaveLoader.get_struct(buffer, 'Save_slot'))
var data = save_slot_dicts[0]
data.characters[2].ability_4 = 0x9B
$PartyMenu.update_labels(data)
ThemeManager.set_menu_color_555(data.config.menu_color_r, data.config.menu_color_g, data.config.menu_color_b)